abstract-syntax-tree
Change operator precedence
What would be the best way to change operator precedence for a concrete expression? For example I have a class:[详细]
2023-03-10 16:58 分类:问答What is the best way to parse a tuple from a string in Python?
I tried this: def string_to_value(self, old_value, distribution_type, new_value_str): parameter_names = distribution_type.parameters# a list of string[详细]
2023-03-10 08:29 分类:问答Abstract-syntax tree for subset of C
For teaching purpose we are building a javascript step by step interpreter for (a subset of) C code. Basically we have : int,float..., arrays, functions, for, while... no pointers.[详细]
2023-03-08 13:00 分类:问答Generate AST for Java with ANTLR
As far as I know, there are two mechanisms in ANTLR for building abstract syntax trees. I want to buil开发者_运维技巧d a AST for Java source files.[详细]
2023-03-08 02:58 分类:问答ast.literal_eval() support for set literals in Python 2.7?
In the What’s New in Python 2.7 document it says that support for set literals was back-ported from Python 3.1. However it appears that this support was not extended to the ast module\'s literal_eval[详细]
2023-03-07 15:59 分类:问答How to find whether a member variable is used in a method using code in eclipse jdt?
I have to find all the methods in a class that use a particular member variable.(like \"References\" in eclipse but I want to implement using code...)I use AST visitor pattern that visits FieldDeclara[详细]
2023-03-06 17:11 分类:问答Antlr3 AST creation : how to test an optional subrule?
I am looking for a way to know if an optional sub rule has been used or not. For example: my_rule returns [node* n = 0]:[详细]
2023-03-06 14:04 分类:问答Python AST: How to get the children of a node
I am working on Python 2.6.5. Given a Abstract Syntax Tree, I want to obtain its children. Most StackOverflow posts discuss ast.NodeVisitor and the methods defined in it: visit(), generic_visit().[详细]
2023-03-05 20:52 分类:问答How should I construct and walk the AST output of an ANTLR3 grammar?
Documentation and general advice is that the abstract syntax tree should omit tokens that have no meaning. (\"Record the meaningful input tokens (and only the meaningful tokens\" - The Definitive ANTL[详细]
2023-03-05 08:13 分类:问答Producing squiggles using your abstract-syntax-tree
The situation: I have crafted a scanner, parser and various AST classes for a little used programming language, a hobby project of mine. The parser, with the help of the scanner, builds a heterogenou[详细]
2023-03-03 15:05 分类:问答
加载中,请稍侯......