From 7f276d73751538df9cf0c15bccd74ee924b4679e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Mon, 2 Jan 2017 16:04:07 +0100 Subject: [PATCH] Added SLR(1) support in inputparser --- src/inputparser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/inputparser.cpp b/src/inputparser.cpp index eaa5a07..2db47f4 100644 --- a/src/inputparser.cpp +++ b/src/inputparser.cpp @@ -34,6 +34,8 @@ namespace pds { if(token.type == ParsodusLexer::PARSERTYPE) { if(token.content == "lalr(1)") { config.parserType = util::ParserType::LALR_1; + } else if(token.content == "SLR(1)") { + config.parserType = util::ParserType::SLR_1; } else throw InputParserException("Unkown parser type"); } else { @@ -108,9 +110,7 @@ namespace pds { } } - } catch(ParsodusLexer::NoMoreTokens& err) { - - } + } catch(ParsodusLexer::NoMoreTokens& err) {} return config; } void InputParser::lexColon(ParsodusLexer& lex, ParsodusLexer::Token &token, bool nextoken) {