[il-antlr-interest: 34962] Re: [antlr-interest] Failure to ignore newline

2011-11-18 Thread Bart Kiers
On Fri, Nov 18, 2011 at 7:55 AM, David Riddle da...@mcgilly.com wrote: Hi - This should be a very simple thing - I'm attempting to have my grammar hide newline, carriage returns, etc. However, every concievable form of a grammar that attempts to skip over these things or send them to the

[il-antlr-interest: 34963] [antlr-interest] String concatenation expression rule

2011-11-18 Thread franck102
I am writing a grammar for a fairly complex expression language, and in particular I need to support string concatenation which is performed simply by separating string literals with a space; and which automatically converts other expressions to a string if needed to concatenate: a b - ab 2+3 mm -

[il-antlr-interest: 34964] Re: [antlr-interest] String concatenation expression rule

2011-11-18 Thread Bart Kiers
On Fri, Nov 18, 2011 at 12:39 PM, franck102 franck...@yahoo.com wrote: I am writing a grammar for a fairly complex expression language, and in particular I need to support string concatenation which is performed simply by separating string literals with a space; and which automatically

[il-antlr-interest: 34965] Re: [antlr-interest] confused about rendering all String Templates...

2011-11-18 Thread Morgan Jones
ahhh... just updated my grammar to output templates... you're right, once you explained it I knew what to look for in other examples I had worked through. Now when I'm calling toString on the template that was returned I'm getting everything that I accumulated while walking my AST. Now currently

[il-antlr-interest: 34966] Re: [antlr-interest] Failure to ignore newline

2011-11-18 Thread David Riddle
Hi Bart - Yes, it's a \n, and I thought I told the grammar to set '\n' to a hidden channel. So, why is it not hidden? ~ Dave On Fri, Nov 18, 2011 at 12:21 AM, Bart Kiers bki...@gmail.com wrote: On Fri, Nov 18, 2011 at 7:55 AM, David Riddle da...@mcgilly.com wrote: Hi - This should be a

[il-antlr-interest: 34967] Re: [antlr-interest] Failure to ignore newline

2011-11-18 Thread Bart Kiers
On Fri, Nov 18, 2011 at 4:01 PM, David Riddle da...@mcgilly.com wrote: Hi Bart - Yes, it's a \n, and I thought I told the grammar to set '\n' to a hidden channel. So, why is it not hidden? Assuming you mean a new line char, then it _is_ being sent to the HIDDEN channel as Norman already

[il-antlr-interest: 34968] [antlr-interest] [C] reuse() bug here?

2011-11-18 Thread Ruslan Zasukhin
Hi Jim, I think bug is here ... Just only have found this place during debug, And need run away for few hours. static pANTLR3_COMMON_TOKEN newPoolToken(pANTLR3_TOKEN_FACTORY factory) { pANTLR3_COMMON_TOKEN token; /* See if we need a new token pool before allocating a new * one

[il-antlr-interest: 34969] Re: [antlr-interest] Failure to ignore newline

2011-11-18 Thread Norman Dunbar
Afternoon David, On 18/11/11 15:01, David Riddle wrote: Yes, it's a \n, and I thought I told the grammar to set '\n' to a hidden channel. So, why is it not hidden? Think in C, where a newline character is represented in code as '\n'. There are two physical characters between the quotes, but

[il-antlr-interest: 34973] Re: [antlr-interest] String concatenation expression rule

2011-11-18 Thread franck102
Hi Bart, thanks very for the quick reply. I should have made it clear that concatenating is only legal if at least one of the operands is a string literal - that is where I am having an issue. In other terms the input 3 3EOF should cause a syntax error, while 3 3EOF should not (and evaluates

[il-antlr-interest: 34974] Re: [antlr-interest] String concatenation expression rule

2011-11-18 Thread Jim Idle
Don't make the parser trap that error as a syntax error. It is a semantic error and so you should parser any operand type, then reject the incorrect types with code. jim -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- boun...@antlr.org] On Behalf Of

[il-antlr-interest: 34977] Re: [antlr-interest] [C] reuse() bug here? -- IGNORE it ... Not here :)

2011-11-18 Thread Ruslan Zasukhin
On 11/18/11 5:12 PM, Ruslan Zasukhin ruslan_zasuk...@valentina-db.com wrote: -- Best regards, Ruslan Zasukhin VP Engineering and New Technology Paradigma Software, Inc Valentina - Joining Worlds of Information http://www.paradigmasoft.com [I feel the need: the need for speed] List:

[il-antlr-interest: 34978] [antlr-interest] [C] reuse() - grow of RAM -- attempt #2.

2011-11-18 Thread Ruslan Zasukhin
Hi Jim, So I have debug debug and have found that = 1) Generated Parser contains ctx-adaptor, which contains one more tokenFactory. And for this factory NEVER is called reset(). I have add call reset() for now in the method of generated parser. This have made things better, but