[antlr-interest] AntlrJavaToCs tool BIG PROBLEM NEED HELP
Liviu U
liviu.u at gmail.com
Tue Mar 20 16:27:42 PDT 2007
Hi guys,
My bold project seem to be doomed to an early death...I cannot figure it out
how following code should be translated.
the methods: unpackEncodedString, unpackEncodedStringToUnsignedChars have no
match in Antlr C# library, they are not present in DFA class.
class DFA19 : DFA {
public DFA19(BaseRecognizer recognizer) {
this.recognizer = recognizer;
this.decisionNumber = 19;
this.eot = DFA.unpackEncodedString(DFA19_eotS);
this.eof = DFA.unpackEncodedString(DFA19_eofS);
this.min = DFA.unpackEncodedStringToUnsignedChars(DFA19_minS);
this.max = DFA.unpackEncodedStringToUnsignedChars(DFA19_maxS);
this.accept = DFA.unpackEncodedString(DFA19_acceptS);
this.special = DFA.unpackEncodedString(DFA19_specialS);
int numStates = DFA19_transition.length;
this.transition = new short[numStates][];
for (int i=0; i<numStates; i++) {
transition[i] = DFA.unpackEncodedString
(DFA19_transition[i]);
}
}
public String getDescription() {
return "769:1: FloatingPointLiteral : ( ( '0' .. '9' )+ '.' (
'0' .. '9' )* ( Exponent )? ( FloatTypeSuffix )? | '.' ( '0' .. '9' )+ (
Exponent )? ( FloatTypeSuffix )? | ( '0' .. '9' )+ Exponent (
FloatTypeSuffix )? | ( '0' .. '9' )+ ( Exponent )? FloatTypeSuffix );";
}
}
It seems that the C# code generation would be here very different from Java
version, which is too bad.
Can anyone shed some light? Terr?
Regards
Liviu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070321/1ee119db/attachment.html
More information about the antlr-interest
mailing list