Thanks for your answers, I now understand the stategy of lexers.
The left factoring you propose does not work better: because of the
'F' letter of the identifier following the minus sign, the
problem remains the same in the example '-FOO -FIN-' !
~/Soft/Antlr/LexJava: java Main test
line 1:2
Hi all
how to implement import statement (like in python: import sys) using
antlr grammar
i have got syntax recognition in examples but how the action should be
performed.
how the language is able to find that that file is there or not in the
library
any clues ?
help me
Thanks in advance
Siva
Hello!
I have a Bpp.g that successfully processed by antlrworks
antlrworks-1.3.1.jar, I can see parse tree. When I use generated parser and
lexer classes, my call to parser g.specification() always returns null, but
examples in internet show that there must be an object. My test code and
Bpp.g
Hello Jimi,
First thanks for your reply.
As you said, yes I'm really trying to enforce parsing paths.
What I've tried so far:
- Use int comparison instead or String comparison = KO
- Replaced {...}?= (gated semantic predicates) by {...}? (disambiguating
semantic predicates) = OK the switch has
Please read:
http://jira.codehaus.org/browse/MOJO-1014
That in mind, I've added the following lines in the antlr-3.2/pom.xml at
line 35:
scm
developerConnectionscm:svn:http://fisheye2.cenqua.com/browse/antlr/developerConnection
/scm
Now it works (at least, the tests are currently
On Tue, Dec 15, 2009 at 10:36 PM, Jim Idle j...@temporal-wave.com wrote:
You will need to bring the EQUALS up in to the rule and rewrite accordingly:
expression
:
ce=conditionalExpression
(
EQUALS e1=expression - ^(STORE $ce $e1)
| ao=assignmentOperator
Hi,
I'm using GUnit to test an ANLTR tree walker and it works very well.
However, the only way I've found to tell GUnit where my template file
resides is set the template library from within @init for the grammar
rule being tested. This has the obvious drawback of placing test code
within
Moins : '-' ( ('FIN-')='FIN-' { $type = FIN; } )?;
On Wed, 2009-12-16 at 11:39 +0100, Jean-Claude Durand wrote:
Thanks for your answers, I now understand the stategy of lexers.
The left factoring you propose does not work better: because of the
'F' letter of the identifier following the
Cool - thanks for that Loïc - I will update the build with this once I have
read the article.
Jim
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of
loic.lefe...@bnpparibas.com
Sent: Wednesday, December 16, 2009 5:40 AM
To: wclod...@los-alamos.net
Yes SWIFT parsing by hand is very easy (at least I've almost finished it
in 30 minutes).
But here come my problems with ambiguities to treat.
For example, we can have a tag named 53B; its format is [/1!a][/34x]#[35x]
which means:
- optionally (absolutely 1 upper case letter preceded by a /)
-
Hi Jim,
I am not constructing tree nodes myself. The test case I provided
contains a complete grammar that shows the problem. I'll reattach it to
this message. Also here's the relevant parts of my grammar:
Lexer/Parser:
tokens {
BLOCK;
}
file : trycatch+ EOF ;
trycatch : 'try'
I think that the problem is you are trying to use the gated predicate to
continue consuming. Instead just use action code and then the gated predicate
will just select the rule. Here is a working example:
grammar T;
aaa : rule+ EOF
;
rule
: classtok
| ident
;
classtok : CLASS;
Thanks Michael. added bug report with all info you sent.
http://www.antlr.org/jira/browse/ANTLR-418
Ter
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are
After days of headaches I have come to the conclusion that running bunches of
war apps on tomcat servers just isn't worth the hassle - in fact I am not sure
that they really work without someone to reboot the thing every day. Hudson
just runs out of memory, the plugins hang and it brings the
Marcin Rzeźnicki wrote:
2009/12/14 Marcin Rzeźnicki marcin.rzezni...@gmail.com:
2009/12/13 Jim Idle j...@temporal-wave.com:
This usually means that your lexer token numbers are out of sync with your
parser tokens. Regen in correct order and make sure all tokens have been
declared.
Umm, what
Loïc:
Thanks for the suggestion. It did fix the immediate problem, and, after being
reminded by subsequent failure that I need to sudo to override the default Mac
protections in /usr/local, I was able to get the process to run to completion.
As a minor point, with my aging eyes I had trouble
The include dependency should be protected because they are all #ifdef’ed,
but perhaps I broke something in this incarnation.
The basic problem is when a file includes B.h in the A-B-C chain. In the
middle of it B.h includes A.h. When A.h again tried to include B.h, #ifdef
has protected it. But
Yes. I think that the include series has got out of sync with recent
changes. I appreciate the constructive feedback more than you know -
it seems to be rare lately :)
Jim
On Dec 16, 2009, at 20:57, Gokulakannan Somasundaram
gokul...@gmail.com wrote:
The include dependency should be
There are a large number of ways to implement what you want and the devil is in
the details. I will assume that you will be dealing with a file system similar
to that on Window's/Linux/Mac and not an embedded system, or an old style
mainframe with an unusual file system.
Your implementation
19 matches
Mail list logo