|
|
|
|
|
|
|
|
|
|
|
|
Re: Regarding Antlr rule matching [message #1724883 is a reply to message #1724874] |
Fri, 26 February 2016 18:30 |
|
The main point is: do you want to have these strange ids in all places or in some only. The file is first Lexed and them parsed. The lexer does not know anything about context. Thus I cannot lex abc as specialid and as Id. I cannot tell about lexing. Efficient. Maybe you can use.
Terminal STUFF: ....;
MyID: STUFF | ID.
I'd recommend no to take everything into stuff.
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
Re: Regarding Antlr rule matching [message #1724909 is a reply to message #1724883] |
Sat, 27 February 2016 01:03 |
pranay roy Messages: 196 Registered: January 2016 |
Senior Member |
|
|
Thanks for the explanation Christian.
do you want to have these strange ids in all places or in some only ?
Yes the ids I am referring are basically product names. So ,it could be anything (including !@#$%) and other special characters and they can exist at places where I am currently using IDs.
So, in my java code. I support it including like "SPECIAL_CHAR_PATTERN="^A-Za-z0-9_\\[\\]{}!@#$%^&*()~`<>+,.?/':;\\-\" ";"
I am looking something similar to enhance my ID
[Updated on: Sat, 27 February 2016 01:03] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04107 seconds