getting closer. soon timie to start putting real code in there

This commit is contained in:
Bill Currie 2001-06-12 21:06:28 +00:00
parent 7d52f12248
commit 489ddbc7a7
4 changed files with 48 additions and 2 deletions

View file

@ -20,6 +20,8 @@ dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_CC
AC_PROG_CPP
AC_PROG_YACC
AM_PROG_LEX
set $CC
if test "$1" = gcc; then

View file

@ -2,5 +2,7 @@
Makefile.in
Makefile
.deps
qc-lex.c
qc-parse.c
qc-parse.h
qfcc

View file

@ -29,8 +29,9 @@
AUTOMAKE_OPTIONS= foreign
INCLUDES= -I$(top_srcdir)/include
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
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
qfcc_LDADD= -lQFutil

View file

@ -0,0 +1,41 @@
%{
#include "qfcc.h"
#include "qc-parse.h"
#define YY_NO_UNPUT
%}
DIGIT [0-9]
ID [a-zA-Z_][a-zA-Z_0-9]*
%%
{DIGIT}+"."{DIGIT}*
{ID}
"!"|"("|")"|"{"|"}"|"."|"*"|"/"|"&"|"|"|"+"|"-"|"="|"["|"]" return yytext[0];
"&&" return AND;
"||" return OR;
"==" return EQ;
"!=" return NE;
"<=" return LE;
">=" return GE;
"<" return LT;
">" return GT;
^#
\n
.
%%
int
yywrap (void)
{
return 1;
}