7 #if defined(__GNUWIN32__) && !defined(__TWIN32__)
8 #include <sys/unistd.h>
14 #define __EXTERN_C__ 1
17 #if defined(__cplusplus) || defined(__STDC__)
18 #if defined(__cplusplus) && defined(__EXTERN_C__)
25 int yyback(int *, int);
28 /* You may need to put /DLEX_SCANNER in your makefile
29 * if you're using LEX!
33 #if defined(__cplusplus) || defined(__STDC__)
34 #if defined(__cplusplus) && defined(__EXTERN_C__)
42 /* struct pexpr *expr; */
58 %token CLOSE_SQUARE 10
62 /* %type <expr> command expr arglist arg arg1 */
63 %type <s> command expr arglist arg arg1
67 commands : /* empty */
72 {process_command(proio_cons(wxmake_word($1), NULL)); free($1);}
74 {process_command($1);}
76 {syntax_error("Unrecognized command.");}
79 expr : WORD OPEN arglist CLOSE
80 {$$ = proio_cons(wxmake_word($1), $3); free($1);}
81 | OPEN_SQUARE arglist CLOSE_SQUARE
86 {$$ = proio_cons(NULL, NULL);}
88 {$$ = proio_cons($1, NULL);}
91 {$$ = proio_cons($1, $3);}
94 arg : WORD EQUALS arg1
95 {$$ = proio_cons(wxmake_word("="), proio_cons(wxmake_word($1), proio_cons($3, NULL)));
101 {$$ = wxmake_word($1); free($1);}
103 {$$ = wxmake_string($1); free($1);}
105 {$$ = wxmake_integer($1); free($1);}
106 | INTEGER PERIOD INTEGER
107 {$$ = wxmake_real($1, $3); free($1); free($3); }
108 | INTEGER EXP INTEGER
109 {$$ = wxmake_exp($1, $3); free($1); free($3); }
111 INTEGER PERIOD INTEGER EXP INTEGER
112 {$$ = wxmake_exp2($1, $3, $5); free($1); free($3);
121 /* We include lexer.c if we are building for gtk, wine or motif
122 * and also whenever we are using configure (marked by __WX_SETUP_H__) for,
123 * for example, cross compilation. */
124 #if (defined(__WXGTK__) || defined(__WXWINE__) || defined(__WXMOTIF__)) || defined(__WX_SETUP_H__) && !defined(NO_CONFIGURE)
127 #if (defined(__MWERKS__))
128 #include "../common/cwlex_yy.c"
130 #include "../common/lex_yy.c"
142 /* Ansi prototype. If this doesn't work for you... uncomment
146 void yyerror(char *s)
152 * Unfortunately, my DOS version of FLEX
153 * requires yywrap to be #def'ed, whereas
154 * the UNIX flex expects a proper function.
157 /* At least on alphaev6-dec-osf4.0e yywrap() must be #define'd.
158 * RL: ... but on Debian/Alpha(linux) it must not, so hopefully
159 * testing for __OSF__ here is what we really want.
166 /* HH: Added test for __WX_SETUP_H__ for gnuwin builds
168 #if !defined(__SC__) && !defined(__GNUWIN32__)
173 #elif !defined(__ultrix)
174 int yywrap() { return 1; }
175 #elif defined(__VMS__)
176 int yywrap() { return 1; }
178 #elif defined(__WX_SETUP_H__)
179 int yywrap() { return 1; }