From d0b9848c54e6f85ab713f059dcd1ddef7e57caa6 Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Tue, 25 Oct 2022 20:30:28 +0100 Subject: a bunch of compiler stuff --- compiler_and_linker/FrontEnd/C/CPrepTokenizer.c | 166 ++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 compiler_and_linker/FrontEnd/C/CPrepTokenizer.c (limited to 'compiler_and_linker/FrontEnd/C/CPrepTokenizer.c') diff --git a/compiler_and_linker/FrontEnd/C/CPrepTokenizer.c b/compiler_and_linker/FrontEnd/C/CPrepTokenizer.c new file mode 100644 index 0000000..5b77268 --- /dev/null +++ b/compiler_and_linker/FrontEnd/C/CPrepTokenizer.c @@ -0,0 +1,166 @@ +#include "compiler.h" +#include "compiler/tokens.h" + +static Boolean prepnextstringchar_foundnl; + +short prepskipnextchar() { + +} + +short prepnextchar() { + +} + +short prepnextstringchar(char *str, Boolean flag) { + +} + +void CPrep_MatchChar(char ch, Boolean flag) { + +} + +char *CPrep_MatchChar2(char *str, char ch, Boolean flag) { + +} + +short prepcurchar() { + +} + +static short prepcurstringchar(char *str) { +} + +static void prepcurstringchar_skip() { +} + +char *ReadIdentifier(char *str) { +} + +static short intsuffix(short token, Boolean flag) { +} + +static short floatsuffix(short token) { +} + +static short tohex(short token) { +} + +static short nextchar(char *str) { +} + +char *CPrep_SkipNewComment(char *str) { + +} + +Boolean skipendoflinematch(char *str, Boolean flag) { +} + +void skipendofline() { +} + +void CPrep_SkipAsmComment() { +} + +static short tille() {} +static short tcret() {} +static short tapos() {} +static short tquot() {} +static short thash() {} +static short tmult() {} +static short tcolo() {} +static short tless() {} +static short tequa() {} +static short tgrea() {} +static short tatsg() {} +static short tperc() {} +static short texcl() {} +static short tplus() {} +static short tminu() {} +static short torrr() {} +static short tampe() {} +static short tpowe() {} +static short tdivi() {} +static short tzero() {} +static short tpoin() {} +static short tnumb() {} +static short tiden() {} +static short tchrL() {} +static short tchra() {} +static short tchrb() {} +static short tchrc() {} +static short tchrd() {} +static short tchre() {} +static short tchrf() {} +static short tchrg() {} +static short tchri() {} +static short tchrl() {} +static short tchrm() {} +static short tchrn() {} +static short tchro() {} +static short tchrp() {} +static short tchrr() {} +static short tchrs() {} +static short tchrt() {} +static short tchru() {} +static short tchrv() {} +static short tchrw() {} +static short tchrx() {} +static short tchr_() {} +static short token() {} +static short tdoll() {} +static short tisid() {} +static short tnull() {} +static short t0x1a() {} + +static short (*cprep_tokenize[256])() = { + &tnull, &tille, &tille, &tille, &tisid, &tisid, &tille, &tille, + &tille, &tille, &tille, &tille, &tille, &tcret, &tille, &tille, + &tille, &tille, &tille, &tille, &tille, &tille, &tille, &tille, + &tille, &tille, &t0x1a, &tille, &tille, &tille, &tille, &tille, + &tille, &texcl, &tquot, &thash, &tdoll, &tperc, &tampe, &tapos, + &token, &token, &tmult, &tplus, &token, &tminu, &tpoin, &tdivi, + &tzero, &tnumb, &tnumb, &tnumb, &tnumb, &tnumb, &tnumb, &tnumb, + &tnumb, &tnumb, &tcolo, &token, &tless, &tequa, &tgrea, &token, + &tatsg, &tiden, &tiden, &tiden, &tiden, &tiden, &tiden, &tiden, + &tiden, &tiden, &tiden, &tiden, &tchrL, &tiden, &tchrn, &tiden, + &tchrp, &tiden, &tiden, &tiden, &tiden, &tiden, &tiden, &tiden, + &tchrx, &tiden, &tiden, &token, &token, &token, &tpowe, &tchr_, + &token, &tchra, &tchrb, &tchrc, &tchrd, &tchre, &tchrf, &tchrg, + &tiden, &tchri, &tiden, &tiden, &tchrl, &tchrm, &tchrn, &tchro, + &tchrp, &tiden, &tchrr, &tchrs, &tchrt, &tchru, &tchrv, &tchrw, + &tchrx, &tiden, &tiden, &token, &torrr, &token, &token, &tille, + &tille, &tille, &tille, &tille, &tille, &tille, &tille, &tille, + &tille, &tille, &tille, &tille, &tille, &tille, &tille, &tille, + &tille, &tille, &tille, &tille, &tille, &tille, &tille, &tille, + &tille, &tille, &tille, &tille, &tille, &tille, &tille, &tille, + &tille, &tille, &tille, &tille, &tille, &tille, &tille, &tille, + &tille, &tille, &tille, &tille, &tille, &tille, &tille, &tille, + &tille, &tille, &tille, &tille, &tille, &tille, &tille, &tille, + &tille, &tille, &tille, &tille, &tille, &tille, &tille, &tille, + &tille, &tille, &tille, &tille, &tille, &tille, &tille, &tille, + &tille, &tille, &tille, &tille, &tille, &tille, &tille, &tille, + &tille, &tille, &tille, &tille, &tille, &tille, &tille, &tille, + &tille, &tille, &tille, &tille, &tille, &tille, &tille, &tille, + &tille, &tille, &tille, &tille, &tille, &tille, &tille, &tille, + &tille, &tille, &tille, &tille, &tille, &tille, &tille, &tille, + &tille, &tille, &tille, &tille, &tille, &tille, &tille, &tille, + &tille, &tille, &tille, &tille, &tille, &tille, &tille, &tille +}; + +short lookahead() { +} + +short lookahead_noeol() { +} + +static void CPrep_StringConCat(Boolean flag) { +} + +short lex() { +} + +short plex() { +} + +short lexidentifier() { +} -- cgit v1.2.3