mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
Need frame grabbing after all.
This commit is contained in:
parent
129a36064f
commit
74016573b4
1 changed files with 16 additions and 2 deletions
|
@ -82,12 +82,13 @@ ADDOP [\-+]
|
|||
MULOP [*/]
|
||||
ASSIGNOP :=
|
||||
RANGE \.\.
|
||||
FRAMEID {ID}(\.{ID})*
|
||||
|
||||
%x GRAB_FRAME GRAB_OTHER COMMENT
|
||||
|
||||
%%
|
||||
grab_frame = -GRAB_FRAME;
|
||||
grab_other = -GRAB_OTHER;
|
||||
grab_frame = GRAB_FRAME;
|
||||
grab_other = GRAB_OTHER;
|
||||
|
||||
"{" { BEGIN (COMMENT); }
|
||||
<COMMENT>"{" { warning (0, "nested { in comment"); }
|
||||
|
@ -151,6 +152,19 @@ RANGE \.\.
|
|||
|
||||
[!(){}.&|^~\[\];,#%?:] return yytext[0];
|
||||
|
||||
"$"{s}*{FRAMEID} {
|
||||
int ret = do_grab (yytext);
|
||||
if (ret >= 0) {
|
||||
yylval.integer_val = ret;
|
||||
return INT_VAL;
|
||||
} else {
|
||||
BEGIN (-ret);
|
||||
}
|
||||
}
|
||||
|
||||
<GRAB_FRAME>{FRAMEID} add_frame_macro (yytext);
|
||||
<GRAB_OTHER>[^\r\n]* /* skip */
|
||||
|
||||
<*>\r*\n {
|
||||
pr.source_line++;
|
||||
BEGIN (INITIAL);
|
||||
|
|
Loading…
Reference in a new issue