"fibo "" at line 1, column 5. Was expecting: "\u0440\u0430\u0432\u043d" /> "fibo "" at line 1, column 5. Was expecting: "\u0440\u0430\u0432\u043d" /> "fibo "" at line 1, column 5. Was expecting: "\u0440\u0430\u0432\u043d"/>

Strange Error Javacc Terminal

91 Views Asked by At

Here's the error:

Exception in thread "main" ParseException: Encountered " <ID> "fibo "" at line 1, column 5.
Was expecting:
    "\u0440\u0430\u0432\u043d\u043e" ...

    at RussianL.generateParseException(RussianL.java:1084)
    at RussianL.jj_consume_token(RussianL.java:966)
    at RussianL.Assignmeth(RussianL.java:223)
    at RussianL.Smeth(RussianL.java:189)
    at RussianL.Lmeth(RussianL.java:151)
    at RussianL.Pmeth(RussianL.java:57)
    at RussianL.Start(RussianL.java:17)
    at RussianL.main(RussianL.java:6)

No where have i said that i want to use u0440 etc as my grammer for the code. I have used actual words

All help appreciated.

1

There are 1 best solutions below

0
Theodore Norvell On

I'm fairly sure that this can be fixed by hand editing the XXXConstants.java file. Since that will get overwritten every time you run javacc, what you should do is write a script that will replace the funky strings that JavaCC produces with the nice strings that you want. This might amount to simply replacing every ocurrence of "\\u4" with "\u4".