[il-antlr-interest: 34196] Re: [antlr-interest] [C] code to change Token type, use char* and loose data when buffer destroyed

2011-09-28 Thread Ruslan Zasukhin
Hi Jim, What you think about this idea to resolve everything on the LEXER level? So we must resolve tokens as * STRING_LITERAL 'aa' * STRING_LITERAL 'aa' ws* 'bb' = Token( aabb ) * STRING_LITERAL 'aa\'bb' = Token( aa'bb ) * STRING_LITERAL

[il-antlr-interest: 34200] [antlr-interest] ANTLR runtime logging. System.err messages from antlr

2011-09-28 Thread Luchesar Cekov
Hi guys, My ANTLR parser is pretty mature now and working in production for a long time. The only thing that's bothering me is I am getting lots of System.err logging like this: line 0:-1 mismatched input 'EOF' expecting EOR line 0:-1 mismatched input 'EOF' expecting EOR line 0:-1 mismatched

[il-antlr-interest: 34202] [antlr-interest] Csharp target, Recover(input, e)

2011-09-28 Thread Mari Matinlassi
Hi, I am doing a grammar for C sharp target. I have following problem, I need help with… When parser input contains unexpected character, let´s say ‘*’ or ‘’ that is not defined in any lexer/parser rule or token, happens the following: 1. RecognitionException (subtype

[il-antlr-interest: 34203] Re: [antlr-interest] [C] code to change Token type, use char* and loose data when buffer destroyed

2011-09-28 Thread Jim Idle
You can of course process things anywhere that it does not cause ambiguity but the best approach is to defer any processing that you can until the last point in time, so that you do not process anything that you find you don't actually need to. The second 'rule' is that you only want to process

[il-antlr-interest: 34204] Re: [antlr-interest] ANTLR runtime logging. System.err messages from antlr

2011-09-28 Thread Jim Idle
This means that your lexer has bugs in it and is not catering for all situations. Just use the input that is causing this to find out what it wrong with your lexer. Jim -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- boun...@antlr.org] On Behalf Of

[il-antlr-interest: 34205] Re: [antlr-interest] Csharp target, Recover(input, e)

2011-09-28 Thread Sam Harwell
I've never seen this occur before. Can you send me a project with a grammar and input that exhibits this? Thanks, Sam -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-boun...@antlr.org] On Behalf Of Mari Matinlassi Sent: Wednesday, September 28, 2011

[il-antlr-interest: 34206] Re: [antlr-interest] Csharp target, Recover(input, e)

2011-09-28 Thread Mari Matinlassi
Ok. In a separate email. Mari -Original Message- From: Sam Harwell [mailto:sharw...@pixelminegames.com] Sent: Wednesday, September 28, 2011 6:17 PM To: 'Mari Matinlassi'; antlr-interest@antlr.org Subject: RE: [antlr-interest] Csharp target, Recover(input, e) I've never seen this occur

[il-antlr-interest: 34207] [antlr-interest] problem with parser

2011-09-28 Thread jame vaalet
hi, below is my tree grammar: tokens { COMMA=','; LPAREN='('; RPAREN=')'; } start : (NUMBER^ COMMA NUMBER)|WORD^; WORD : ~(WHITESPACE|LPAREN|RPAREN)+ ; WHITESPACE : ('\t'|' '|'\r'|'\n'|'\u000C'); NUMBER : DIGIT+; fragment DIGIT : '0'..'9' ; when my input is 1,2 which one is it gonna match ?

[il-antlr-interest: 34208] [antlr-interest] C-target 3.2 : getParent returns invalid pointer

2011-09-28 Thread A Z
Hello All, I'm trying to run a tree parser on part of a tree and then delete that sub-tree but I can't get the parent of the node that needs to be deleted. //For each i in pPackageList pANTLR3_BASE_TREE thisNode = pPackageList-at(i); pANTLR3_BASE_TREE parentNode =

[il-antlr-interest: 34209] Re: [antlr-interest] C-target 3.2 : getParent returns invalid pointer

2011-09-28 Thread Jim Idle
Can't tell without seeing your code I am afraid, have you traced the pointers in the debugger? Checked that your i is correct? What does runPackageTree do? What does thisIndex look like? etc Jim -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-

[il-antlr-interest: 34210] Re: [antlr-interest] Jim Idle: C-Runtime and ANTLRWorks - debugging grammars

2011-09-28 Thread Udo Weik
Hello Jim, Yes - it should be working already, so I am not sure what the problem is. However, it is just as easy to use the C debugger for most tasks in case you did not try that yet. I'm looking for basic examples, e. g. using the ANTLR3_DEBUG_EVENT_LISTENER_struct. Many thanks and

[il-antlr-interest: 34212] Re: [antlr-interest] Jim Idle: C-Runtime and ANTLRWorks - debugging grammars

2011-09-28 Thread Jim Idle
Oh - you don't do anything with that, that is for ANTLR works. You generate with the -debug option, then compile as normal. When you run the parser it will appear to hang, then use ANTLRWorks to load the grammar file and Debug remote to localhost. Jim -Original Message- From:

[il-antlr-interest: 34214] Re: [antlr-interest] problem with parser

2011-09-28 Thread Kevin J. Cummings
On 09/28/2011 02:50 PM, jame vaalet wrote: hi, below is my tree grammar: tokens { COMMA=','; LPAREN='('; RPAREN=')'; } start : (NUMBER^ COMMA NUMBER)|WORD^; WORD : ~(WHITESPACE|LPAREN|RPAREN)+ ; WHITESPACE : ('\t'|' '|'\r'|'\n'|'\u000C'); NUMBER : DIGIT+; fragment DIGIT :