Syntactic Monoids of Codes