From 296ffb87b6f8ed5d0867ba099e72109797e42857 Mon Sep 17 00:00:00 2001 From: "Sven M. Hallberg" Date: Tue, 30 Apr 2013 17:48:24 +0200 Subject: [PATCH] const adjustments to ll backend --- src/backends/ll.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backends/ll.c b/src/backends/ll.c index 0c6ad90..20f4761 100644 --- a/src/backends/ll.c +++ b/src/backends/ll.c @@ -104,7 +104,7 @@ static void collect_nts(HCFGrammar *grammar, HCFChoice *symbol) } /* Does the given symbol derive the empty string (under g)? */ -bool h_symbol_derives_epsilon(HCFGrammar *g, HCFChoice *symbol) +bool h_symbol_derives_epsilon(HCFGrammar *g, const HCFChoice *symbol) { if(g->geneps == NULL) collect_geneps(g); @@ -121,7 +121,7 @@ bool h_symbol_derives_epsilon(HCFGrammar *g, HCFChoice *symbol) } /* Does the sentential form given by s derive the empty string? */ -bool h_sequence_derives_epsilon(HCFGrammar *g, HCFSequence *s) +bool h_sequence_derives_epsilon(HCFGrammar *g, const HCFSequence *s) { // return true iff all symbols in s derive epsilon HCFChoice **x; @@ -150,7 +150,7 @@ static void collect_geneps(HCFGrammar *g) HHashTableEntry *hte; for(i=0; i < g->nts->capacity; i++) { for(hte = &g->nts->contents[i]; hte; hte = hte->next) { - HCFChoice *symbol = hte->key; + const HCFChoice *symbol = hte->key; // only "choice" nonterminals can derive epsilon. if(symbol->type != HCF_CHOICE)