Hello,

I recently started writing an interpreter for the WAEBRIC language, which is
a language for generating XHTML code based on self defined function blocks.
However, I keep getting runtime exceptions when running my parser. The
following program interprets fine:

module simple

def main
    html { title "Hello world"; }
end

But when I start adding attributes or arguments to my *title* tag the
exceptions start occuring, for example:

html { title#myidattribute "Hello world"; }

My rewrite rules are probably specified incorrectly, but I cannot seem to
figure out how to fix the problem. If somebody could give me some pointers
that would be greatly appreciated. Below is the related grammar:

statement: markup+ statement -> ^( markup markup* ',' statement )
            | ... ;
markup:            designator arguments? ;
designator:        IDCON attribute* ;
attribute:        '#' IDCON // ID attribute
            | '.' IDCON // Class attribute
            | '$' IDCON // Name attribute
            | ':' IDCON // Type attribute
            | '@' NATCON // Width attribute
            | '@' NATCON '%' NATCON; // Width-height attribute
arguments:        '(' argument? ( ',' argument )* ')' ;
argument:        expression ;

URL:
http://code.google.com/p/waebric/source/browse/#svn/trunk/implementations/java/antlr/src/main/grammar

Thanks in advance,
Jeroen

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Reply via email to