summaryrefslogtreecommitdiffhomepage
path: root/bnf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bnf.cpp')
-rw-r--r--bnf.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/bnf.cpp b/bnf.cpp
index 4dd896e..32e1175 100644
--- a/bnf.cpp
+++ b/bnf.cpp
@@ -68,3 +68,8 @@ BNF SubBNF(const BNF& bnf, const std::string& top)
return result;
}
+bool isTerminal(const BNF& bnf, const std::string& symbol)
+{
+ return bnf.find(symbol) == bnf.end();
+}
+