说明:杰利克斯
一个用Python编写的Java源代码的词法分析器
例子
代码
from jlex . lexer import lex_source_file
from jlex . type import Type
tokens = lex_source_file ( 'Example.java' )
for token in tokens :
if token . type not in [ Type . SPACE , Type . NEW_LINE ]:
print <weixin_42104778> 上传 | 大小:3kb