python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
EOF encountered inside an action
im having this error when i run flex on this:
%{
#include "parser.tab.c"
extern "C" int yylex();
%}
%%
[0-9]+ { yylval.intVal = atoi(yytext); return INTEGER_LITERA...

Gabriel Aguiar
Votes: 0
Answers: 1
Applying YACC to GCODE (GRBL)
GCode is language used to tell multi-axis (CNC) robots how to move.
It looks like this :
M3 S5000 (Start Spindle Clockwise at 5000 RPM)
G21 (All units in mm)
G00 Z1.000000 (lift Z axis up by 1mm)
G00 ...

Richard
Votes: 0
Answers: 1
Is that possible to implement [stmt]+ in yacc?
I have a homework from school is to make a compiler in yacc
and the question is :
PROGRAM ::= STMT+
STMT ::= EXP | PRINT-STMT
.......
I try to implement STMT+ like this :
Program : STMT_PLUS { prin...
張哲銘
Votes: 0
Answers: 1
Flex: unrecognized rule `(?s:.)`
In my flex program, I am unable to use any of these regex. Usage of any of them are generating unrecognized rule error.
%{
#include<stdio.h>
%}
%option nodefault
%option noyywrap
%option outfil...

Sourav Kannantha B
Votes: 0
Answers: 1