Well, did you try the front page of the ANTLR Web site:
http://www.antlr.org/
Jim
> -Original Message-
> From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
> boun...@antlr.org] On Behalf Of Bill Cox
> Sent: Wednesday, November 11, 2009 12:42 PM
> To: antlr-inter...@antlr.org
Did you add the package statement to the @arser and @lexer header sections? The
output files will generated I the correct place, but you need to add the
package yourself, just like in Java.
Your best bet is to start here:
http://www.antlr.org/wiki/display/ANTLR3/Building+ANTLR+Projects+wi
Just add counters in the parser rules (scope probably), let there be any number
of them, then issue errors if the counts are wrong. You really don't want to do
things like this at the grammar level - the messages you will issue will be
confusing to users "Error at 'y', expecting '}'" leaves you
The numbers are probably not useful to you to be honest, but you could start
here:
http://en.wikipedia.org/wiki/Nondeterministic_finite_state_machine
if you are interested in what it all means. Generally you will be fine reading
the syntax diagrams and looking at generated code if you are
Do you have:
ASTLabelType=MyToken;
? I am thinking that you do have that and that is why you are getting the cast
problems right?
Jim
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of Bob Frankel
Sent: Tuesday, November 10, 2009 8:35 AM
Did you try using cardinality in your $e{n} references? Such as $e* $e+ etc? I
have not tried that, but it is what my first attempt at typing in would have
been ;-)
Jim
> -Original Message-
> From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
> boun...@antlr.org] On Behalf
Do you have a small(ish) reproducible example?
Jim
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of Claude Moulin
Sent: Tuesday, November 10, 2009 1:47 AM
To: antlr-inter...@antlr.org
Subject: [antlr-interest] Global Dynamic Scope
Hello,
It's not an infinite loop, it is waiting for you to type something in and press
CTRL-D or CTLR-Z. The input stream is System.in.
Jim
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of Fernando Freitas
Sent: Monday, November 09, 2009 9:45 AM
To: a
Actually it is because it thinks it is a documentation comment like Javadoc and
you can only have one. The new parsres we are working on will give better error
messages about such things.
If you used:
/* *
Then you won't get the issue - the lexer looks for /** at the comm
> -Original Message-
> From: franklinc...@cmu.edu [mailto:franklinc...@cmu.edu]
> > So first, here is your grammar rewritten without anything but
> standard rewrite rules (lexer skipped and compressed for space). You
> can see that this is somewhat, err... 'simpler' ;-)
> Unfortunately
Franklin,
So I spent some time debugging your parser and basically the problem is to do
with the way you are building the tree (well actually the problem might be the
syntax of the language you are parsing, but you probably don't control that
;-). The new tree stream is making some assumption
gt; -----Original Message-
> From: Loring Craymer [mailto:lgcray...@yahoo.com]
> Sent: Wednesday, November 04, 2009 11:13 AM
> To: Jim Idle; Antlr interest
> Subject: Re: [antlr-interest] Big grammar => static initializer/method
> size is exceeding the 65535 bytes limit
>
&g
11:05 AM
> To: Jim Idle; antlr-inter...@antlr.org
> Subject: Re: [antlr-interest] BNF to ANTLR
>
> Actually, this is easier to do automatically. Any BNF dialect takes
> about 2 pages for parser + lexer description of the BNF in ANTLR; it is
> very easy to write a translator
It looks like you are trying to produce a grammar from some kind of normative
spec and have made the classic mistake of trying to include context in the
expression of the grammar. The problem is that such specs are not written for
writing parsers with but more of an explanation of how things go
em, due to lots of static initializer
> code
> in the _parser_ class. Our solution was to apply some perl-skript
> magic,
> but if Alex Marin now proposes a built-in solution, that is only good
> for ANTLR.
>
> Andreas
>
> Jim Idle schrieb:
> > I think that t
Much better to do it by hand. ANTLRs EBNF notation is close, but remember that
ANTLR is LL() and not LALR, which most bnf definitions from normative specs are
aimed at. Use ANTLRWorks and build slowly and you should pick it up quite
quickly if you understand BNF well.
Jim
> -Original Mess
> but if Alex Marin now proposes a built-in solution, that is only good
> for ANTLR.
>
> Andreas
>
> Jim Idle schrieb:
> > I think that the issue is more likely something to do with your lexer
> specification. You should not need to worry about having lots of
> keywor
ller
than m [3]
To generate switches rather than tables.
But really, rejigging your parser will be a much better thing to do overall.
Jim
> -Original Message-
> From: Alex Marin [mailto:alex.ma...@amiq.ro]
> Sent: Wednesday, November 04, 2009 5:27 AM
> To: Jim Idle
&
lto:alex.ma...@amiq.ro]
> Sent: Wednesday, November 04, 2009 5:07 AM
> To: Jim Idle; Gerald Rosenberg
> Cc: Antlr interest; Etools; Adrian Simionescu
> Subject: RE: [antlr-interest] Bug report: Unexplainable "no viable
> alternative"
> Importance: Low
>
> Hello Jim, G
e just said p
> +=policyType and then, in the call policyType={$p} ? Are they equiv.?
>
>
>
> 2009/11/4 Jim Idle
> Because u+= means you are passing in a collection, not a
> StringTemplate reference.
>
> Jim
>
>
> On Nov 3, 2009, at 20:10, Nauman wrote:
>
>
Because u+= means you are passing in a collection, not a
StringTemplate reference.
Jim
On Nov 3, 2009, at 20:10, Nauman wrote:
> Dear all,
>
> I am having trouble understanding the difference between two methods
> for setting template attributes. Consider the following:
>
> policy: ^(POLICY
I think that the issue is more likely something to do with your lexer
specification. You should not need to worry about having lots of keywords, so
one of the other rules must be causing the huge expansion. For instance I have
problems with the complete lexer for TSQL, which has more keywords t
It isn’t a bug; this happens because your grammar is ambiguous without all
those myriad syntactic predicates. Take those all out and left factor your
rules so that there are no ambiguities. Also, remove that k=1 option and let
ANTLR work it out, then use ANTLRWorks syntax diagrams to work out wh
You have to supply a function that takes the token as defined by the expecting
element, perform a switch() on it and supply the text you really want. It is
pretty easy but there is no automated way to do it and if we had the alias
stuff that was in v2 it really doesn't save you any typing. Bett
This quite often happens because of a bad lexer that has an empty rule:
R : ;
This will currently generate code that just hangs trying to match nothing
forever. Then it will time out on the connection (which happens in the parser
not the lexer) and forever after, you will not be able to c
CSharp2 target works just fine, so perhaps you have not downloaded the .Net/C#
runtime for CSharp2 and added the .dlls as references to your project?
JIm
> -Original Message-
> From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
> boun...@antlr.org] On Behalf Of Andrew More
>
> rules, I get "Cannot display rule "X" because start state is not found"
>
> comment
> : !(DIGIT | LETTER | SPACE)*
> ;
Remove the ! from this rule. Looks like you are trying to type a v2 grammar
into AntlrWorks, which is for v3 grammars, which is probably what you should be
using
That isn't generally true, so I would need an example to investigate this :-)
Jim
> -Original Message-
> From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
> boun...@antlr.org] On Behalf Of Þðóøêèí Ìèõàèë
> Sent: Saturday, October 31, 2009 4:12 PM
> To: antlr-inter...@antlr.o
You don’t want to try and express this in the grammar at all, nor have
predicates etc as you will not get good error messages or recovery.
All you need do in fact is code the grammar to accept any number of each
option, keep track of how many you find and issue good semantic errors such as
how to remedy
> this?
>
> Thanks!
>
> -Original Message-
>
>
> Message: 1
> Date: Wed, 28 Oct 2009 15:14:47 -0700
> From: "Jim Idle"
> Subject: [antlr-interest] Getting started with ANTLR 3, IDEs and Maven
> To: "antlr-inter...@antlr.org&qu
desired archetype does not exist (org.antlr:antlr3-maven-
> archetype:1.0)
>
> Since I'm a Maven neophyte, can you offer a suggestion on how to remedy
> this?
>
> Thanks!
>
> -Original Message-
>
>
> Message: 1
> Date: Wed, 28 Oct 2009 15:14:4
Fold it up into the top rule like this:
decl : t=type
i+=ID
(
COMMA i+=ID
)* SEMI
-> ^(DECL $i $t)+
;
However, do you have some particular reason to make the tree look like that? It
is just as
Hi,
Prompted by a request earlier this week for a sample of how to use Antlr
grammars within IDEs and builds, I thought I would create a Maven Archetype
that can create a sample Antlr project seemingly out of thin air. If you are
willing to use Maven, or already do so, then this saves you a
Sources are now deployed - will take up to 4 hours for Maven central to pick
these up though.
Jim
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of Fady Moussallam
Sent: Wednesday, October 28, 2009 5:44 AM
To: antlr-inter...@antlr.org
Subject
Should have been there so I will check why they are not - I probably missed a
step in the release...
Jim
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of Fady Moussallam
Sent: Wednesday, October 28, 2009 5:44 AM
To: antlr-inter...@antlr.org
Sub
From: Mohamed Yousef [mailto:harrr...@gmail.com]
Sent: Tuesday, October 27, 2009 7:19 AM
To: Jim Idle
Subject: Re: [antlr-interest] [C Target] Bug in AST walking , implementing
control flow
2009/10/27 Jim Idle
It probably is a bug I am afraid. 3.2.1 will be a 'catch up'
No problem - I find it difficult to get too worked up about it. Now, that
example would be great if people would take the time to search past posts
before they posed a question here ;-)
Jim
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of Nave
The easiest way with Netbeans is to use a Maven build, which Netbeans has very
good built in support for. That way you just configure where the .g files are
and leave the rest to Maven, which will work both from the command line and
from the IDE (not just Netbeans IDE either).
It takes a bit o
It probably is a bug I am afraid. 3.2.1 will be a 'catch up' release to ensure
that everything works in C. You can make calls to LT() directly and so on
though.
For index and related properties you should use the method calls rather than
the fields directly, but if you know you will never ov
On Behalf Of Kaleb Pederson
> Sent: Monday, October 26, 2009 4:35 PM
> To: antlr-inter...@antlr.org
> Subject: Re: [antlr-interest] How to access member of CommonTree
> subclass
>
> On Monday 26 October 2009 04:18:21 pm Jim Idle wrote:
> ...
> > > I'm working with
> -Original Message-
> From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
> boun...@antlr.org] On Behalf Of Kaleb Pederson
> Sent: Monday, October 26, 2009 3:55 PM
> To: antlr-inter...@antlr.org
> Subject: [antlr-interest] How to access member of CommonTree subclass
>
> I'm
Have you tried looking on the Downloads page for ANTLR and downloading the .Net
runtime?
Jim
> -Original Message-
> From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
> boun...@antlr.org] On Behalf Of Bill Steer
> Sent: Monday, October 26, 2009 2:44 PM
> To: antlr-inter...@a
Here are some snippets from a tree parser using option output=template:
Straight creation from a rewrite and list:
statements
: s+=statement_comment*
-> statements(stats={$s})
;
Just passing a result up the rule chain (don't have rules return an empty $st):
rule
Easiest way to see this is to look at the generated code - it will make more
sense to you. But it means you have something like ( X Y Z)+ and have failed to
match any sequence of it. Look at where the exception is thrown and it will
show you where in your grammar this is happening. You can then
It is possibly out of sync with the debugging protocol. The 3.2.1 release is
intended to be a 'target sync up' release to catch up with everything that was
put in 3.2 for the release. I will make sure that debugging in C is working in
that release. However, I have always found it at least as us
Is this ANTLR 3.2?
Jim
> -Original Message-
> From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
> boun...@antlr.org] On Behalf Of Þðóøêèí Ìèõàèë
> Sent: Friday, October 23, 2009 3:21 AM
> To: antlr-inter...@antlr.org
> Subject: [antlr-interest] c target - bug
>
>
> line 20
This has been covered in previous discussions (use the search), but basically
you create tokens that look for dates using code that is sensitive to the
locale, which leaves you with a single lexer with a code based match rather
than pattern based match.
DATE : '#' // Assuming that you delim
list.
Jim
From: Sam Harwell [mailto:sharw...@pixelminegames.com]
Sent: Tuesday, October 20, 2009 10:26 PM
To: Jim Idle; antlr-inter...@antlr.org; stringtemplate-inter...@antlr.org
Subject: RE: [antlr-interest] Status of the CSharp3 target and my C# portsof
ANTLR and StringTemplate
The
This is also quite often caused by a poorly specified grammar (especially
lexers) causing lots lookahead and states etc. A good way to determine this is
to find the DFA in question in the generated source code and see what
decisions/rules it is handling. This should help you pin down where thing
Then you either need to avoid the toString() and use a writer, or see if there
is something wrong with your template that is causing infinite recursion etc.
Jim
From: Hieu Phung [mailto:phungngoch...@gmail.com]
Sent: Tuesday, October 20, 2009 11:10 AM
To: Jim Idle
Cc: antlr-inter
See pervious answer to this question...
Jim
> -Original Message-
> From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
> boun...@antlr.org] On Behalf Of yurush...@rambler.ru
> Sent: Monday, October 19, 2009 2:37 AM
> To: antlr-inter...@antlr.org
> Subject: [antlr-interest] [c
antlr-interest-boun...@antlr.org [mailto:antlr-interest-
> boun...@antlr.org] On Behalf Of David-Sarah Hopwood
> Sent: Tuesday, October 20, 2009 6:40 AM
> To: antlr-inter...@antlr.org
> Subject: Re: [antlr-interest] Semantic predicates
>
> Jim Idle wrote:
> > I don’t think that
OK - well we can add that easily enough J Why don't we try it?
Jim
From: Sam Harwell [mailto:sharw...@pixelminegames.com]
Sent: Tuesday, October 20, 2009 7:46 AM
To: Jim Idle; antlr-inter...@antlr.org; stringtemplate-inter...@antlr.org
Subject: RE: [antlr-interest] Status of the CS
@after only works with ANTLR 3.2. You can also use exception() with the C
target on 3.2
Jim
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of Ronghui Yu
Sent: Monday, October 19, 2009 3:03 PM
To: antlr-inter...@antlr.org
Subject: [antlr-interest
It is because you are trying to do things while you parse - another reason to
build a tree and THEN operate on the tree.
Catch does not need a type in the C target, you can just use:
r:
Ddd
;
catch() { }
(assuming 3.2 of ANTLR).
The other thing you might do is break up your rule list so
All you need do is accumulate the text in a stringbuffer:
( s=TOK { sbuf.append($s.text); }) +
Then use the string you have accumulated to set the text of an imaginary or
even the last TOK (which will be in s).
->IMAGINARY[sbuf.toString()]
Should work fine.
Jim
From: antlr-
Top posting for Sam's benefit ;-)
Not being able to use the Csharp3 target from the standard version of the tool
is going to be a turn off for many I think L What is it that your port of the
tool has that the standard version does not. I know you have posted some of
that, but perhaps we can
I don’t think that there any bugs here. The gated predicates work fine for me
(not that that means there are therefore no bugs ;-), but that it is more
likely there is a misuse going on somewhere in the grammar).
If you think that there is a bug then you should pin it down to a small piece
o
u...@gmx.de]
> Sent: Monday, October 19, 2009 12:08 AM
> To: Jim Idle; antlr-inter...@antlr.org
> Subject: Re: [antlr-interest] Which version do I need for a CSharp
> target and VS 2008
>
> > Johannes,
> >
> > Is there some trick to getting the CSharp2 runtime
11:19 PM
> To: Jim Idle; antlr-inter...@antlr.org
> Subject: Re: [antlr-interest] Which version do I need for a CSharp
> target and VS 2008
>
> > Not sure if the Csharp3 target is ready for production yet - I wanted
> to
> > ask this myself as I would like to switch
I really think you are beginning to make this way more complicated than it
really is. You need to step away from your current pursuit of predicates and so
on and go back to fundamentals. You are trying to get the parser to do way more
than parser should do. I know it is tempting because it seems
Normally I am in US Pacific, but this week and next I am in the India timezone.
Jim
From: Lego Haryanto [mailto:legoharya...@gmail.com]
Sent: Saturday, October 17, 2009 1:49 PM
To: Jim Idle
Cc: David-Sarah Hopwood; antlr-inter...@antlr.org
Subject: Re: [antlr-interest] ANTLR C: Question
: Lego Haryanto [mailto:legoharya...@gmail.com]
Sent: Thursday, October 15, 2009 8:27 PM
To: Jim Idle
Cc: antlr-inter...@antlr.org
Subject: Re: [antlr-interest] ANTLR C: Question regarding the portability of
generated lexer C code
Jim, thanks for your response ...
I know that in the EBCDIC system
009 11:57 AM
> To: antlr-inter...@antlr.org
> Subject: Re: [antlr-interest] ANTLR C: Question regarding the
> portability of generated lexer C code
>
> Jim Idle wrote:
> [...]
> > Change the ranges to:
> >
> > ID: ‘a’..’k’ | ‘l’..’t’ …
>
> I doubt that
as a gated predicate for your ID
rule.
Similar care with all your lexer rule specifications will result in EBCDIC
compatible, portable C code being generated.
Jim
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of Jim Idle
Sent: Sunday
You need to rewrite the unary operators with imaginary tokens in your parser,
which then means your tree parser need not care:
unary: PLUS unary -> ^(UPLUS unary)
| primary
;
Jim
> -Original Message-
> From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
> boun...@
Not sure if the Csharp3 target is ready for production yet - I wanted to ask
this myself as I would like to switch to it if it is ;-)
But I use Csharp2 as the target, and the runtime is on the download pages.
Jim
> -Original Message-
> From: antlr-interest-boun...@antlr.org [mailto:ant
Run Java with - Xmx1500M
Or some other option that increases available memory size. However this could
point to something that can be better organized in terms of recursion or
whatever.
You may also consider running Java with a better garbage collector such as:
-Xincgc
JIm
> -Original Message-
> From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
> boun...@antlr.org] On Behalf Of Bill Andersen
> Sent: Friday, October 16, 2009 1:22 AM
> To: antlr-inter...@antlr.org
> Subject: [antlr-interest] String template return val propagation
>
> Thanks in
Perhaps you guys are not asking the right questions. There is a tendency for
some people to jump straight in to huge grammars without the appropriate
practicing on smaller examples (which are provided). I try to answer everyone
if I can but I am travelling at the moment and don't have lots of sp
Well, you could pay me to make an EBCDIC version ;) However, there is in
practice no problem with mixing this – I have done it before on zOS.
I think that you need to look at this in the opposite light in that it isn’t
that ANTLR code isn’t portable, but your lexer specification (and the fact
directly I am
afraid.
So, compile the code with ASCII assumptions and feed the EBCDIC as 8 bit
Unicode and you will be fine.
Jim
From: Lego Haryanto [mailto:legoharya...@gmail.com]
Sent: Thursday, October 15, 2009 8:27 PM
To: Jim Idle
Cc: antlr-inter...@antlr.org
Subject: Re: [antlr
Yes you can do it - you probably need to keep state flags and either trigger
lexer rules based upon them or perhaps better would be to trigger an external
lexer. The main problem is error recovery - what does your lexer do if the
Javascript does not have perfectly matched '{' '}' and so the lex
There is. Please read the documentation otherwise there is little point in me
writing it ;-)
Jim
> -Original Message-
> From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
> boun...@antlr.org] On Behalf Of Indhu Bharathi
> Sent: Tuesday, October 13, 2009 4:28 PM
> To: Þðóøêèí
There is no such option in ANTLR 3.
If you want to use ANTLR 3 target, then read the documentation and also the
article on case insensitive parsing (which is in the Wiki), which tells you how
to do this. You may wish to read up on ANTLR 3 before starting though.
Jim
> -Original Message---
ANTLR works internally with 32 bit Unicode (UTF32), not EBCDIC, even if it is
in 8 bit mode. So you need to convert the EBCDIC to Unicode 8 bits and use the
‘ASCII’ input stream. A simple way to do this would be to write your own EBCDIC
input stream that just converted to Unicode code points (es
LO LE and PURETEXT are ambiguous - you should eb getting warnings about that
(which yuou should not ignore).
Jim
> -Original Message-
> From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
> boun...@antlr.org] On Behalf Of Martin Potier
> Sent: Monday, October 12, 2009 5:59 P
What version of HPUX is this? I have it fixed for the versions I have come
across I think. HPUX is such a bag of nails; it is always the odd man out.
Jim
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of Hugo Picado
Sent: Monday, October 12, 200
Cool contribution - perhaps the first for the C target :-)
Jim
> -Original Message-
> From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
> boun...@antlr.org] On Behalf Of Terence Parr
> Sent: Saturday, October 10, 2009 3:23 AM
> To: Ales Teska
> Cc: antlr-inter...@antlr.org
>
27;s okay to let a few illegal
> >constructs through and catch them further down the line. I was
> >just hoping that I would be able to easily write a tighter
> >grammar.
>
> As Jim Idle is fond of pointing out, it's often better to make the
> grammar fairly t
Yes - you have to special case it. However, you only ever come across this
while developing really ;-)
Jim
> -Original Message-
> From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
> boun...@antlr.org] On Behalf Of Ales Teska
> Sent: Thursday, October 08, 2009 5:33 PM
> To:
Sent: Thursday, October 08, 2009 5:21 PM
> To: Gavin Lambert; Jim Idle; antlr-inter...@antlr.org
> Subject: RE: [antlr-interest] MSBUILD/Vs2008
>
> I thought about that, but then you run into a problem if you want the
> generated source files visible in your project. As soon as you a
I think that the OP meant is there a set of grammars that parse C++, but are
written for ANTLR v3 rather than v2? As far as I know, the answer is no. C++ is
not the easiest thing to parse and it cannot be done purely with grammar.
Jim
> -Original Message-
> From: antlr-interest-boun...
True
True
ANTLRTreePrinter.g3
ANTLRTreePrinter.g3
Sam
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of Jim Idle
Sent: Wednesday, October 07, 2009 1:15 PM
To: antlr-inter...@antlr.org
Subject: [antlr-interest]
Has anyone worked out the exact configuration for MSBUILD instructions for
adding in to csproj files in VS2008 with the C# target? The Wiki version may
have worked fine for VS2005 but in VS2008 it does not encapsulate dependencies
properly and the .cs files get compiled before the .g files, whic
Debug should work OK from a parser but tree parser debugging probably isn't too
hot. Up to press nobody has really needed to use it. The trace option isn't
really implemented but the conditionals are still in the template so that I can
come back to it some day. In general I find it more useful
Actually, your approach is wrong here. What you want to aim at in the parser is
to accept all the syntax that can possibly be good but if it is not, can be
rejected using semantic checks later. This is because a good semantic error
such as "not able to use 'v2' when you utilize 'b'" is much more
Download the examples tar and look at the tree parsers in the C examples :-)
Jim
> -Original Message-
> From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
> boun...@antlr.org] On Behalf Of Heiko Folkerts
> Sent: Tuesday, October 06, 2009 5:15 AM
> To: antlr-inter...@antlr.org
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-
as a root node for each element of a
compound and you probably only need the imaginary as a root for the whole
reference.
Jim
From: antlr_bill [mailto:antlr_b...@yeah.net]
Sent: Sunday, October 04, 2009 10:07 AM
To: Jim Idle
Cc: antlr-inter...@antlr.org
Subject: [SPAM] Re:Re: [antlr
a: b -> ^(V b) ;
b : part (DOT^ part )* ;
part: ID( ABC )? ;
Jim
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of antlr_bill
Sent: Sunday, October 04, 2009 8:56 AM
To: antlr-inter...@antlr.org
Subject: [antlr-interest] help on rewrittin
It's just Java, so:
Java -jar \path\to\downloaded\jar\antlr-3.2.jar mygrammar.g
please read the instructions on the Wiki.
Jim
> -Original Message-
> From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
> boun...@antlr.org] On Behalf Of Charles Jenkins
> Sent: Saturday, Octobe
Wiki - front page - lexing for dot, range, .
http://www.antlr.org/wiki/display/ANTLR3/Lexer+grammar+for+floating+point%2C+dot%2C+range%2C+time+specs
This grammar also caters for 999.toString() type things as it comes from JavaFX.
Jim
> -Original Message-
> From: antlr-interest-boun
You don't need to do that. There is a user field in the COMMON_TREE node that
you can use to store a pointer to your own data - this is much simpler. If you
use a custom node, it must really embed COMMON_TREE, which embeds BASE_TREE.
Each of these has super pointers to the larger structure but
You would have to use ((object object)=>object)? Which is expensive and is
using a hammer to crack a nut ;-)
Jim
From: antlr-interest-boun...@antlr.org
[mailto:antlr-interest-boun...@antlr.org] On Behalf Of Naveen Chawla
Sent: Thursday, October 01, 2009 5:24 AM
To: Gavin Lambert
Cc: antlr
You are trying to be too literal and imply context in the rules. Complement has
an optional indirectObject, which is a nounPhrase, followed by an object, which
is also a nounPhrase, don't use two rule to ask for the same token sequence and
then make one of them an optional lead in. Use object ob
On 09/30/2009 06:03 AM, Юрушкин Михаил wrote:
> How to change "#include " in generated .h parser file?
> can i change this path in grammar options?
>
>
You don't - just use teh correct -I option on the compile line.
Jim
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
htt
On 09/30/2009 02:47 AM, Luca Li Greci wrote:
>
> You said that when the grammar is under src/main/antlr3* *the maven
> plugin automatically picks up all grammar defined under any
> subdirectories (such as org/mycompany/myproduct) so that the maven
> parameters include, lib, and the @parser::head
On 09/30/2009 02:46 AM, Luca Li Greci wrote:
>
>
> 2009/9/29 Jim Idle <mailto:j...@temporal-wave.com>>
>
> On 09/29/2009 12:35 PM, Luca Li Greci wrote:
>>
>>
>>
...
>
>
> Hi - you should avoid setting up your own structure under sou
On 09/29/2009 12:35 PM, Luca Li Greci wrote:
>
>
> org.antlr
> antlr3-maven-plugin
> 3.1.3-1
>
>
> parser
> generate-sources
>
> antlr
>
>
> src/main/resources/antlr3
> src/main/resources/antlr3*/org/mycompany/myproduct*
> target/generated-sources/antlr3
>
> ***/myGrammar*.g*
>
>
>
>
>
1 - 100 of 818 matches
Mail list logo