From: NeilBrown Date: Fri, 12 Jul 2013 21:15:32 +0000 (+1000) Subject: scanner: make the array of known words "const" X-Git-Tag: draftparser~15 X-Git-Url: https://ocean-lang.org/code/?p=ocean;a=commitdiff_plain;h=4cba12dc4e8b2cef223f904810164804f3f1347e scanner: make the array of known words "const" After all, it shouldn't change. Signed-off-by: NeilBrown --- diff --git a/csrc/scanner.mdc b/csrc/scanner.mdc index 547a037..48563ca 100644 --- a/csrc/scanner.mdc +++ b/csrc/scanner.mdc @@ -261,7 +261,7 @@ Tokens matching these known words are reported as the index of the list added to `TK_reserved`. ###### token config parameters - char **words_marks; + const char **words_marks; int known_count; ###### parse word @@ -1878,7 +1878,7 @@ the tokens one per line. int len; char *file; struct token_state *state; - char *known[] = { + const char *known[] = { "==", "else", "if",