Hi John,
On Tue, Nov 15, 2011 at 11:46 PM, John B. Brodie j...@acm.org wrote:
Greetings!
...
I do not think you want to recognize floating point values in the
parser. any tokens you send to the HIDDEN $channel (or skip();) will be
silently accepted before and after the '.' of the float.
Hi Jim,
I have spent 2 days running around this, and now I am ready describe what I
see, to get your help, and it seems exists bug/leaks in reuse() area. Or I
not correctly use it, but I do as you described in single letter 3 months
ago.
So ... Long story :-)
* I have simple bench that do 100K
I am still fairly new to antlr and when looking at the 1.6 Java grammar I
noticed the following statement rule:
statement
: block
| ('assert'
)
expression (':' expression)? ';'
| 'assert' expression (':' expression)? ';'
| 'if' parExpression statement
[C] my v3 Parser no reuse() slower 20% than v2. With reuse() 2GB leaks,
oops.
Do not use the $text annotations if you want performance, they are purely
for convenience – I must have said this 5000 times and I wish I had never
added that bit ;) I also told you 3 or 4 times in various emails not to
All your assumptions below are correct - the methods you are calling there
are public to grammar programmers for this reason. Just lose the $text and
have your own helper methods - for instance you only want the text when it
is time to actually do something with it, and not just to create a new
On 11/16/11 6:00 PM, Jim Idle j...@temporal-wave.com wrote:
xxx: s=HEX_NUMBER { $s.type = CONST_STR_HEX; } ;
Jim,
This gives error as
SqlParser_v3.g:879:21: cannot write to read only attribute: $u.type
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma
Do it without the .type then, just use C code directly. Don't forget that
you can do things like:
{
pANTLR3_BASE_TOKEN t;
t = LT(-1);
t-type = XXCX;
}
Or perhaps
myHelper($s, MYTYPE);
Jim
-Original Message-
From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
On Tue, Nov 15, 2011 at 5:46 PM, John B. Brodie j...@acm.org wrote:
Greetings!
I think you have issues with your function, number, and ATOM rules. see
below...
apparently I did
I have attached my complete, modified, grammar that successfully parses
your input sample.
thanks for taking
Hi,
On Wed, Nov 16, 2011 at 8:21 PM, Jarrod Roberson jar...@vertigrated.comwrote:
actually thanks to Bart I need the FLOAT rule as a parser rule with the
predicate because I want to be able to match
But John raises a valid point that I didn't mention: by promoting such a
rule to a parser
On Wed, Nov 16, 2011 at 8:38 PM, Bart Kiers bki...@gmail.com wrote:
Hi,
On Wed, Nov 16, 2011 at 8:21 PM, Jarrod Roberson
jar...@vertigrated.comwrote:
actually thanks to Bart I need the FLOAT rule as a parser rule with the
predicate because I want to be able to match
But John raises a
On Wed, Nov 16, 2011 at 2:39 PM, Bart Kiers bki...@gmail.com wrote:
On Wed, Nov 16, 2011 at 8:38 PM, Bart Kiers bki...@gmail.com wrote:
Hi,
On Wed, Nov 16, 2011 at 8:21 PM, Jarrod Roberson
jar...@vertigrated.comwrote:
actually thanks to Bart I need the FLOAT rule as a parser rule with
On Wed, Nov 16, 2011 at 8:45 PM, Jarrod Roberson jar...@vertigrated.comwrote:
Or even the input: 123 /* some comments */ . /* more comments */ 5
would
be a valid `number`... :)
Is there a way to support both
a - 1.
b - 1.1.
in a pure lexer rule then, I didn't think there was?
See
On Wed, Nov 16, 2011 at 2:55 PM, Bart Kiers bki...@gmail.com wrote:
On Wed, Nov 16, 2011 at 8:45 PM, Jarrod Roberson
jar...@vertigrated.comwrote:
Or even the input: 123 /* some comments */ . /* more comments */ 5
would
be a valid `number`... :)
Is there a way to support both
a -
Hi Jeremy,
This is not an answer but my thoughts after reading it.
It looks like the first option originally had some other text with it that
was removed and the second option was valid as originally written.
If it was me, I would try and find earlier versions from either antlr 2.x
or something
On 11/16/2011 12:02 AM, Voelkel, Andy wrote:
array: '[' FLOAT+ | STRING+ ']' - ^(ARRAY FLOAT+ STRING+) ;
the separate lists on the right of the - work because your syntax
specifies separate lists.
[Andy - this approach doesn't work - I get exceptions thrown. I haven't
debugged that
15 matches
Mail list logo