From: NeilBrown Date: Sat, 10 May 2014 23:40:32 +0000 (+1000) Subject: pargergen: don't ignore first token X-Git-Tag: workingparser~47 X-Git-Url: https://ocean-lang.org/code/?p=ocean;a=commitdiff_plain;h=dd4c895dd27110f738c991ff53d683479a1b285f pargergen: don't ignore first token When parsing the grammar we currently skip the first token by mistake. It is often a TK_newline so not much is lost. But not always... Signed-off-by: NeilBrown --- diff --git a/csrc/parsergen.mdc b/csrc/parsergen.mdc index 1bb813e..aae8a3f 100644 --- a/csrc/parsergen.mdc +++ b/csrc/parsergen.mdc @@ -545,7 +545,7 @@ Now we are ready to read in the grammar. }; struct token_state *state = token_open(code, &conf); - struct token tk = token_next(state); + struct token tk; struct symbol *head = NULL; struct grammar *g; char *err = NULL;