commandline session
/* Reverse polish notation calculator. */
%{
#define YYSTYPE double
#include
%}
%token NUM
%% /* Grammar rules and actions follow */
$ 4.2.36 19 519---> bison rpcalc.y
rpcalc.y:11.1: syntax error, unexpected end of file
$ 4.2.36 20 520--->
$ 4.2.36 1 501---> vim la.y
$ 4.2.36 2 502---> bison la.y
la.y:6.1: invalid character: `#'
la.y:6.2-8: syntax error, unexpected identifier
$ 4.2.36 3 503---> mv la.y la.c
$ 4.2.36 4 504---> gcc la.c
la.c: In function ‘yylex’:
la.c:18:18: error: ‘stdin’ undeclared (first use in this function)
la.c:18:18: note: each undeclared identifier is reported only once for each function it appears in
la.c:19:7: warning: incompatible implicit declaration of built-in function ‘scanf’ [enabled by default]
la.c:19:22: error: ‘yylval’ undeclared (first use in this function)
la.c:20:14: error: ‘NUM’ undeclared (first use in this function)
la.c:23:12: error: ‘EOF’ undeclared (first use in this function)