xpressn.c: reduce number of (forbidden) keywords

to what is actually used
This commit is contained in:
h_vogt 2013-05-26 15:31:49 +02:00 committed by rlar
parent b76f9084bd
commit d4d3910e5a
2 changed files with 3 additions and 4 deletions

View File

@ -16,7 +16,7 @@ typedef enum {Nodekey = '#'} _nNodekey; /* Introduces node symbol */
typedef enum {Intro = '&'} _nIntro; /* Introduces preprocessor tokens */ typedef enum {Intro = '&'} _nIntro; /* Introduces preprocessor tokens */
typedef enum {Comment = '*'} _nComment; /* Spice Comment lines */ typedef enum {Comment = '*'} _nComment; /* Spice Comment lines */
typedef enum {Psp = '{'} _nPsp; /* Ps expression */ typedef enum {Psp = '{'} _nPsp; /* Ps expression */
typedef enum {Defd = 15} _nDefd; /* serial numb. of 'defined' keyword. typedef enum {Defd = 6} _nDefd; /* serial numb. of 'defined' keyword.
The others are not used (yet) */ The others are not used (yet) */
typedef char *auxtable; /* dummy */ typedef char *auxtable; /* dummy */

View File

@ -88,8 +88,7 @@ initkeys(void)
{ {
spice_dstring_init(&keyS); spice_dstring_init(&keyS);
scopy_up(&keyS, scopy_up(&keyS,
"and or not div mod if else end while macro funct defined" "and or not div mod defined");
" include for to downto is var");
scopy_up(&fmathS, scopy_up(&fmathS,
"sqr sqrt sin cos exp ln arctan abs pow pwr max min int log sinh cosh" "sqr sqrt sin cos exp ln arctan abs pow pwr max min int log sinh cosh"
" tanh ternary_fcn v agauss sgn gauss unif aunif limit ceil floor"); " tanh ternary_fcn v agauss sgn gauss unif aunif limit ceil floor");
@ -935,7 +934,7 @@ opfunctkey(tdico *dico,
/*if kw operator keyword, c=token*/ /*if kw operator keyword, c=token*/
switch (kw) switch (kw)
{ {
/* & | ~ DIV MOD Defined */ /* & | ~ DIV MOD Defined */
case 1: case 1:
c = '&'; c = '&';
state = 2; state = 2;