gdritter repos apicius / acdf892
Better support for non-ASCII Getty Ritter 8 years ago
1 changed file(s) with 5 addition(s) and 2 deletion(s). Collapse all Expand all
1212 }
1313
1414 %wrapper "monadUserState"
15
16 $special = [ \{ \} \[ \] \( \) \; \, \+ \& \- \$ ]
17 $idchar = $printable # $special
1518
1619 tokens :-
1720 $white+ ;
3235
3336 \-\> { lex' TkArrow }
3437
35 [A-Za-z0-9_$white\,\/]+ { lex (TkText . T.strip) }
38 $idchar + { lex (TkText . T.strip) }
3639
37 \$[A-Za-z0-9_]+ { lex TkJoin }
40 \$ $idchar + { lex (TkJoin . T.strip) }
3841
3942 {
4043 data Token = Token AlexPosn TkType deriving (Eq, Show)