摘要: Compiler toolkits make it possible to rapidly develop compilers and translators for new programming languages. Although there exist elegant modular extensible parsers, compiler developers must often resort ad-hoc solutions when extending or composing lexers. This paper presents MetaLexer, a lexical specification language associated tool.MetaLexer allows programmers define lexers in fashion. MetaLexer modules can be used break the of into collection smaller specifications. Control is passed between using concept meta-tokens meta-lexing. are also extensible.MetaLexer has two key features: abstracts state transitions out semantic actions makes by introducing multiple inheritance.We have constructed tool which converts specifications popular JFlex we our create three real languages their extensions: AspectJ (and extensions), MATLAB AspectMatlab extension), itself. The easier read, extensible, require much less action code than originals.