46 #include "tokens_mdl.h"
50 # define strrchr rindex
59 EXPONENT [Ee][+-]?{DIGIT}+
61 REAL [+-]?{DIGIT}+(
"."{DIGIT}+)?{EXPONENT}?
63 IDENT [a-zA-Z][a-zA-
Z0-9_]*
65 PIDENT {IDENT}(
"."({IDENT}|{DECIMAL}))*
66 AIDENT {IDENT}(
"."{IDENT})*
"["{DIGITS}
","{DIGITS}
"]"
67 LINKS
"MODEL"|
"CIRC"|
"PS"|
"DUT"|
"DPS"|
"DAT"|
"OUT"|
"SWEEP"|
"XFORM"|
"MACRO"|
"TCIRC"|
"CONN"|
"PLOT"
69 %
x VERSION BLKEDIT BLKEDIT1 CIRCUIT CIRCUIT1 PLINK PLIST PMEMBER
72 %option yylineno noyywrap nounput
prefix=
"mdl_"
81 <PLINK,PLIST,PMEMBER>{LINKS} {
82 mdl_lval.ident = strdup (mdl_text);
87 <INITIAL,BLKEDIT>\
"[^\"]*\" {
88 mdl_text[strlen (mdl_text) - 1] = '\0';
90 mdl_lval.ident = strdup (&mdl_text[1]);
102 <INITIAL>^"TABLE \
"ICVIEWDATA\"" {
107 <INITIAL>^
"PSTABLE" {
111 <INITIAL>^
"BLKEDIT" {
116 <INITIAL>^
"CNTABLE" {
120 <INITIAL>^
"OPTIMEDIT" {
124 <INITIAL>^
"HYPTABLE" {
128 <INITIAL>^
"element" {
136 <INITIAL>^
"dataset" {
140 <INITIAL>^
"datasize" {
158 <INITIAL>^
"PlotOptimizerOpt" {
159 return t_PLOTOPTIMIZEROPT;
162 <INITIAL>^
"PlotOptimizerTraceSet" {
163 return t_PLOTOPTIMIZERTRACESET;
166 <INITIAL>^
"PlotOptimizerTraceRegSet" {
167 return t_PLOTOPTIMIZERTRACEREGSET;
170 <INITIAL>^
"PlotOptimizerTraceNatRegSet" {
171 return t_PLOTOPTIMIZERTRACENATREGSET;
174 <INITIAL>^
"PlotError" {
182 <INITIAL>^
"editsize" {
186 <INITIAL>^
"plotsize" {
190 <INITIAL>^
"optrange" {
210 <INITIAL>^
"caldata" {
222 <INITIAL>^
"connpair" {
226 <INITIAL>^
"circuitdeck" {
228 return t_CIRCUITDECK;
232 mdl_lval.f = strtod (mdl_text, NULL);
236 <INITIAL>{IDENT}|{PIDENT}|{AIDENT} {
237 mdl_lval.ident = strdup (mdl_text);
241 <BLKEDIT>
"{" { BEGIN(BLKEDIT1);
return '{'; }
242 <CIRCUIT>
"{" { BEGIN(CIRCUIT1);
return '{'; }
243 <TABDATA>
"{" { BEGIN(TABDATA1);
return '{'; }
245 <INITIAL>
"{" {
return '{'; }
246 <INITIAL>
"}" {
return '}'; }
250 <BLKEDIT1,CIRCUIT1,TABDATA1>^
"}" { BEGIN(INITIAL);
return '}'; }
251 <BLKEDIT1,CIRCUIT1,TABDATA1>. { }
255 "line %d: syntax error, unrecognized character: `%s'\n",
< INITIAL >< INITIAL >< INITIAL >< INITIAL > return InvalidCharacter
#define Z0
Wave impedance in vacuum ( )