mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 15:01:41 +00:00
getting closer. soon timie to start putting real code in there
This commit is contained in:
parent
7d52f12248
commit
489ddbc7a7
4 changed files with 48 additions and 2 deletions
|
@ -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
|
||||
|
|
4
tools/qfcc/source/.gitignore
vendored
4
tools/qfcc/source/.gitignore
vendored
|
@ -2,5 +2,7 @@
|
|||
Makefile.in
|
||||
Makefile
|
||||
.deps
|
||||
qc-lex.c
|
||||
qc-parse.c
|
||||
qc-parse.h
|
||||
qfcc
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
41
tools/qfcc/source/qc-lex.l
Normal file
41
tools/qfcc/source/qc-lex.l
Normal 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;
|
||||
}
|
Loading…
Reference in a new issue