shithub: scc

Download patch

ref: f69acd24b277d282010482c659f286050f05a926
parent: 9a720370111cf87f4a1a9c2665c5e12f5c04855c
author: Roberto E. Vargas Caballero <[email protected]>
date: Tue Mar 25 08:46:27 EDT 2014

Remove syntax.h

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

--- 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);
--- 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());
--- a/syntax.h
+++ /dev/null
@@ -1,24 +1,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
--- a/tokens.h
+++ b/tokens.h
@@ -64,7 +64,7 @@
 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