8 #if defined(__GNUWIN32__) && !defined(__TWIN32__)
9 #include <sys/unistd.h>
15 #define __EXTERN_C__ 1
18 #if defined(__cplusplus) || defined(__STDC__)
19 #if defined(__cplusplus) && defined(__EXTERN_C__)
26 int yyback(int *, int);
29 /* You may need to put /DLEX_SCANNER in your makefile
30 * if you're using LEX!
34 #if defined(__cplusplus) || defined(__STDC__)
35 #if defined(__cplusplus) && defined(__EXTERN_C__)
43 /* struct pexpr *expr; */
59 %token CLOSE_SQUARE 10
63 /* %type <expr> command expr arglist arg arg1 */
64 %type <s> command expr arglist arg arg1
68 commands : /* empty */
73 {process_command(proio_cons(wxmake_word($1), NULL)); free($1);}
75 {process_command($1);}
77 {syntax_error("Unrecognized command.");}
80 expr : WORD OPEN arglist CLOSE
81 {$$ = proio_cons(wxmake_word($1), $3); free($1);}
82 | OPEN_SQUARE arglist CLOSE_SQUARE
87 {$$ = proio_cons(NULL, NULL);}
89 {$$ = proio_cons($1, NULL);}
92 {$$ = proio_cons($1, $3);}
95 arg : WORD EQUALS arg1
96 {$$ = proio_cons(wxmake_word("="), proio_cons(wxmake_word($1), proio_cons($3, NULL)));
102 {$$ = wxmake_word($1); free($1);}
104 {$$ = wxmake_string($1); free($1);}
106 {$$ = wxmake_integer($1); free($1);}
107 | INTEGER PERIOD INTEGER
108 {$$ = wxmake_real($1, $3); free($1); free($3); }
109 | INTEGER EXP INTEGER
110 {$$ = wxmake_exp($1, $3); free($1); free($3); }
112 INTEGER PERIOD INTEGER EXP INTEGER
113 {$$ = wxmake_exp2($1, $3, $5); free($1); free($3);
122 /* We include lexer.c if we are building for gtk, wine or motif
123 * and also whenever we are using configure (marked by __WX_SETUP_H__) for,
124 * for example, cross compilation. */
125 #if (defined(__WXGTK__) || defined(__WXWINE__) || defined(__WXMOTIF__)) || defined(__WX_SETUP_H__) && !defined(NO_CONFIGURE)
127 #elif defined(__WXMAC__) && defined(__APPLE__)
129 #elif defined(__MWERKS__)
130 #include "../common/cwlex_yy.c"
132 #include "../common/lex_yy.c"
143 /* Ansi prototype. If this doesn't work for you... uncomment
147 void yyerror(char *s)
153 * Unfortunately, my DOS version of FLEX
154 * requires yywrap to be #def'ed, whereas
155 * the UNIX flex expects a proper function.
158 /* At least on alphaev6-dec-osf4.0e yywrap() must be #define'd.
159 * RL: ... but on Debian/Alpha(linux) it must not, so hopefully
160 * testing for __OSF__ here is what we really want.
167 /* HH: Added test for __WX_SETUP_H__ for gnuwin builds
169 #if !defined(__SC__) && !defined(__GNUWIN32__)
174 #elif !defined(__ultrix)
175 int yywrap() { return 1; }
176 #elif defined(__VMS__)
177 int yywrap() { return 1; }
179 #elif defined(__WX_SETUP_H__)
180 int yywrap() { return 1; }