add LALR conflict resolution (untested)

This commit is contained in:
Sven M. Hallberg 2013-06-13 14:45:26 +02:00
parent ddfd3796a7
commit fd297b636c
3 changed files with 138 additions and 38 deletions

View file

@ -51,6 +51,11 @@ HCFGrammar *h_cfgrammar(HAllocator* mm__, const HParser *parser)
if(desugared == NULL)
return NULL; // -> backend not suitable for this parser
return h_cfgrammar_(mm__, desugared);
}
HCFGrammar *h_cfgrammar_(HAllocator* mm__, HCFChoice *desugared)
{
HCFGrammar *g = h_cfgrammar_new(mm__);
// recursively traverse the desugared form and collect all HCFChoices that