2013年7月27日星期六

bison% token doubts

% token PHPECHO

primitive:
PHPECHO / / This sentence will match Shashi Hou
{
/ / if (GetCurrentState (NULL)) Echo (NULL, 1);
}
This is only fragments
What do you mean % token represents usage
------ Solution ------------------------- -------------------
this lexer used in conjunction with more appropriate,
For example, in the lexer defined as follows:
printPHP {return PHPECHO;}
In the lexical analysis , the analysis to printPHP, will return token PHPECHO
through the parser to do syntax analysis.
------ For reference only -------------------------------------- -
almost this thing , to the sub

1 条评论:

  1. Thank you, my boss assigned me such a task and i could do it fast.Thank u very much

    回复删除