abstract-syntax-tree
Serialize AST in parsable format
I have a DSL with Java front-end and I would like to serialize an AST that I get in front-end part in some easily parsable format to make it easier to write a back-end part that generates a code in di[详细]
2023-03-01 03:48 分类:问答Checking Java code fragments using eclipse AST
I\'m trying to check for syntactical and logical correctness some Java code fragments using the eclipse abstract syntax tree.[详细]
2023-02-28 21:59 分类:问答What are synthesized attributes in the context of creating an abstract syntax tree?
Compilers parse source code and build an abstract syntax tree. The functions used to construct an abstract syntax tree return pointers which constitute synthesized attributes. What are they and how do[详细]
2023-02-28 14:23 分类:问答Translation from Python to CIL(C Intermediate Language)
I have worked on the static analysis on Python source code recently. There is already a static analyzer written in Ocaml for CIL(C Intermediate Language) in our group. We want to reuse this analyzer,[详细]
2023-02-28 14:22 分类:问答How can I code for calculating a CompilationUnit lines of code in
I would like to calcualate开发者_StackOverflow a compilation unit lines of code intuitively. How can I use the method of CompilationUnit: CompilationUnit.getLineNumber([THELASTLINE].getPosition()) to[详细]
2023-02-27 02:41 分类:问答Any differences between terms parse trees and derivation trees?
The terms AST (Abstract Syntax Tree), parse tree and derivation tree are bandied about by different people when referring to the result of parsing texts conforming to a grammar. Assuming we are talkin[详细]
2023-02-27 01:55 分类:问答antlr C grammar to create AST
Is there any C grammar available which generates the AST, which includes all the parser rules using \"^\" and \"开发者_JS百科!\" notations?[详细]
2023-02-25 02:34 分类:问答Statically analyzing a Python module to find assignments
I want to let my users write an __init__.py module like this: \'\'\' This is the simpack\'s docstring. Bla bla bla.[详细]
2023-02-24 16:47 分类:问答How does/would the following snippet work for generation of an AST?
We\'re writing a compiler for Al Aho\'s compilers class, and we\'re considering the following code for the generation of our AST. Here is some background. We want to implement scoping rules as a stack[详细]
2023-02-24 11:11 分类:问答Finding similar code sections using sub-trees
I have been reading this paper titled Clone Detection using Abstract Syntax Trees by Ira D. Baxter et al. There is a paragraph from the paper that I reproduced below:[详细]
2023-02-24 03:36 分类:问答
加载中,请稍侯......