Try using Console.WriteLine() instead of System.out.println(). What is
inside of the curly braces is directly injected into the C# code being
generated, and therefore needs to be C# syntax, not Java.
- Justin
On 10/19/2011 2:25 PM, Voelkel, Andy wrote:
Hi,
First, thanks for the
I think that your suspicions are correct. Complex predicates lead to
complex lookahead, and complex keyword matches in the lexer lead to lots
of function calls. Simplifying these things wherever you can will help.
Because you are only having this problem with limited resources, it
means that
Hi Jim,
I'm not trying to rush you or anything, but I am wondering if you have
an estimate for the release of the 3.4 C runtime. I'd like to use it in
our next release, and with deadlines approaching it would be helpful to
know if I'll have time to fit it in or not.
Thank you!
- Justin
These two archives are identical, except for the name. I did a diff of
http://antlr.org/download/antlr-3.4.tar.gz\antlr-3.4.tar\antlr-3.4\runtime\C\dist\libantlr3c-3.4.tar.gz\libantlr3c-3.4.tar\libantlr3c-3.4\
and
As Jim pointed out, your problem with tokens showing up in error
messages as invalid is because you just inlined lexer tokens (in your
type rule) without giving them a name. Try making two real lexer rules
with the names you would like to see:
INT : 'int';
FLOAT : 'float';
type : INT | FLOAT;
-interest-
boun...@antlr.org] On Behalf Of Justin Murray
Sent: Thursday, July 21, 2011 10:19 AM
To: antlr-interest@antlr.org
Subject: Re: [antlr-interest] [C target] Warnings in 64-bit compile
Hi Jim,
I think I tracked down and fixed this bug in the C target template.
Attached is the patched
I think that Vlad may be onto something here. From what I can tell from my
generated grammar, this only affects ANTLR3_MISMATCHED_SET_EXCEPTION type
exceptions. My grammar has several hundred parser rules, but only in 4 cases is
a ANTLR3_MISMATCHED_SET_EXCEPTION generated. In all 4 cases, the
Hi Jim,
On 6/24/2011 12:42 PM, Jim Idle wrote:
Please note that the documentation for the C runtime in 3.4 is yet to be
updated. In the meantime, if you wish to try it, then there is one change
that you need to be aware of:
1) The distinction between ASCII and UCS2 input streams is
I gave antlr-3.4-complete-no-antlrv2.jar a try, and it appears to be
working perfectly with my v3.3 grammar! Great work as usual guys.
-- Justin
On 7/20/2011 3:30 PM, Terence Parr wrote:
Hi,Before I announce 3.4 release, can somebody try out these jars just make
sure everything is cool? The
Decided to give this a run on my C-target grammar. I'm getting the
following error:
1 [exec] org\antlr\grammar\v3\DefineGrammarItemsWalker.g: node from
line 290:15 required (...)+ loop did not match anything at input
'end-of-alt'
1 [exec] error(10): internal error: c:\...\Aerobasic.g
that you don't use these but left factor your grammar. However, I
will fix it of course.
Jim
-Original Message-
From: Justin Murray [mailto:jmur...@aerotech.com
Hi Jim,
Would you mind elaborating on this just a bit? You bring up this same
concept quite frequently on this list, but there is something that I am
missing. I understand how matching more generically in earlier stages
will lead to better error message in later stages, but this seems to me
Jim,
I have a question regarding your comment on case insensitivity. I have
been using the slowest case insensitive lexer technique, as this is
the first I have seen a viable alternative (on the page that you linked
to). The grammar I am working with is a bit strange in that all of the
this that I then have to write a bunch of C code that
essentially parses the string again.
So I am looking for some advice on the best way to approach this
problem. If anyone has done something similar before, I would appreciate
any suggestions that you have for me.
Much thanks,
Justin Murray
jmur
Hi Richard,
The answer is to use 2 lexer rules instead of one, and change the parser
rule. It is generally not a good idea to mark whitespace as hidden (as
you have done), and also use whitespace in your lexer rules. Here is
what I would try:
grammar testing;
start :
( DOLLAR?
These are called Semantic Predicates. Section 12.1 in TDAR.
Specifically, look at page 295 of the PDF. If the predicate evaluates to
false, the alternative is effectively switched off.
- Justin
On 2/11/2011 1:04 PM, Olivier Lefevre wrote:
Great! Not to abuse but would you know in which
Hi Bastian,
I have been using the C target for some time now. The lexer tokens are
#define statements that can be found in both the generated lexer and
parser .h files. Look for this heading in xxxParser.h:
/** Symbolic definitions of all the tokens that the parser will work with.
- Justin
On
, is there a tenative release date for the C runtime that
will officially support ANTLR 3.3 (it seems that the code generated by
ANTLR 3.3 works ok with the 3.2 C runtime)?
Thanks,
Justin Murray
Software Engineer
jmur...@aerotech.com
Aerotech, Inc.
101 Zeta Drive
Pittsburgh, PA 15238
412-963-7470
-
boun...@antlr.org] On Behalf Of Justin Murray
Sent: Tuesday, December 28, 2010 11:59 AM
To: antlr-interest@antlr.org
Subject: [antlr-interest] [C target] Warnings in 64-bit compile
Jim,
I am working on making our compiler support 64-bit builds, and have
run
into a number of compiler
cause the lengthy
hangup on that one decision? The rest of the decisions go by very
quickly.
Thanks,
Justin Murray
Software Engineer
jmur...@aerotech.com
Aerotech, Inc.
101 Zeta Drive
Pittsburgh, PA 15238
412-963-7470
List: http://www.antlr.org/mailman/listinfo/antlr-interest
to make them more unique, while
preserving the nice, readable grammar definition file?
Thank you,
Justin Murray
Software Engineer
jmur...@aerotech.com
Aerotech, Inc.
101 Zeta Drive
Pittsburgh, PA 15238
412-963-7470
List: http://www.antlr.org/mailman/listinfo/antlr-interest
, December 10, 2010 12:02 PM
To: Justin Murray
Cc: antlr-interest@antlr.org
Subject: Re: [antlr-interest] ANTRL 3.3
hi. that's telling you to fix the decision associated with that spewing
of conversion notes.
Ter
On Dec 10, 2010, at 6:51 AM, Justin Murray wrote:
Hello,
I am currently
@antlr.org
Subject: Re: [antlr-interest] ANTRL 3.3
C target is not ready for 3.3 yet, wait for 3.3.1.
Jim
-Original Message-
From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
boun...@antlr.org] On Behalf Of Justin Murray
Sent: Friday, December 10, 2010 6:52 AM
To: antlr
23 matches
Mail list logo