[antlr-interest] Tree grammar for expression subrules?
Bart Kiers
bkiers at gmail.com
Sat Mar 5 09:09:01 PST 2011
On Fri, Mar 4, 2011 at 11:23 PM, g4 at novadsp.com <g4 at novadsp.com> wrote:
>
> On 04/03/2011 19:13, Bart Kiers wrote:
>
> I'd expect that to become the tree-grammar rule:
>>>
>>> expression
>>> : term
>>> | ^(OR expression term)
>>> | ^(OR expression EPSILON)
>>> ;
>>>
>>
> Hello Bart
>
> Once again, extremely useful input. Thanks. My question though still
> stands. Cannot discern any pattern in writing the tree rules as, for
> example, this seems to violate cardinality ... or does it?
>
>
>
Hi, I'm starting to hesitate. Could you send your combined- or
parser-grammar that produces the AST? I'll have a look at it to see if I can
create a tree grammar (with a bit of comments).
Regards,
Bart.
More information about the antlr-interest
mailing list