iris

small scheme interpreter
git clone git://git.2f30.org/iris.git
Log | Files | Refs | LICENSE

commit bec65ea41fc70098f3ad8def1f749df019a59245
parent 957be47ca3edb0e5d2365360a479d91190db0fc2
Author: sin <sin@2f30.org>
Date:   Sun May 11 14:46:51 +0100

No need to pushback on errors

Diffstat:
lexer.c | 9---------
1 file changed, 0 insertions(+), 9 deletions(-)
diff --git a/lexer.c b/lexer.c @@ -100,7 +100,6 @@ again: tok.type = Error; tok.s = "malformed identifier"; tok.e = NULL; - ungetc(*e, in); return tok; } break; @@ -113,7 +112,6 @@ again: tok.type = Error; tok.s = "not a boolean or a character"; tok.e = NULL; - ungetc(*e, in); return tok; } break; @@ -128,7 +126,6 @@ again: tok.type = Error; tok.s = "missing delimiter after boolean"; tok.e = NULL; - ungetc(*e, in); return tok; case State_Number: if (delim(*e) != 0) { @@ -142,7 +139,6 @@ again: tok.type = Error; tok.s = "not a number"; tok.e = NULL; - ungetc(*e, in); return tok; } break; @@ -151,7 +147,6 @@ again: tok.type = Error; tok.s = "not a number"; tok.e = NULL; - ungetc(*e, in); return tok; } state = State_Number; @@ -163,7 +158,6 @@ again: tok.type = Error; tok.s = "expected character constant"; tok.e = NULL; - ungetc(*e, in); return tok; } break; @@ -178,7 +172,6 @@ again: tok.type = Error; tok.s = "missing delimiter after character constant"; tok.e = NULL; - ungetc(*e, in); return tok; case State_Probable_String: if (*e == '"') @@ -225,13 +218,11 @@ again: tok.type = Error; tok.s = "illegal input"; tok.e = NULL; - ungetc(*e, in); return tok; default: tok.type = Error; tok.s = "internal lex error"; tok.e = NULL; - ungetc(*e, in); return tok; } e++;