[il-antlr-interest: 26083] Re: [antlr-interest] Out of Memory

2009-10-05 Thread Indhu Bharathi
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

[il-antlr-interest: 26084] [antlr-interest] [c target] debugging using antlrworks

2009-10-05 Thread Юрушкин Михаил
> 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

[il-antlr-interest: 26085] Re: [antlr-interest] Out of Memory

2009-10-05 Thread Mark Boylan
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

[il-antlr-interest: 26086] [antlr-interest] How to do "not" in a syntactic predicate?

2009-10-05 Thread Naveen Chawla
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

[il-antlr-interest: 26087] Re: [antlr-interest] Out of Memory

2009-10-05 Thread Gordon Tyler
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

[il-antlr-interest: 26088] [antlr-interest] A wish

2009-10-05 Thread Naveen Chawla
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

[il-antlr-interest: 26089] Re: [antlr-interest] How to do "not" in a syntactic predicate?

2009-10-05 Thread Indhu Bharathi
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

[il-antlr-interest: 26090] Re: [antlr-interest] A wish

2009-10-05 Thread Indhu Bharathi
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

[il-antlr-interest: 26091] Re: [antlr-interest] A wish

2009-10-05 Thread Naveen Chawla
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

[il-antlr-interest: 26092] XXXX VIDEOS

2009-10-05 Thread XXXX VIDEOS
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

[il-antlr-interest: 26093] Re: [antlr-interest] Enforcin g a right associativity, to resolve an ambiguity (simple gram mar included)

2009-10-05 Thread Naveen Chawla
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".

[il-antlr-interest: 26094] Re: [antlr-interest] How to do "not" in a syntactic predicate?

2009-10-05 Thread Jim Idle
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-

[il-antlr-interest: 26095] [antlr-interest] Unit testing grammar productions and injecting EOF

2009-10-05 Thread Kaleb Pederson
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

[il-antlr-interest: 26096] Re: [antlr-interest] [c target] debugging using antlrworks

2009-10-05 Thread Gavin Lambert
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 (

[il-antlr-interest: 26097] Re: [antlr-interest] Out of Memory

2009-10-05 Thread Kirby Bohling
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