SleepyEgg

Tech News, Deals, & Games

  • Increase font size
  • Default font size
  • Decrease font size
Home News Tech News JavaCC: Placement of token definition

JavaCC: Placement of token definition

E-mail Print PDF
The order of placing token definitions matters. example: TOKEN: { <AAA : "aaa"> | <MORE_A : (["a"'>)*> } token AAA is more specific comparing to MORE_A, so must place before MORE_A. When token manager looks for the type of a token, it will match the regular expressions (tokens) from top to bottom (or left to right). If we don't follow this rule, u may get unexpected result. exmple: "aaa" will actually match MORE_A when u have AAA after MORE_A. Share Link:
Bookmark Google Yahoo MyWeb Del.icio.us Digg Facebook Myspace Reddit Ma.gnolia Technorati Stumble Upon
Comments (0)Add Comment

Write comment
You must be logged in to a comment. Please register if you do not have an account yet.

busy
 

Polls

Which is your favorite OS
 

Login

               No account yet?