[il-antlr-interest: 34826] [antlr-interest] Accepting Erroneus Code in AST construction

2011-11-10 Thread Hans-Georg Winkler
Hello, i'm currently writing a Pascal like language grammar for an editor with intellisense like features. It is important that the tree is constructed roughly correct despite possible errors in the code. Thats the point where i'm facing some issues with my ANTLR parser. I already solved some

[il-antlr-interest: 34827] Re: [antlr-interest] Fundamental question

2011-11-10 Thread Mari Matinlassi
Jim, Ian, Thanks for pointing me to missing EOF. However, it did not .. kind of.. solve my problem. Resulting tree will now (after adding EOF and with same input) be int test ; missing EOF Whereas, I would _like to have_ a tree something like below: int test; error int variable; string here;

[il-antlr-interest: 34828] Re: [antlr-interest] Accepting Erroneus Code in AST construction

2011-11-10 Thread Mari Matinlassi
Hans-Georg, A very relevant problem. ANTLR collapses my AST completely to a single error token if some kinds of mismatches happen. I would also like to know if a solution is found.. -mari -Original Message- From: antlr-interest-boun...@antlr.org

[il-antlr-interest: 34830] [antlr-interest] grammar works in antlrworks debug mode but not eclipse

2011-11-10 Thread D. Frej
Hi, I created a grammar with the latest antlrworks. With antlrworks' debug functionality I tested the grammar. For proper throughout testing I copied the generated Lexer and Parser code to my eclipse project. The only change I made to the code was to add a package declaration. However, when I

[il-antlr-interest: 34832] Re: [antlr-interest] Fundamental question

2011-11-10 Thread Jim Idle
Take a look at: http://www.antlr.org/wiki/display/ANTLR3/Custom+Syntax+Error+Recovery as it may help. This is also useful for the other person asking about AST construction on errors, though in the end that probably comes down to custom coding. Jim -Original Message- From: Mari

[il-antlr-interest: 34833] Re: [antlr-interest] grammar works in antlrworks debug mode but not eclipse

2011-11-10 Thread Jim Idle
There is not enough information here for anyone to help. What do you mean by only some rules works but not all? They give syntax errors? Lexer? Parser? Exception? etc. Jim -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- boun...@antlr.org] On Behalf

[il-antlr-interest: 34834] Re: [antlr-interest] Removing output=AST lets ANTLR fail to generate

2011-11-10 Thread Christian
Well, can anyone (of the developers) answer please? Hi community, it seems that ANTLR cannot generate the lexer and parser if output=AST is removed, but the operators and rewrite rules are still left in the grammar. Am I right? If yes, that's really regrettable...and unflexible. You could

[il-antlr-interest: 34835] Re: [antlr-interest] grammar works in antlrworks debug mode but not eclipse

2011-11-10 Thread David Wood
Do you have multiple JVMs installed and are you sure the one used by Eclipse is the same as that used at the command line? David Wood Computing Systems for Wireless Networks IBM TJ Watson Research Center daw...@us.ibm.com 914-784-5123 (office), 914-396-6515 (mobile) From: Jim Idle

[il-antlr-interest: 34836] [antlr-interest] How to interpret the text DFA

2011-11-10 Thread yushang
Hi , everyone, I'm testing the following grammar INT :('0'..'9')+ ; FLOAT :('0'..'9')* '.' INT ; and get the follwing DFAs DFA d=1 .s0-'0'..'9'-:s2=1 .s0-EOT-:s1=2 DFA d=2 .s0-'.'-:s2=2 .s0-'0'..'9'-:s1=1 DFA d=3 .s0-'.'-:s3=2 .s0-'0'..'9'-.s1 .s1-'.'-:s3=2

[il-antlr-interest: 34837] [antlr-interest] Line number on error is not displayed

2011-11-10 Thread Christian
Due to the rule in line 734 field_declaration : variable_declarators[$t] ';' - ^(FIELD_DECL variable_declarators) ; the ANTLR compiler generates the error /C#ToKDM/grammars/CsRewriteRules.g:0:: attribute is not a token, parameter, or return value: t 1 error with a wrong line

[il-antlr-interest: 34838] [antlr-interest] Fwd: How to interpret the text DFA

2011-11-10 Thread Eric
-- Forwarded message -- From: Eric researcher0...@gmail.com Date: Thu, Nov 10, 2011 at 2:04 PM Subject: Re: [antlr-interest] How to interpret the text DFA To: yushang yus...@gmail.com On Thu, Nov 10, 2011 at 12:50 PM, yushang yus...@gmail.com wrote: Hi , everyone, I'm

[il-antlr-interest: 34839] [antlr-interest] Fwd: Common Prefix question

2011-11-10 Thread Eric
-- Forwarded message -- From: Eric researcher0...@gmail.com Date: Thu, Nov 10, 2011 at 9:55 PM Subject: Re: [antlr-interest] Common Prefix question To: Alexander Kaiser alexander.g.kai...@gmail.com On Mon, Nov 7, 2011 at 3:56 PM, Alexander Kaiser alexander.g.kai...@gmail.com

[il-antlr-interest: 34840] Re: [antlr-interest] Antlr3.4 Python bugs, workarounds

2011-11-10 Thread Benjamin S Wolf
On Thu, Nov 10, 2011 at 10:05 AM, Rampon Jerome ramponjer...@yahoo.fr wrote: Hi Ben, I have seen this message below on the web. I add similar issues with python target on 3.4 (I did not try with 3.3 for ex) for an HDL grammar (pretty large) The elif keyword was split as you mentionned.