6 #if defined(__GNUWIN32__) && !defined(__TWIN32__)
7 #include <sys/unistd.h>
13 #define __EXTERN_C__ 1
16 #if defined(__cplusplus) || defined(__STDC__)
17 #if defined(__cplusplus) && defined(__EXTERN_C__)
24 int yyback(int *, int);
27 /* You may need to put /DLEX_SCANNER in your makefile
28 * if you're using LEX!
31 /* int yyoutput(int); */
37 #if defined(__cplusplus) || defined(__STDC__)
38 #if defined(__cplusplus) && defined(__EXTERN_C__)
46 /* struct pexpr *expr; */
62 %token CLOSE_SQUARE 10
66 /* %type <expr> command expr arglist arg arg1 */
67 %type <s> command expr arglist arg arg1
71 commands : /* empty */
76 {process_command(proio_cons(make_word($1), NULL)); free($1);}
78 {process_command($1);}
80 {syntax_error("Unrecognized command.");}
83 expr : WORD OPEN arglist CLOSE
84 {$$ = proio_cons(make_word($1), $3); free($1);}
85 | OPEN_SQUARE CLOSE_SQUARE
86 {$$ = proio_cons(NULL, NULL);}
87 | OPEN_SQUARE arglist CLOSE_SQUARE
94 {$$ = proio_cons($1, NULL);}
97 {$$ = proio_cons($1, $3);}
100 arg : WORD EQUALS arg1
101 {$$ = proio_cons(make_word("="), proio_cons(make_word($1), proio_cons($3, NULL)));
107 {$$ = make_word($1); free($1);}
109 {$$ = make_string($1); free($1);}
111 {$$ = make_integer($1); free($1);}
112 | INTEGER PERIOD INTEGER
113 {$$ = make_real($1, $3); free($1); free($3); }
114 | INTEGER EXP INTEGER
115 {$$ = make_exp($1, $3); free($1); free($3); }
117 INTEGER PERIOD INTEGER EXP INTEGER
118 {$$ = make_exp2($1, $3, $5); free($1); free($3);
127 #if (defined(__WXGTK__) || defined(__WXMOTIF__)) && !defined(NO_CONFIGURE)
130 #if (defined(__MWERKS__))
131 #include "../common/cwlex_yy.c"
133 #include "../common/lex_yy.c"
145 /* Ansi prototype. If this doesn't work for you... uncomment
149 void yyerror(char *s)
155 * Unfortunately, my DOS version of FLEX
156 * requires yywrap to be #def'ed, whereas
157 * the UNIX flex expects a proper function.
160 /* Not sure if __SC__ is the appropriate thing
169 #else if !defined(__alpha___) && !defined(__ultrix)
170 int yywrap() { return 1; }