Expected identifier or '(' in the first % , I have no clue why this is an error , I am new coding for yacc. I have checked multipule times the syntax but didn't find anything.
%{
#include <stdio.h>
#include <stdlib.h>
#include "global.h"
extern int line_number;
int yylex(void);
void yyerror(char *s);
node * root;
%}