discard expunge for backwards compat

This commit is contained in:
Chad C. Starz 2024-09-22 21:37:27 +00:00
parent b0a2fc6331
commit 6ede123270
No known key found for this signature in database
GPG Key ID: CEEBC9208C287297

View File

@ -1,4 +1,4 @@
/* cbake.l @BAKE flex @FILE && cc -std=c99 -D_GNU_SOURCE -o @SHORT lex.yy.c @ARGS -lfl @STOP */ /* cbake.l @BAKE flex @FILE && cc -std=c99 -D_GNU_SOURCE -o @{@SHORT} lex.yy.c @ARGS -lfl @STOP */
%{ %{
#include <ctype.h> #include <ctype.h>
@ -18,8 +18,9 @@ int gac;
char ** gav; char ** gav;
/* Options */ /* Options */
int gselect = 1; int gselect = 1;
/* Line accum */ /* accum */
int line = 1; int line = 1, expunge_depth = 0;
extern void root(char * filename); extern void root(char * filename);
extern void args(int n); extern void args(int n);
@ -41,6 +42,8 @@ NUM [[:digit:]]
@ARGS:{NUM}+ { args(atoi(strrchr(yytext, ':')+1)); } @ARGS:{NUM}+ { args(atoi(strrchr(yytext, ':')+1)); }
@ARGS|$\+ { args(-1); } @ARGS|$\+ { args(-1); }
@STOP { CHAR('\n'); if (gpipe) { fprintf(stderr, "output: "); } if (!gselect) { return 0; } BEGIN INITIAL; } @STOP { CHAR('\n'); if (gpipe) { fprintf(stderr, "output: "); } if (!gselect) { return 0; } BEGIN INITIAL; }
@\{ { ++expunge_depth; }
\} {if (!expunge_depth--) { ECHO; } }
{SPACE}+ { CHAR(' '); } {SPACE}+ { CHAR(' '); }
. { ECHO; } . { ECHO; }
} }