Skip to content

Commit

Permalink
[ #266 C++ NoSTL ] fixed Skeleton by filtering out defined rules
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed Jan 3, 2020
1 parent 07d3b9d commit d239f23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/src/BNFC/Backend/CPP/NoSTL/CFtoCVisitSkel.hs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ prDataH (cat, rules) =

--Visit functions for a rule.
prRuleH :: Rule -> String
prRuleH (Rule fun _ _ _) | not (isCoercion fun) = concat
prRuleH (Rule fun _ _ _) | not (isCoercion fun) && not (isDefinedRule fun) = concat
[" void visit", fun, "(", fun, " *", fnm, ");\n"]
where
fnm = mkVariable fun
Expand Down Expand Up @@ -200,7 +200,7 @@ prData user (cat, rules) =
"}",
""
] --Not a list:
else abstract ++ (concatMap (render . prRule) rules)
else abstract ++ (concatMap (render . prRule) $ filter (not . isDefinedRule . funRule) rules)
where
cl = identCat (normCat cat)
vname = mkVariable cl
Expand Down

0 comments on commit d239f23

Please sign in to comment.