[antlr-interest] @header bug

Des Hartman des at deshartman.com
Wed Mar 4 19:38:34 PST 2009


Hi, I think there is a bug with the compiler for @header when using
Actionscript. I created this simple grammar file and the result with the
packages is not right if I use @header, but works fine if I use @package

This is the grammar file that works:

================
grammar TestIt;

options {
    language = ActionScript;
    output = AST;
}

@package { com.there.grammar }

emptyRule:  ;
================

package com.there.grammar  {
    import org.antlr.runtime.*;

=================

This is the one that does not work is when I use @header



=====================
grammar TestIt;

options {
    language = ActionScript;
    output = AST;
}

@header { com.there.grammar }

emptyRule:  ;

=====================

The problem is the package header is incorrect. It swaps the "[" and the
package path.

package {
     com.there.grammar
    import org.antlr.runtime.*;

Is this a bug?

Thanks
Des
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090305/5e476415/attachment.html 


More information about the antlr-interest mailing list