make usage of the new parser easier to configure

This commit is contained in:
Bill Currie 2001-06-25 18:22:53 +00:00
parent ab051248e8
commit df897255ff
4 changed files with 17 additions and 2 deletions

View file

@ -4,5 +4,9 @@
#ifndef __config_h_
#define __config_h_
@TOP@
/* Define this if you want to use the new parser */
#undef NEW_PARSER
@BOTTOM@
#endif // __config_h_

View file

@ -97,6 +97,13 @@ if test "x$HAVE_QF" != xno; then
)
fi
AC_ARG_ENABLE(new-parser,
[ --enable-new-parser enable the new parser. not yet fully functional])
if test "x$enable_new_parser" = "xyes"; then
AC_DEFINE(NEW_PARSER)
fi
AM_CONDITIONAL(NEW_PARSER, test "x$enable_new_parser" = "xyes")
if test "x$HAVE_QF" = xno; then
echo '***'

View file

@ -33,5 +33,9 @@ YFLAGS = -d
bin_PROGRAMS= qfcc
qfcc_SOURCES= cmdlib.c pr_comp.c pr_def.c pr_imm.c pr_lex.c pr_opcode.c qfcc.c #qc-parse.y qc-lex.l expr.c
if NEW_PARSER
qfcc_SOURCES= cmdlib.c pr_comp.c pr_def.c pr_imm.c pr_lex.c pr_opcode.c qfcc.c qc-parse.y qc-lex.l expr.c
else
qfcc_SOURCES= cmdlib.c pr_comp.c pr_def.c pr_imm.c pr_lex.c pr_opcode.c qfcc.c
endif
qfcc_LDADD= -lQFutil

View file

@ -903,7 +903,7 @@ Options: \n\
// compile all the files
while ((src = COM_Parse (src))) {
#if 0
#ifdef NEW_PARSER
extern FILE *yyin;
int yyparse(void);
extern int lineno;