Re: Simple JLex problem - Help!

lee_lau@hotmail.com (Luiz Lau)
20 Dec 2001 00:40:57 -0500

          From comp.compilers

Related articles
Simple JLex problem - Help! royalpuk@hotmail.com (2001-12-11)
Re: Simple JLex problem - Help! lee_lau@hotmail.com (2001-12-20)
Re: Simple JLex problem - Help! lee_lau@hotmail.com (2001-12-20)
| List of all articles for this month |

From: lee_lau@hotmail.com (Luiz Lau)
Newsgroups: comp.compilers
Date: 20 Dec 2001 00:40:57 -0500
Organization: http://groups.google.com/
References: 01-12-057
Keywords: Java, lex
Posted-Date: 20 Dec 2001 00:40:57 EST

Have you tried:
<YYINITIAL> "\^" {
        return new Symbol(sym.cap);
}
<YYINITIAL> "\\" {
        return new Symbol(sym.slash);
}


since the single backslash is a reserved character in JLex. (It's in
the JLex Manual)


        -- lee


royalpuk@hotmail.com (K Herner) wrote
> I am trying to get JLex recognise "/\" as a valid token, but it
> doesn't seem to like it. "/" by itself is ok... Have tried "/\\"
> [/\\] and several other combinations with no result... When I type
> \ it just says 'Illegal character'. Any ideas? (The exact opposite
> ie. "\/" works fine!). Thanks



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.