Is it possible to write a separate program to break the PGN files into
separate games and pass each game to the lexer/parser? That will be a simple
solution assuming there is an easy way to split games in a PGN file.
-Original Message-
From: antlr-interest-boun...@antlr.org
[mailto:antlr
> Then you have something wrong in one of your rules. Specifically, you
> have a line that says "progName = $program_stmt.progName" in the wrong
> place, or using the wrong syntax; ANTLR is trying to treat it as a
> predicate instead of an action. This also might explain why the
> debugg
It feels a little redundant, but I think that is the right solution.
On Mon, Oct 5, 2009 at 4:18 AM, Indhu Bharathi wrote:
> Is it possible to write a separate program to break the PGN files into
> separate games and pass each game to the lexer/parser? That will be a simple
> solution assuming
If I do
(a ~b)=> a
meaning "take this alternative if you encounter an a when not followed by b"
I get a syntax error: unexpected token b
Is it the right syntax to use '~'?
N
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Bear in mind that the on-disk representation of a data structure is most likely
more efficient than the in-memory representation. So if you intend to load the
entirety of your 1GB file into memory, you will probably be using more than 1GB
of memory. This can be a problem on Win32 systems where
I wish "Decision can match input such as ... using multiple alternatives"
would show the whole phrase that raises the ambiguity, and not just the
token.
Is there an easy way to find this out?
Would it be easy for it to be introduced into ANTLR, or do I always have to
see only the token every time
Try something like:
(a)=> ((b)=>/*nothing*/ | a)
I remember facing similar problem. I guess you can't use '~' in a syntactic
predicate.
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of Naveen Chawla
Sent: Monday, October 05, 2009 7:32 PM
T
ANTLRWORKS already has this feature. Compile your grammar in ANTLRWORKS.
When there is an ambiguity, the rule will be marked in red and you can check
the "Syntax diagram" tab to graphically see the ambiguity.
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On
Yes but unfortunately the syntax diagram shows only the path surrounding
that particular token. Not the phrase which raises that ambiguity. I'm happy
with the syntax diagram as it is, just want to know the preceding phrase
which raises that ambiguity. I wonder if this is actually impossible for the
HOT SEXY NUDE GIRLS NICE VIDEOS
http://www.banatmsr.com/uplod
http://www.banatmsr.com/uplod
http://www.banatmsr.com/uplod
http://www.banatmsr.com/uplod
~úú}}}~}}}
xxx vedio chat
http://www.banatmsr.com/uplod
http://www.banatmsr.com/uplod
http://www.banatmsr.c
Ok, so I found out that if you want it bound to the latest thing, that is
the "greedy" option, fortunately that is the way ANTLR automatically
resolves such ambiguities by default. According to p.276 ch.11 "The
Definitive ANTLR Reference": "ANTLR generates a warning, but you can safely
ignore it".
Use a semantic predicate rather than syntactic. You possibly need a bated
predicate here too:
{ input.LA(1) == A && input.LA(2) != B}?=>
However, if you need that kind of syntactic predicate, then I suggest you may
be approaching your problem incorrectly.
Jim
From: antlr-interest-
I have a grammar that contains the following production:
objectMember : functionExpression | ID;
The unit tests for the above production, however, sometimes passed and
sometimes failed. After some investigation, I found that the reason
for the failure was that EOF wasn't in the expected follow
At 10:48 5/10/2009, =?koi8-r?B?4NLV28vJziDtycjBycw=?= wrote:
>I used your grammar (with small modification). the same
result...
Don't forget to use Reply All to keep replies on-list...
>1) I generate lexer and parser using -debug option.
>2) I run my project. It starts to listen antlrworks (
On Mon, Oct 5, 2009 at 7:16 AM, Mark Boylan wrote:
> It feels a little redundant, but I think that is the right solution.
>
Assuming you have something like: game_list: game*;
Couldn't you do that in the lexer/parser? Just don't match EOF on the
start rule? That you can just have something li
15 matches
Mail list logo