Wilfred/babyc

Question

Closed this issue · 3 comments

i already have flex installed on the computer, and still got the error that i had sent you.

What were the versions of flex, clang and yacc you utilized?

hhnr commented

Same problem. I'm getting the following error while running make.

make
yacc -d babyc_parse.y -o build/y.tab.c
Usage: yacc [options] filename

Options:
-b file_prefix set filename prefix (default "y.")
-B create a backtracking parser
-d write definitions (.tab.h)
-i write interface (y.tab.i)
-g write a graphical description
-l suppress #line directives
-L enable position processing, e.g., "%locations"
-o output_file (default ".tab.c")
-p symbol_prefix set symbol prefix (default "yy")
-P create a reentrant parser, e.g., "%pure-parser"
-r produce separate code and table files (y.code.c)
-s suppress #define's for quoted names in %token lines
-t add debugging support
-v write description (y.output)
-V show version information and exit
Makefile:18: recipe for target 'build/y.tab.h' failed
make: *** [build/y.tab.h] Error 1

$ yacc --version
bison (GNU Bison) 3.0.4
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ lex --version
lex 2.5.39

$ clang --version
clang version 3.6.2 (tags/RELEASE_362/final)
Target: i386-pc-linux-gnu
Thread model: posix

What version are you using?

It's weird that it's only using the -d and -o arguments but the help you're seeing documents those arguments.

hhnr commented

The problem is solved after installing GNU bison. I think i have previously installed byacc. Thanks for the help. Please add this in Read me.