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
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
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
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
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
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
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
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 ?
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 =
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-
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
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:
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 :
13 matches
Mail list logo