grammar
Decorating parse tree using attribute grammar
Given the following attribute grammar for type declarations, I need to be able to produce a parse tree for any given string, for example \"A, B : C;\", and then decorate the tree.[详细]
2023-04-13 03:51 分类:问答ANTLR Is it possible to make grammar with embed grammar inside?
ANTLR: Is it possible to mak开发者_运维知识库e grammar with embed grammar (with it\'s own lexer) inside?[详细]
2023-04-12 22:04 分类:问答Java Grammar syntax analyzer (ASCII to graph)
I am developing an assistant to type database commands for DBAs, because these commands have many parameters, and an assistant will help a lot with their job. For this assistant, I need the grammar of[详细]
2023-04-12 06:44 分类:问答linear grammar with unequal number of 0s and 1s
Is it possible to come up with a linear grammar with unequal number of 0s and 1s? Su开发者_StackOverflow中文版ch as 0100, 01100, 111,1,0, 100101001...[详细]
2023-04-11 17:39 分类:问答How to transform postfix_expression in ANTLR C grammar to AST?
I\'m learning ANTLR by modifying the C grammar and trying something interests myself. The C grammar I started with is from: http://www.antlr.org/grammar/1153358328744/C.g[详细]
2023-04-11 13:13 分类:问答Bison/YACC - avoid reduce/reduce conflict with two negation rules
The following grammar (where INTEGER is a sequence of digits) gives rise to a reduce/reduce conflict, because e.g. -4 can be reduced by expr -> -expr or expr -> num -> -INTEGER. In开发者_JAVA技巧 my g[详细]
2023-04-10 10:24 分类:问答Remove unreachable rules from a grammar in OCaml
I\'m new to Ocaml and for a homework assignment I have to write a function filter_reachable that takes a grammar and returns a reduced grammar with the unreachable rules removed. The only modules I\'m[详细]
2023-04-10 07:58 分类:问答Structure of C language
Why does this work pr开发者_Python百科intf(\"Hello\" \"World\"); Whereas printf(\"Hello \"\"World\");[详细]
2023-04-09 22:53 分类:问答BibTex grammar for ANTLR
I\'m looking for a bibtex grammar in ANTLR to use in a ho开发者_开发百科bby project. I don\'t want to spend my time for writing ANTLR grammar (this may take some time for me because it will involve a[详细]
2023-04-08 02:22 分类:问答How ["03C0"] match <Ada Reference Manual>'s grammar in Annex P?
I\'m writing a tool to parse Ada source file with the grammar provided in2005 Annex P. With following piece of code, I know [\"03C0\"] stands for \"greek letter Pi\", but is it a legal variable name[详细]
2023-04-07 23:50 分类:问答