scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit f69acd24b277d282010482c659f286050f05a926
parent 9a720370111cf87f4a1a9c2665c5e12f5c04855c
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 25 Mar 2014 12:46:27 +0100

Remove syntax.h

This file is not going to be used anymore, so remove it.

Diffstat:
Mexpr.c | 1-
Mmain.c | 6++----
Dsyntax.h | 24------------------------
Mtokens.h | 2+-
4 files changed, 3 insertions(+), 30 deletions(-)

diff --git a/expr.c b/expr.c @@ -5,7 +5,6 @@ #include "code.h" #include "tokens.h" #include "symbol.h" -#include "syntax.h" struct ctype *expr(void); diff --git a/main.c b/main.c @@ -4,16 +4,14 @@ #include "cc.h" #include "tokens.h" -#include "syntax.h" -extern void open_file(const char *file); +extern void extdecl(void), init_keywords(void), open_file(const char *file); + struct user_opt options; int main(int argc, char *argv[]) { - extern void extdecl(void); - init_keywords(); open_file(NULL); for (next(); yytoken != EOFTOK; extdecl()); diff --git a/syntax.h b/syntax.h @@ -1,24 +0,0 @@ -#ifndef SYNTAX_H -#define SYNTAX_H - -#if ! __bool_true_false_are_defined -# include <stdbool.h> -#endif - -extern unsigned char curctx; -extern uint8_t namespace; - -enum opcode { - OARY, OCALL, OFIELD, OPTR, OPOSTINC, OPOSTDEC, - OPREINC, OPREDEC, OADDR, OINDIR, OMINUS, OPLUS, - OCPL, ONEG, OMUL, ODIV, OMOD, OADD, OSUB, OSHL, - OSHR, OLT, OGT, OGE, OLE, OEQ, ONE, OBAND, OBXOR, - OBOR, OAND, OOR, OTERN, OASSIGN, OA_MUL, OA_DIV, - OA_MOD, OA_ADD, OA_SUB, OA_SHL, OA_SHR, OA_AND, - OA_XOR, OA_OR, OSYM, OCOMP, OSWITCH, OIF, OFOR, - OFEXP, ODO, OWHILE, OLABEL, OGOTO, OBREAK, OCONT, - ORETURN, OCASE, ODEFAULT, OFTN, ODEF, O2EXP -}; - - -#endif diff --git a/tokens.h b/tokens.h @@ -64,7 +64,7 @@ extern char yytext[]; extern uint8_t yytoken, yyntoken; -extern void init_lex(void), init_keywords(void), expect(uint8_t tok); extern uint8_t next(void); +extern void expect(uint8_t tok); #endif