[antlr-interest] Global Dynamic Scope

Claude Moulin claude.moulin at hds.utc.fr
Thu Nov 12 02:59:04 PST 2009


Hello Jim,

The bug is very strange and I made many tests in order to identify the
problem.

It is due to comments inserted in scope declarations. Sometimes they are
accepted; in other cases no. It is impossible for me to know why.

When there is a problem, lines like: // $myscope::varname = 0; also give
an error even if they are comments.

I cancelled all the comments in scope declarations and it works
perfectly well.

Thanks,

Claude

---------------------------------------------------------------------

From: "Jim Idle" <jimi at temporal-wave.com>

Subject: Re: [antlr-interest] Global Dynamic Scope

To: "antlr-interest at antlr.org" <antlr-interest at antlr.org>

Message-ID: <8b02470df5d1bd499db21e960899ce21 at temporal-wave.com>

Content-Type: text/plain; charset="us-ascii"

 

Do you have a small(ish) reproducible example?

 

Jim

 

From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Claude Moulin

Sent: Tuesday, November 10, 2009 1:47 AM

To: antlr-interest at antlr.org

Subject: [antlr-interest] Global Dynamic Scope

Hello,

I get a strange error using global scope. I use antlr 3.2.

In a tree grammar I define a global scope << pilep >> with several
attributes including one called binit.

I get several  times strange error messages like: 

unknown dynamically-scoped attribute for scope pilep: binit

It seems that sometimes antlr doesn't succeed to translate $pilep::binit
into ((pilep_scope)pilep_stack.peek()).binit 

As it does with other scope attributes.

I don't understand the reason.

Any idea ?

Thanks,

Claude

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20091112/31ed4962/attachment.html 


More information about the antlr-interest mailing list