Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JavaCC : Invalid escape character...

55 views
Skip to first unread message

Patrice Bonhomme

unread,
Oct 14, 1998, 3:00:00 AM10/14/98
to
Hi there,

I use the ASCII_UCodeESC_CharStream class with JavaCC. When i try to parse this
sequence of characters "\usepackage{fancyheadings}", i got this error :

java.lang.Error: Invalid escape character at line 1 column 2.
at fr.loria.xml.parser.ASCII_UCodeESC_CharStream.readChar(ASCII_UCodeESC_CharStream.java)
at fr.loria.xml.parser.ASCII_UCodeESC_CharStream.BeginToken(ASCII_UCodeESC_CharStream.java)
at fr.loria.xml.parser.ParserTokenManager.getNextToken(ParserTokenManager.java)
at fr.loria.xml.parser.Parser.jj_ntk(Parser.java)
at fr.loria.xml.parser.Parser.content(Parser.java)
at fr.loria.xml.parser.Parser.root(Parser.java)
at fr.loria.xml.parser.Parser.document(Parser.java)
at fr.loria.xml.parser.Parser.parse(Parser.java)
at fr.loria.xml.parser.Parser.parse(Parser.java)


Is it a BUG ?

Within the The CharStream Classes MiniTutorial, i saw this :

This class treats the input as a stream of 1-byte characters. However, the
special escape sequence

("\\\\")* "\\" ("u")+ - (odd number of backslahes followed by one or more
'u's.)

is treated as a tag indicating that the next 4 bytes following the tag will be
hexadecimal digits forming a 4-digit hex number whose value will be treated as
the value of the character at the position indicated by the first backslash.
Note that this value can be anything in the range 0x0-0xffff.


I would like to keep the ASCII_UCodeESC_CharStream class within my parser. What
do i have to do ?... Do i have to implement my own implementation of the
CharStream interface ? Any help ?

Pat.
--
***********************************************************
* patrice....@loria.fr * Office : B.228 *
* http://www.loria.fr/~bonhomme * Phone : 03 83 59 30 52 *
***********************************************************

chengha...@gmail.com

unread,
Dec 28, 2012, 1:34:31 AM12/28/12
to
在 1998年10月14日星期三UTC+8下午3时00分00秒,Patrice Bonhomme写道:
You have to solve it?
0 new messages