1. 首页
  2. 数据库
  3. 其它
  4. jlex:一个用Python编写的Java源代码的词法分析器 java source code

jlex:一个用Python编写的Java源代码的词法分析器 java source code

上传者: 2021-03-26 02:24:36上传 ZIP文件 3.22KB 热度 5次
杰利克斯 一个用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 ( token ) 输入 public class Example { public static void main ( String [] args ) { System . out . println( " Hello world! " ); } } 输出 类型
下载地址
用户评论