[antlr-interest] Illegal escape sequence in C#

rkevinburton at charter.net rkevinburton at charter.net
Wed Jul 30 09:00:50 PDT 2008


I am not sure what I have done but now when I generate code from ANTLRWorks it generates lines containing escape sequences that C# doesn't understand. Like:

    const string DFA18_eotS =
        "\1\uffff\2\4\3\uffff\1\4";
    const string DFA18_eofS =
        "\7\uffff";
    const string DFA18_minS =
        "\3\56\3\uffff\1\56";
    const string DFA18_maxS =
        "\1\71\1\56\1\71\3\uffff\1\71";
    const string DFA18_acceptS =
        "\3\uffff\1\2\1\3\1\1\1\uffff";
    const string DFA18_specialS =
        "\7\uffff}>";
    static readonly string[] DFA18_transitionS = {
            "\1\3\1\uffff\1\1\11\2",
            "\1\5",
            "\1\5\1\uffff\12\6",
            "",
            "",
            "",
            "\1\5\1\uffff\12\6"
    };

This is just a sample. There are over 400 such errors when C# tries to compile the generated code from the lexer. How do I get ANTLRWorks to generate the "right" code again?

Thank you.

Kevin


More information about the antlr-interest mailing list