Closed GoogleCodeExporter closed 9 years ago
Do you know where I could start to work on it myself? Where in java_1_5.jj
should I
add a new production? It seems "Type" and "id" are separated quite early...
Original comment by martin.p...@gmail.com
on 26 Sep 2009 at 9:00
Martin,
actually it is working as it should be.
There is no problem in parsing arrays with brackets in the variable id. The
problem
is you are waiting for something in one way and the parser is returning in
other way.
The brackets in this case are stored in the variable id, and not in the type id.
E.g. in class java.lang.StringBuffer there is the following method:
public synchronized StringBuffer insert(int index, char str[], int offset, int
len)
The "char str[]" is parsed as
Parameter(type=PrimitiveType(byte), id=VariableDeclaratorId(name=arr,
arrayCount=1))
exactly as it should be.
Look at the atribute "arrayCount" in the VariableDeclaratorId, here are the lost
brackets. When a array is declare in this form, the VariableDeclaratorId will
always
carry the array count.
Case solved, issue closed.
Original comment by jges...@gmail.com
on 29 Sep 2009 at 2:27
Thank you very much for your explanation! Now I changed the output to also use
VariableId.arrayCount and it works perfectly!
Original comment by martin.p...@gmail.com
on 30 Sep 2009 at 8:33
Original issue reported on code.google.com by
martin.p...@gmail.com
on 8 Sep 2009 at 1:11