Last active
March 15, 2017 22:46
-
-
Save Philhil/401b69084cea274ce5f9d3dc32ae4d4e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%option noyywrap | |
%{ | |
#include "grammar.tab.h" | |
%} | |
INT [0-9] | |
VARLEX [n-z]{INT}* | |
FUNCLEX [a-m]{INT}* | |
PRAEDIKATLEX [A-Z]{INT}* | |
%% | |
{VARLEX} { | |
return VAR; | |
} | |
{FUNCLEX} { | |
return FUNC; | |
} | |
{PRAEDIKATLEX} { | |
return PRAEDIKAT; | |
} | |
"->" { | |
return ARROW; | |
} | |
"&" { | |
return UND; | |
} | |
"," { | |
return KOMMA; | |
} | |
true { | |
return TRUE; | |
} | |
false { | |
return FALSE; | |
} | |
"(" { | |
return KLAMMERO; | |
} | |
")" { | |
return KLAMMERC; | |
} | |
\n|\r\n { | |
return NEWLINE; | |
} | |
" " { | |
/* Skip */ | |
} | |
. { | |
printf("Do not know: %s\n", yytext); | |
} | |
%% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment