5 июля 2013 г.

Lexers in modern compilers


In modern compilers two approaches are widely used to implement a lexer/scanner/tokenizer: the hand-written approach and the automatic lexer generator approach.



Compiler Lexer/scanner/tokenizer implementation Source
Cray Chapel 1.7.0 Flex chaplel/compiler/parser/chapel.lex
IBM X10 2.3.1 LPG (LALR parser generator) x10/x10.compiler/src/x10/parser/X10Lexer.java
GCC 4.8.1 handwritten gcc/gcc/c-family/c-lex.c
Clang 3.3 handwritten cfe/lib/Lex/Lexer.cpp
PathScale EkoPath 4 handwritten - base on GCC frontend
Open64 5.0handwritten - based on GCC frontend








Комментариев нет: