Merge pull request #95 from davidgiven/dtrg-b

Fix occasional weird behaviour causing compilation failures in b.
This commit is contained in:
David Given 2018-06-10 21:22:26 +09:00 committed by GitHub
commit 7edc835626
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -47,7 +47,7 @@ struct hshtab hshtab[HSHSIZ];
int hshused;
int eof;
int peekc;
char ctab[128];
const char* ctab;
struct hshtab *bsym;
struct hshtab *paraml, *parame;
int cval;

View file

@ -1287,7 +1287,8 @@ int opdope[] = {
000000 /* NAME */
};
char ctab[128] = {
const char ctaba[129] = {
EOFC, /* -1 */
EOFC, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN,
LETTER, SPACE, NEWLN, SPACE, SPACE, UNKN, UNKN, UNKN,
UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN, UNKN,
@ -1305,6 +1306,7 @@ char ctab[128] = {
LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER,
LETTER, LETTER, LETTER, LBRACE, OR, RBRACE, NOT, UNKN
};
const char* ctab = &ctaba[1]; /* allows indexing with -1 */
/* debug function */
void printtoken(int tok, FILE *out)