From 304029a8d3656c0caf550357c142290d9651edd8 Mon Sep 17 00:00:00 2001 From: yhirose Date: Sat, 6 Oct 2018 17:11:51 -0400 Subject: [PATCH] fix #53 --- peglib.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/peglib.h b/peglib.h index 463cd3b..8050ec2 100644 --- a/peglib.h +++ b/peglib.h @@ -3118,6 +3118,10 @@ public: return (*grammar_)[s]; } + const Definition& operator[](const char* s) const { + return (*grammar_)[s]; + } + std::vector get_rule_names(){ std::vector rules; rules.reserve(grammar_->size());