mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-24 22:25:36 +08:00
33 lines
533 B
Plaintext
33 lines
533 B
Plaintext
|
%namespace GameRes.Formats.Artemis
|
||
|
%scannertype IPTScanner
|
||
|
%visibility internal
|
||
|
%tokentype Token
|
||
|
|
||
|
%option stack, minimize, parser, verbose, persistbuffer, noembedbuffers
|
||
|
|
||
|
Space [ \t\v\n\f]
|
||
|
Number [0-9]+
|
||
|
|
||
|
%{
|
||
|
|
||
|
%}
|
||
|
|
||
|
%%
|
||
|
|
||
|
{Space}+ /* skip */
|
||
|
|
||
|
{Number} { GetNumber(); return (int)Token.NUMBER; }
|
||
|
|
||
|
\"(\\.|[^\\"\n])*\" { GetStringLiteral(); return (int)Token.STRING_LITERAL; }
|
||
|
|
||
|
[a-zA-Z]+ { yylval.s = yytext; return (int)Token.IDENTIFIER; }
|
||
|
|
||
|
"{" { return '{'; }
|
||
|
|
||
|
"}" { return '}'; }
|
||
|
|
||
|
"=" { return '='; }
|
||
|
|
||
|
"," { return ','; }
|
||
|
|
||
|
%%
|