Greetings!
On Thu, 2010-04-08 at 20:29 -0400, Cameron Ross wrote:
> Hi,
>
> I have a grammar that calls a rule from two different "levels". This leads
> to an ambiguity being reported from the two different calls to the rule.
> Oddly, the ambiguity points to the same place, so I'm not sure why
John,
Yes, I'm trying to deal with the conditional aspects of my grammar, but not
quite in the sense you suggest. My processor is not interpreting the
grammar, it's emitting assembly code for later compilation by gcc.
So, I want to process all of the expressions regardless of the truth value
of t
I think you might just have to pop up one level to think about how to
express this - no magic needed. The way that grammar is written, your file
is composed of one or more cltexts, which themselves may be composed either
of a module or any number of phrases (including none at all). It seems to
me
Hi,
I have a grammar that calls a rule from two different "levels". This leads
to an ambiguity being reported from the two different calls to the rule.
Oddly, the ambiguity points to the same place, so I'm not sure why its
"ambiguous". The pertinent parts of the grammar are shown below and I've
I guess I'm not clear on why ANTLR is seeing OPEN and EOF as an ambiguity.
On Thu, Apr 8, 2010 at 4:07 PM, Jim Idle wrote:
> Your text rule can be empty, you need to rejig your use of + and * or you
> end up with the empty match in more than one place.
>
>
>
> Jim
>
>
>
> From: Cameron Ross [ma
The current ANTLR 3.2 uses StringTemplate for code generation and whether the
ANTLR parser is written in v2 or v3 affects neither code generation nor the
writing of a language target runtime. We are writing ANTLR v4 and this is
written in v3. V4 is intended to be backward compatible grammaticall
I am interested in working with Ian Mitchell on the Objective-C target. From
what I have been reading it seems like one of the current hang-ups to effective
code generation is that antlr-3.2 is still written using v2 and lack of a
string-template grammar for antlr-3.2. One, is this correct? Two
Yes, this is the way I have it implemented in my production version.
However, I have to conform to a language specification which allows text to
have zero or more phrases. Is there some ANLTR magic that I can use to
support this?
On Thu, Apr 8, 2010 at 4:07 PM, Jim Idle wrote:
> Your text rul
Your text rule can be empty, you need to rejig your use of + and * or you end
up with the empty match in more than one place.
Jim
From: Cameron Ross [mailto:cr...@kojeware.com]
Sent: Thursday, April 08, 2010 1:05 PM
To: Jim Idle
Subject: Re: [antlr-interest] OPEN, EOF ambiguity
These
These rules show the top level of the grammar...
start_rule
: clif_file EOF
;
clif_file
: cltext+
;
cltext
: (OPEN CL_MODULE) => module -> ^(CLTEXT module)
| text -> ^(CLTEXT text)
;
module
: OPEN CL_MODULE interpretablename exclusion_set? cltext CLOSE -> ^(MODULE
^(MODULE_IDENTIFIER interpretab
You probably need to send the grammar rather than that graphic. It is likely
something more fundamental and we cannot see what you predicates are doing from
the graphic.
Jim
> -Original Message-
> From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-
> boun...@antlr.org] On Beh
Hi,
I have a grammar with an ambiguity that I just can't resolve. When I check
the grammar using AntlrWorks I get the following: "Decision can match input
such as "{EOF, OPEN}" using multiple alternatives: 1, 2". I've attached a
screen grab of the syntax diagram generated by AntrlWorks. I don't
LinkedIn
Hugo Leeney requested to add you as a connection on LinkedIn:
--
Ian,
I'd like to add you to my professional network on LinkedIn.
- Hugo Leeney
Accept invitation from Hugo Leeney
http://www.linkedin.com/e/XJ_Jh42eHeYQ_eJ2S5_J_0Ueq9jQF
We have had a problem with our application crashing when a parser
exception is thrown. We override the default error handler as follows:
/* init code... */
pFooParser fooParser = NewFooParser(tokenStream);
fooParser->pParser->rec->reportError = &reportError;
where reportError is defined
I've made a few changes locally in the generated code for the CSharp3
target. Partial methods are new to C# 3, and were added so generated
code can add extensibility points. The partial methods and all calls to
them in generated code are *completely* removed by the compiler if there
is no implement
Tyler,
It appears that you're trying to deal with the conditional aspect of your IF
and WHILE statements in the tree grammar actions. I haven't found a way to do
this exclusively in actions because the conditions determine which parts of the
tree to "evaluate" and which parts to "skip over".
T
On Wed, Apr 07, 2010 at 12:26:27AM +, Gouasmi Thouraya wrote:
> Is it obligatory to download and to install Maven2 to create the
> stringTemplate of a language target?
Yes.
> otherwise what tool use to write the stringTemplate and how?
> please help me
Its necessary to download the ANTR 3.
I have a tree parser which is traversing the nodes of my AST. At points
within the grammar, I use action blocks to call methods on my processing
object, thus keeping large amounts of action code abstracted into a separate
file.
This has worked fine, but now I have the "if" and "while" statements v
18 matches
Mail list logo