On Sat, Feb 18, 2012 at 4:28 PM, Toby Thain <toby at telegraphics.com.au> wrote:
FWIW, my PDP-8 (PAL-III compatible) cross-assembler is
here:
http://telegraphics.com.au/svn/dpa/trunk
Hi, Toby,
I tried to build this on my Ubuntu 11.04 laptop and it did not go well.
I installed flex 2.5.35, and bison 2.4.1, and I'm using gcc 4.5.2 (all
installed from packages). Here's what I'm getting...
$ make
cc -O2 -W -Wall -I. -c -o main.o main.c
cc -O2 -W -Wall -I. -c -o str.o str.c
cc -O2 -W -Wall -I. -c -o error.o error.c
cc -O2 -W -Wall -I. -c -o assign.o assign.c
cc -O2 -W -Wall -I. -c -o symtab.o symtab.c
cc -O2 -W -Wall -I. -c -o object.o object.c
cc -O2 -W -Wall -I. -c -o gpl.o gpl.c
cc -O2 -W -Wall -I. -c -o list.o list.c
bison -y -d pdp8/parser.y
mv y.tab.c pdp8/parser.tab.c
mv y.tab.h pdp8/parser.tab.h
flex -t pdp8/lexer.l > pdp8/lexer.c
cc -O2 -W -Wall -I. -c -o pdp8/lexer.o pdp8/lexer.c
<stdout>:1180:17: warning: ?yyunput? defined but not used
<stdout>:1221:16: warning: ?input? defined but not used
cc -O2 -W -Wall -I. -c -o pdp8/parser.tab.o pdp8/parser.tab.c
pdp8/parser.y:25:20: error: ?TOK_SYM? undeclared here (not in a function)
y.tab.c: In function ?yyparse?:
y.tab.c:1339:7: warning: implicit declaration of function ?yylex?
make: *** [pdp8/parser.tab.o] Error 1
rm pdp8/lexer.c
I've been building programs from source on UNIX for a long time, but I
never really got a handle on how to debug problems in lex/yacc files.
Any suggestions? The README mentions several environments where it
was successfully built and tested. Could this be a tool-chain version
problem? I see your pointer to getting 'flex' points to a
presently-non-existent page on the
gnu.org website (the current page
is on the FSF wiki at
http://directory.fsf.org/wiki/Flex), so it makes
me wonder if there haven't been "improvements" in flex that are not
backwards compatible with older sources.
Thanks for any tips. I'd love to get a working cross-assembler
environment going.
-ethan