Good evening!! Apparently i am having problems with this languages and it is very hard to find answers on the web about it.
I am trying to run a program from Oreily Flex and Bison
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/* simplest version of calculator */
%{
#include <stdio.h>
%}
/* declare tokens */
%token NUMBER
%token ADD SUB MUL DIV ABS
%token EOL
%%
calclist:
| calclist exp EOL { printf("= %d\n", $1); }
;
exp: factor default $$ = $1