[Fixed the subject]
>
> From: Martin Probst
> Subject: Re: [antlr-interest] tokens - when to use?
>
> The easiest way to work around this is to allow all tokens that are
> valid explicitly also as identifiers:
>
> id: ID | QUOTEDSTRING | NONE | REMOVE | ...;
>
> ... which is a bit inconvenient a
I'm getting a non-LL(*) decision error when trying to generate code
for my grammar, which is at http://rebertia.com/Iguana.g (it's a bit
long, otherwise I'd post it).
I've tried looking at the flowcharts in ANTLRWorks to figure out what
the problem is, but I can't make heads or tails of what the
c
FREE Home Based Online Job Offer for Indians
Dear Friend, Do you want to earn extra income in your spare time working from
home?
To Join Click the link below
1.
http://bestways-makemoneyonline.50webs.com/
<<>>
2.
http://bestways-makemoneyonline.50webs.com/earn
On Oct 9, 2008, at 5:43 PM, Randall R Schulz wrote:
> So a couple of options suggest themselves right off:
>
> 1) (Crude) A single option that specifies the protection level of the
> generated parser code's returns classes (or structs or whatever
> they're
> called in other target languages).
>
On Thursday 09 October 2008 17:32, Terence Parr wrote:
> On Oct 9, 2008, at 5:29 PM, Randall R Schulz wrote:
> > Hi,
> >
> > Is there any reason the many *_return classes generated when a
> > grammar uses the "returns [ ... ]" construct (under Java) cannot be
> > declared "private" (or, at least,
Hi,
Is there any reason the many *_return classes generated when a grammar
uses the "returns [ ... ]" construct (under Java) cannot be
declared "private" (or, at least, "protected")?
This would have the salutary effect of excluding them from the external
JavaDoc HTML typically generated from
Hi. I had not thought of that. yes that is a problem, but you need to
access the return structures to pull results from the start symbol
like the tree.
Ter
On Oct 9, 2008, at 5:29 PM, Randall R Schulz wrote:
> Hi,
>
> Is there any reason the many *_return classes generated when a grammar
> us
Gavin,
Yeah, I goofed the line numbers up. Here are the files again. My
question is whether the syntax is correct. I can't see anything
wrong. Thanks for any help.
grammar Foo;
options {
output=AST;
}
tokens {
FOO = 'foo';
BAR = 'bar';
ZAP;
}
start
>
> From: Martin Probst <[EMAIL PROTECTED]>
> Subject: Re: [antlr-interest] tokens - when to use?
>
> The easiest way to work around this is to allow all tokens that are
> valid explicitly also as identifiers:
>
> id: ID | QUOTEDSTRING | NONE | REMOVE | ...;
>
> ... which is a bit inconvenient as
On-line Tube video TV group.
Go and Look free tube
http://groups.google.com.ua/group/adult-stream-video/web/xxx_stream.html
http://groups.google.com.ua/group/adult-stream-video
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
> Seems that the NONE is in a list of known tokens and cannot be entered
> for ID, isn't it?
>
> It surprises me, that using a TOKEN breaks a rule. It works after
> changing to
This is due to the way Lexer and Parser separation works - the lexer
produces tokens, which the parser consumes and
Hi,
for the grammar below, when it parses the input
REMOVE NONE
there is a MismatchedSetException
When I change the NONE in r1 to NON the phrase is parsed.
Seems that the NONE is in a list of known tokens and cannot be entered
for ID, isn't it?
It surprises me, that using a TOKEN breaks a ru
I obviously enjoy talking to myself ;)
};
separator="\n">
it is :)
cheers
--
Torsten
On Oct 9, 2008, at 15:26, Torsten Curdt wrote:
> Why does this fail
>
> }; separator="\n">
>>>
>
> reading(number,slots) ::= <<
>>>
>
> while this works fine?
>
> }; separator="\n">
>>>
>
>
On Thursday 09 October 2008 00:30, Ronghui Yu wrote:
> On Thu, Oct 9, 2008 at 3:12 PM, Gavin Lambert <[EMAIL PROTECTED]>
wrote:
> > At 19:59 9/10/2008, Ronghui Yu wrote:
> >> As I mentioned before, I use the same lexer and parser object for
> >> parsing different SQL statements.
> >
> > Is there
Why does this fail
}; separator="\n">
>>
reading(number,slots) ::= <<
>>
while this works fine?
}; separator="\n">
>>
reading(slots) ::= <<
>>
The underlying object is of type
Map>
Any idea?
cheers
--
Torsten
List: http://www.antlr.org:8080/mailman/listinf
Seem it needs to be
or
<(typeMap.(a.type))(a)>
But how do I add a prefix?
cheers
--
Torsten
On Oct 9, 2008, at 14:16, Torsten Curdt wrote:
> What wrong with the following indirect reference?
>
> )>
> }>
>
> typeMap ::= [
> "int":"INTEGER",
> "string":"ST
What wrong with the following indirect reference?
)>
}>
typeMap ::= [
"int":"INTEGER",
"string":"STRING",
default:"OBJECT"
]
writeSTRING(a) ::= <<
// STRING
>>
writeINTEGER(a) ::= <<
// INT
>>
writeOBJECT(a) ::= <<
// OBJECT
>>
cheers
--
Torsten
List:
Found the map iteration explained here
http://www.antlr.org/wiki/display/ST/Expressions
For iteration of lists/trees - recursively call the templates?
cheers
--
Torsten
List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org:8080/mailman/options/antlr
Hey there,
Hope this is the right mailing list for stringtemplate questions.
(Wasn't obvious from the site)
I have some trouble figuring out how to output tree like structures
and maps with stringtemplate. Could not find an example for it.
Let's say I have
Map map = new HashMap
Hi, Jim,
Sorry to bother you again.
As I mentioned before, I use the same lexer and parser object for parsing
different SQL statements.
When using ANTLR3.0.1, everything works fine, but when upgrade to ANTLR3.1,
I found that it is necessary to save the
ctx->pParser->rec->state->tokenNames before c
Yes, this is the easiest way to make it work.
It is not I who designed the architecture. But I think the reason may be the
performance, the parser object contains over 1000 fields needed to be set,
it may be much faster to reuse it by resetting some fields of it.
On Thu, Oct 9, 2008 at 3:12 PM, Ga
At 19:59 9/10/2008, Ronghui Yu wrote:
>As I mentioned before, I use the same lexer and parser object for
>parsing different SQL statements.
Is there some particular reason why you don't want to construct a
new instance?
List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscri
22 matches
Mail list logo