1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00
jashkenas--coffeescript/vendor/jison/examples/calculator.jisonlex

15 lines
454 B
Text
Raw Normal View History

%%
\s+ {/* skip whitespace */}
[0-9]+("."[0-9]+)?\b {return 'NUMBER';}
"*" {return '*';}
"/" {return '/';}
"-" {return '-';}
"+" {return '+';}
"^" {return '^';}
"(" {return '(';}
")" {return ')';}
"PI" {return 'PI';}
"E" {return 'E';}
<<EOF>> {return 'EOF';}