diff options
| author | hallgren <hallgren@chalmers.se> | 2015-08-28 13:59:43 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2015-08-28 13:59:43 +0000 |
| commit | 5bfaf10de597af504e6d2784309e533b09a6451c (patch) | |
| tree | c0aacba9c492304cb3b0f905aa05bbefa1599d2c /src/compiler/GF/Grammar/CFG.hs | |
| parent | f2952768d578309a8f75c7da417e3602c4d5e9e9 (diff) | |
Comment out some dead code found with -fwarn-unused-binds
Also fixed some warnings and tightened some imports
Diffstat (limited to 'src/compiler/GF/Grammar/CFG.hs')
| -rw-r--r-- | src/compiler/GF/Grammar/CFG.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/GF/Grammar/CFG.hs b/src/compiler/GF/Grammar/CFG.hs index 93bce2aad..9f4dd49a9 100644 --- a/src/compiler/GF/Grammar/CFG.hs +++ b/src/compiler/GF/Grammar/CFG.hs @@ -153,13 +153,13 @@ removeLeftRecursion gr -- note: the rest don't occur in the original grammar cats = allCats gr - rules = allRules gr +-- rules = allRules gr directLeftCorner = mkRel [(NonTerminal c,t) | CFRule c (t:_) _ <- allRules gr] - leftCorner = reflexiveClosure_ (map NonTerminal cats) $ transitiveClosure directLeftCorner +-- leftCorner = reflexiveClosure_ (map NonTerminal cats) $ transitiveClosure directLeftCorner properLeftCorner = transitiveClosure directLeftCorner properLeftCornersOf = Set.toList . allRelated properLeftCorner . NonTerminal - isProperLeftCornerOf = flip (isRelatedTo properLeftCorner) +-- isProperLeftCornerOf = flip (isRelatedTo properLeftCorner) leftRecursive = reflexiveElements properLeftCorner isLeftRecursive = (`Set.member` leftRecursive) @@ -167,7 +167,7 @@ removeLeftRecursion gr retained = cfgStartCat gr `Set.insert` Set.fromList [a | r <- allRules (filterCFGCats (not . isLeftRecursive . NonTerminal) gr), NonTerminal a <- ruleRhs r] - isRetained = (`Set.member` retained) +-- isRetained = (`Set.member` retained) retainedLeftRecursive = filter (isLeftRecursive . NonTerminal) $ Set.toList retained |
