Skip to content

Commit

Permalink
Remove escape stuff in grammar; #91
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Jun 13, 2023
1 parent f95130b commit f2aa4a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
7 changes: 1 addition & 6 deletions ph-css/src/main/jjtree/ParserCSS30.jjt
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,7 @@ TOKEN :
// nonascii [^\0-\177] - everything except 0x00-0x7f
| < #NONASCII: ["\u0080"-"\uffff"] >

| < #ESCAPE_UNICODE: "\\" <HNUM> ( "\r\n"
| [" ","\t","\r","\n","\f"]
)? >
| < #ESCAPE_OTHER: "\\" ~["\n","\r","\f","0"-"9","a"-"f"] >
| < #ESCAPE: <ESCAPE_UNICODE>
| <ESCAPE_OTHER> >
| < #ESCAPE: "\\" ~["\n","\r","\f","0"-"9","a"-"f"] >
// nmstart [_a-z]|{nonascii}|{escape}
| < #NMSTART: ["_","a"-"z"]
| <NONASCII>
Expand Down
14 changes: 1 addition & 13 deletions ph-css/src/main/jjtree/ParserCSSCharsetDetector.jjt
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,7 @@ SKIP :
<DEFAULT>
TOKEN :
{
< #H: ["0"-"9","a"-"f"] >
| < #HNUM: <H>
| <H><H>
| <H><H><H>
| <H><H><H><H>
| <H><H><H><H><H>
| <H><H><H><H><H><H> >
| < #ESCAPE_UNICODE: "\\" <HNUM> ( "\r\n"
| [" ","\t","\r","\n","\f"]
)? >
| < #ESCAPE_OTHER: "\\" ~["\r","\n","\f","0"-"9","a"-"f"] >
| < #ESCAPE: <ESCAPE_UNICODE>
| <ESCAPE_OTHER> >
< #ESCAPE: "\\" ~["\r","\n","\f","0"-"9","a"-"f"] >
| < SEMICOLON: ";" >
| < #STRING_EOL: "\n"
| "\r\n"
Expand Down

0 comments on commit f2aa4a6

Please sign in to comment.