forked from GitHub/gf-core
The CF parser in GF.Grammar.CF assigns function names to the rules, but they are not always unique, causing rules to be dropped in the follwing CF->GF conversion. So a pass has been added before the CF->GF conversion, to make sure that function names are unique. A comment says "rules have an amazingly easy parser", but the parser looks like quick hack. It is very sloppy and silently ignores many errors, e.g. - Explicitly given function names should end with '.', but if the do not, the last character in the function name is silently dropped. - Everything following a ';' is silently dropped.