[antlr-interest] Java string array issue in v3.

Ted Villalba ted.villalba at gmail.com
Fri Jun 15 14:30:09 PDT 2007


Hi.
Not sure, I might be doing something wrong here, but this seems like a bug.
I'm trying to pass a string array to the start of my tree, but when I
compile my tree grammar the String array gets compiled
into a String.
So in treeGrammar.g my start symbol is rule "start"

start[HashMap fieldMap, String[] fqls]
@init{
etc etc...
}

The problem arises when I compile the tree grammar. The resulting java code
has the following signature for start:

*

public* *final* start_return start(HashMap fieldMap, String fqls)
*throws*RecognitionException {
*...*

So, when I try to compile my test rig I get an error because it's expecting
a string and I am trying to pass a String[].
 walker.start(parser.fieldMap, fqls)


Is this a bug in the ANTLR compiler, or my approach?


Thanks,
Ted

**
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070615/1b249a46/attachment.html 


More information about the antlr-interest mailing list