From 9f69b006dde3c3fbe19ed3e0275d3b7348f2aa87 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 15 Mar 2020 18:19:49 +0100 Subject: New lexer --- bnf.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bnf.cpp') 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(); +} + -- cgit v1.2.3