mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-26 08:36:15 +02:00
b2/: allow ...% to be recognized as a single WORD (for values)
This commit is contained in:
parent
98f2fc8337
commit
433b03a59d
4
b2/CHAR
4
b2/CHAR
@ -1,2 +1,2 @@
|
||||
FOO R101X FP=0603 R=100R TOL=5x
|
||||
FOO R102Y FP=0603 R=1k TOL=1x
|
||||
FOO R101X FP=0603 R=100R TOL=5%
|
||||
FOO R102Y FP=0603 R=1k TOL=1%
|
||||
|
10
b2/lang.l
10
b2/lang.l
@ -46,6 +46,14 @@ void parse_characteristics(void)
|
||||
|
||||
%}
|
||||
|
||||
|
||||
/*
|
||||
* We use ID for a bit of a hack: let %... be recognized as '%' WORD but treat
|
||||
* ...% still as a single WORD.
|
||||
*/
|
||||
|
||||
ID [-_A-Za-z0-9()+./]
|
||||
|
||||
%%
|
||||
|
||||
%{
|
||||
@ -57,7 +65,7 @@ void parse_characteristics(void)
|
||||
}
|
||||
%}
|
||||
|
||||
[-_A-Za-z0-9()+./]+ { yylval.s = unique(yytext);
|
||||
{ID}({ID}|"%")* { yylval.s = unique(yytext);
|
||||
return WORD; }
|
||||
|
||||
"<=" return TOK_LE;
|
||||
|
Loading…
Reference in New Issue
Block a user