antlr
ANTLR: How to replace specific nodes in a subtree using a Tree grammar?
I have an ANTLR grammar which creates an AST, and then I have written two tree grammars that create tree parsers for doing two passes on the AST for semantic analysis purposes. (After that I do anothe[详细]
2023-03-30 20:18 分类:问答ANTLR - The following alternatives can never be matched
I am unable to understand why this simple grammar - grammar Test; file:ID; ID:.*; leads to this error - Test.g:3:6: The follo开发者_开发问答wing alternatives can never be matched: 1[详细]
2023-03-30 12:07 分类:问答Vhdl parser on C#
I need to make a vhdl parser. I decided to use the antlr parser generator and the vhdl grammar from their website http://www.antlr.org/grammar/1202750770887/vhdl.g.[详细]
2023-03-30 10:33 分类:问答antlr3 c# code generation
I\'m able to successfully generate C# code (CSharp2) for my gra开发者_如何学JAVAmmar written using ANTLRWorks. But I would like to do the same without all the debug statements that are generated by de[详细]
2023-03-30 06:57 分类:问答ANTLR ClassCastException
Why do I get this error开发者_Go百科 while generating code in ANTLR? [16:06:38] error(10):internal error: C:\\Users\\user\\Desktop\\test.g : java.lang.ClassCastException: org.antlr.runtime.tree.Commo[详细]
2023-03-29 12:48 分类:问答ANTLR: Define new channel in grammar
I know it is possible to switch between the default and hidden token channels in an ANTLR grammar, but lets say I want a third channel. How can I define a new token channel in the gramar?For instance,[详细]
2023-03-29 07:00 分类:问答ANTLR antlrWorks error messages are not displayed to the output console
When enter the following input with an error at the third line: SELECT entity_one, entity_two FROM myTable;[详细]
2023-03-28 23:05 分类:问答Parse comment line
Given the following basic grammar I want to understand how I can handle comment lines. Missing is the handling of the <CR><LF> which usually terminates the comment line - the only exceptio[详细]
2023-03-28 19:57 分类:问答ANTLR Matching all tokens except
Is there any way to match a token in antlr except a specific one? I have a rule which states that a \'_\' can be an ID. Now I have a specific situation in which I want to match an ID, but in this par[详细]
2023-03-28 14:24 分类:问答Multiple alternatives with the same label, only the last gets anything assigned to it
I have some non-reserved keywords I\'m matching with rules like: kFOO = {self.input.LT(1).text.lower() == \'foo\'}? ID;[详细]
2023-03-28 06:55 分类:问答