0byt3m1n1
Path:
/
data
/
applications
/
aps
/
tikiwiki
/
14.1-0
/
standard
/
htdocs
/
lib
/
core
/
JisonParser
/
[
Home
]
File: Phraser.jison
/* description: Parses words out of html, ignouring html in the parse, but returning it in the end */ //phpOption parserClass:JisonParser_Phraser //phpOption lexerClass:JisonParser_Phraser_Lexer /* lexical grammar */ %lex %% "<"(.|\n)*?">"+ return 'TAG' (\w|\d)+ return 'WORD' (.|\n|\s) return 'CHAR' <<EOF>> return 'EOF' /lex %start html %% /* language grammar */ html : contents EOF {return $1;} ; contents : content {$$ = $1;} | contents content { $$ = $1 + $2; //js //php $$ = $1 . $2; } ; content : TAG { $$ = Phraser.tagHandler($1);//js //php $$ = $this->tagHandler($1); } | WORD { $$ = Phraser.wordHandler($1);//js //php $$ = $this->wordHandler($1); } | CHAR { $$ = Phraser.charHandler($1);//js //php $$ = $this->charHandler($1); } ;