Groups | Search | Server Info | Login | Register
Groups > comp.compilers.tools.javacc > #7
| Newsgroups | comp.compilers.tools.javacc |
|---|---|
| Date | 2012-12-27 22:34 -0800 |
| References | <7029up$h7$1@muller.loria.fr> |
| Message-ID | <38c012e1-c174-4cf1-9d75-a506769f39a3@googlegroups.com> (permalink) |
| Subject | Re: JavaCC : Invalid escape character... |
| From | chenghaiming227@gmail.com |
在 1998年10月14日星期三UTC+8下午3时00分00秒,Patrice Bonhomme写道:
> 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.bonhomme@loria.fr * Office : B.228 *
> * http://www.loria.fr/~bonhomme * Phone : 03 83 59 30 52 *
> ***********************************************************
You have to solve it?
Back to comp.compilers.tools.javacc | Previous | Next | Find similar
Re: JavaCC : Invalid escape character... chenghaiming227@gmail.com - 2012-12-27 22:34 -0800
csiph-web