Browse Source

xpressn.c: reduce number of (forbidden) keywords

to what is actually used
pre-master-46
h_vogt 13 years ago
committed by rlar
parent
commit
d4d3910e5a
  1. 2
      src/frontend/numparam/numparam.h
  2. 5
      src/frontend/numparam/xpressn.c

2
src/frontend/numparam/numparam.h

@ -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 */

5
src/frontend/numparam/xpressn.c

@ -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"
" include for to downto is var");
"and or not div mod defined");
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;

Loading…
Cancel
Save