parser.js A parser library implemented by JavaScript, including tools like lex/yacc and include simple api to generate syntax tree Author Features 实现了一个基于NFA的正则表达式引擎实现(正则表达式字符串的解析使用自身实现的底层API和下面的语法解析引擎来实现的),支持主要正则功能已经分组捕获等 实现了一个语法解析引擎(支持左递归定义,语法定义简单) 提供一个整合了词法分析和语法分析的API,方便使用,可以直接生成最终满足要求的抽象语法树(直接生成最初定义规则对应的抽象语法树,而不是解析过程中的中间产物) 为了性能考虑,另外提供了一个使用内置正则引擎的快速词法分析实现,并且尽量兼容自己实现的正则API,从而可以在性能有问题时切换 直接浏览器和N
2021-12-22 09:06:46 22KB JavaScript
1
·parsegen:windows下的lex和yacc,支持c,cpp,java,使用方便,配置复杂,网上可以搜到详细介绍。 ·graphviz:根据脚本生成图像的软件,可以用来生成语法树。 ·Ex_2:第二个小练习,为SmallLan语法生成语法树注释详细,语法根据实际需要,有所修改。*仅供参考、翻版必究。
2021-12-09 10:51:13 15.51MB parsegen 语法树 graphviz
1
针对代码抄袭及软件盗版现象,研究了3种传统基于程序结构相似性检测方法,并提出一种基于语法树的程序相似度检测方法。该方法先对源程序进行语法分析得到其语法树,然后基于语法树重点分析源程序的语法结构并计算其相似度,从语法结构的角度消除高级抄袭手段所带来的干扰。实验结果表明,基于语法树的程序相似度检测方法可以较好地检测增加冗余语句、控制结构的等价替换等10种抄袭手段。
2021-11-21 17:55:21 2.29MB 工程技术 论文
1
Architecture-driven Modernization Abstract Syntax Tree Metamodel (ASTM) V1.pdf The purpose of the ASTM is to provide a framework that allows tool vendors and tool clients to build and use tools that conform to commonly agreed upon modeling specifications for the interchange of abstract syntax models of software. Interoperability is achieved when models can be interchanged using modeling elements that conform to those specified in the ASTM specification. The internal proprietary models of tools need not conform the ASTM for a tool to be considered compliant with the ASTM. To be considered compliant a tool need only adhere to the ASTM as a model interchange specification. Tool conformance is concerned solely with the ability of tools to interchange models that conform to the ASTM. • For a GAST model to conform with the ASTM it must conform to the GAST Metamodel provided by this specification. • For a SAST model to conform to the ASTM it must conform to both the GASTM model provided with this specification as well as the SASTM model provided by some future SASTM specification. The ASTM is a bi-dimension multi-layered modeling specification. The two dimensions of the ASTM define both syntactic as well as the semantic properties of software. The layers of the ASTM define a core set of modeling elements, the GASTM, that are common to many programming languages as well as a set of extensions, the SASTMs, that extend from the core for and are used in concert with the GASTM for defining models specialized to particular programming languages. Table 2.1 illustrates the Compliance Points of the ASTM.
2021-10-13 13:54:55 8.96MB OMG 架构 语法
1
从cpp到py 该项目旨在通过创建抽象语法树(AST),使用层将C ++代码转换为Python。 该程序需要Python 3。 设置 # python3 -m pip install ply python3 -m pip uninstall -y ply # ^ "PLY is no longer maintained as pip-installable package. Although no # new features are planned, it continues to be maintained and # modernized. If you want to use the latest version, you need to check # it out from the PLY GitHub page." -<https://www.dabeaz.c
2021-10-06 21:01:49 19KB Python
1
编译原理语法树,编译原理实验,bison,flex
2021-09-28 19:02:51 49KB bison树 flex 语法树 语法树bison
编译原理语法树,编译原理实验,bison,flex
2021-09-28 15:02:21 49KB bison树 flex 语法树 语法树bison
本示例展示了如下功能: 1,删除方法中的打印日志代码。 2,删除指定的方法和成员变量。 3,检测方法中是否有新的线程代码。 4,生成新的类和方法。并在运行时验证。 5,解析类文件:MainActivity.java,并在打印输出类信息。 6,修改类中的方法。将结果保存在工程目录下的/ output中。 7,在现有类中生成一个方法,并在运行时验证。 环境: gradle4.1 classpath 'com.android.tools.build:gradle:3.0.1' 1,删除类方法中的日志:Log.xxxx System.out.xxx 2,删除指定的方法和成员变量 //过滤如下 成员变量 和 方法 public void test() public int test(int a) String abc String def 3
2021-09-22 22:10:21 5.26MB 系统开源
1
Flora SQL解析器 将简单SQL语句解析为抽象语法树(AST),然后将其转换回SQL。 用法 为SQL语句创建AST const { Parser } = require ( 'flora-sql-parser' ) ; const parser = new Parser ( ) ; const ast = parser . parse ( 'SELECT * FROM t' ) ; console . log ( ast ) ; 将AST转换回SQL const { Parser } = require ( 'flora-sql-parser' ) ; const ast = (
2021-09-14 09:26:09 42KB parser sql ast SQLJavaScript
1
口香糖汤匙AST差异 使用Gumtree算法计算两个Spoon抽象语法树之间的AST差异。 如果使用此功能,请引用: (Jean-RémyFalleri,FloréalMorandat,Xavier Blanc,Matias Martinez,Martin Monperrus),在国际自动化软件工程会议上的发言,2014年 : 。 普通gumtreediff和gumtree-spoon-ast-diff之间的区别 gumtree-spoon-ast-diff和之间的主要区别是什么? 与普通的gumtreediff相比,gumtree-spoon-ast-diff的树经过精心设计,可为Java提供更好的AST diff。 只需比较您自己数据上的AST差异即可。 可以通过指向原始Spoon节点的指针对diff中涉及的节点进行漂亮的打印(请参见方法changedNode , commo
2021-09-01 19:57:02 1.76MB 系统开源
1