0d18307afc
input fields. It reads a template file passed to init_forms(char *) and creates a curses based form editor. See the examples directory for a basic demo.
20 lines
373 B
Plaintext
20 lines
373 B
Plaintext
%{
|
|
#include "y.tab.h"
|
|
%}
|
|
|
|
%%
|
|
"Form template:" { yylval.ival = FORM; return FORM; }
|
|
Input { yylval.ival = INPUT; return INPUT; }
|
|
Text { yylval.ival = TEXT; return TEXT; }
|
|
|
|
[0-9]+ { yylval.ival = atoi(yytext); return NUMBER; }
|
|
\"[^"]* {
|
|
if (yytext[yyleng-1] == '\\') {
|
|
yymore();
|
|
} else {
|
|
input();
|
|
yylval.sval = yytext+1;
|
|
return STRING;
|
|
}
|
|
}
|