51 #include "tokens_dataset.h"
58 IDENT1 [a-zA-
Z_][a-zA-
Z0-9_]*
59 IDENT2 [a-zA-
Z_][a-zA-
Z0-9_\[\],]*
60 IDENT3 [a-zA-
Z0-9_][a-zA-
Z0-9_]*
61 IDENT {IDENT1}|{IDENT2}
62 PIDENT {IDENT1}|{IDENT2}|{IDENT3}
65 ID {SIMPLEID}{POSTID}*
67 EXPONENT [Ee][+-]?{DIGIT}+
69 IINT [+-]?[ij]{1}{DIGIT}+
70 RFLOAT1 [+-]?{DIGIT}+{EXPONENT}
71 RFLOAT2 [+-]?{DIGIT}*
"."{DIGIT}+({EXPONENT})?
72 IFLOAT1 [+-]?[ij]{1}{DIGIT}+{EXPONENT}
73 IFLOAT2 [+-]?[ij]{1}{DIGIT}*
"."{DIGIT}+({EXPONENT})?
74 CREAL ({RFLOAT1}|{RFLOAT2}|{RINT})
75 CIMAG ({IFLOAT1}|{IFLOAT2}|{IINT})
76 COMPLEX {CREAL}{CIMAG}
78 VERSION
"<Qucs Dataset "{DIGIT}+
"."{DIGIT}+
"."{DIGIT}+
">"
85 %
x COMMENT DESCRIPTION
86 %option yylineno noyywrap nounput
prefix=
"dataset_"
94 <DESCRIPTION>{DBEGIN} {
98 <DESCRIPTION>{IBEGIN} {
102 <DESCRIPTION>{DEND} {
106 <DESCRIPTION>{IEND} {
110 <INITIAL,DESCRIPTION>{
ID} {
111 dataset_lval.ident = strdup (dataset_text);
116 dataset_lval.f = strtod (dataset_text, NULL);
121 if (dataset_text[0] ==
'i' || dataset_text[0] ==
'j')
122 dataset_text[0] =
'0';
124 dataset_text[1] =
'0';
125 dataset_lval.f = strtod (dataset_text, NULL);
131 while (dataset_text[i] !=
'i' && dataset_text[i] !=
'j') i++;
132 dataset_text[
i] = dataset_text[i - 1];
133 dataset_text[i - 1] =
'\0';
134 dataset_lval.c.r = strtod (dataset_text, NULL);
135 dataset_lval.c.i = strtod (&dataset_text[i], NULL);
139 <DESCRIPTION>{RINT} {
140 dataset_lval.n = strtol (dataset_text, NULL, 10);
159 <INITIAL,DESCRIPTION>. {
161 "line %d: syntax error, unrecognized character: `%s'\n",
167 <COMMENT>
\r?
\n { BEGIN(INITIAL); }
RLC_Device Node Node Value MODEL_Ident PairList Eol
< INITIAL >< INITIAL >< INITIAL >< INITIAL > return InvalidCharacter
WS[\t\n\r] SIMPLEID *[a-zA-Z_][a-zA-Z0-9_] POSTID[a-zA-Z0-9_] ID
void logprint(int level, const char *format,...)
#define Z0
Wave impedance in vacuum ( )