[antlr-interest] v3 C# codegen status (was: AntlrJavaToCs tool BIG PROBLEM NEED HELP)

Micheal J open.zone at virgin.net
Tue Mar 20 22:37:06 PDT 2007


Hi,
 
ANTLR v3 C# code gen should return before v3 release. Please use contributed
template fixes/workarounds in the meantime (search the list or, it may
already be part of daily builds - Ter?).
 
Cheers!
 
Micheal
 
-----------------------
The best way to contact me is via the list/forum. My time is very limited. 

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Liviu U
Sent: 20 March 2007 23:28
To: antlr-interest at antlr.org
Subject: [antlr-interest] AntlrJavaToCs tool BIG PROBLEM NEED HELP


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/8b5bf07f/attachment-0001.html 


More information about the antlr-interest mailing list