9 #if defined(__cplusplus) || defined(__STDC__)
10 #if defined(__cplusplus) && defined(__EXTERN_C__)
17 int yyback(int *, int);
20 /* You may need to put /DLEX_SCANNER in your makefile
21 * if you're using LEX!
24 /* int yyoutput(int); */
30 #if defined(__cplusplus) || defined(__STDC__)
31 #if defined(__cplusplus) && defined(__EXTERN_C__)
39 /* struct pexpr *expr; */
55 %token CLOSE_SQUARE 10
59 /* %type <expr> command expr arglist arg arg1 */
60 %type <s> command expr arglist arg arg1
64 commands : /* empty */
69 {process_command(proio_cons(make_word($1), NULL)); free($1);}
71 {process_command($1);}
73 {syntax_error("Unrecognized command.");}
76 expr : WORD OPEN arglist CLOSE
77 {$$ = proio_cons(make_word($1), $3); free($1);}
78 | OPEN_SQUARE CLOSE_SQUARE
79 {$$ = proio_cons(NULL, NULL);}
80 | OPEN_SQUARE arglist CLOSE_SQUARE
87 {$$ = proio_cons($1, NULL);}
90 {$$ = proio_cons($1, $3);}
93 arg : WORD EQUALS arg1
94 {$$ = proio_cons(make_word("="), proio_cons(make_word($1), proio_cons($3, NULL)));
100 {$$ = make_word($1); free($1);}
102 {$$ = make_string($1); free($1);}
104 {$$ = make_integer($1); free($1);}
105 | INTEGER PERIOD INTEGER
106 {$$ = make_real($1, $3); free($1); free($3); }
107 | INTEGER EXP INTEGER
108 {$$ = make_exp($1, $3); free($1); free($3); }
110 INTEGER PERIOD INTEGER EXP INTEGER
111 {$$ = make_exp2($1, $3, $5); free($1); free($3);
120 #include "../common/lex_yy.c"
130 /* Ansi prototype. If this doesn't work for you... uncomment
134 void yyerror(char *s)
140 * Unfortunately, my DOS version of FLEX
141 * requires yywrap to be #def'ed, whereas
142 * the UNIX flex expects a proper function.
145 /* Not sure if __SC__ is the appropriate thing
154 #else if !defined(__alpha) && !defined(__ultrix)
155 int yywrap() { return 1; }