[executable semantics] Minimal cxx parser (#363)

Makes a minimal transition to using C++ in the parser.
This commit is contained in:
Dave Abrahams
2021-03-09 20:46:52 -08:00
committed by GitHub
parent 07a37933c6
commit 436a9dda79
5 changed files with 91 additions and 92 deletions
+2 -1
View File
@@ -7,6 +7,7 @@
#include <iostream>
#include "executable_semantics/syntax/parse_and_lex_context.h"
#include "executable_semantics/syntax/parser.h"
#include "executable_semantics/tracing_flag.h"
extern FILE* yyin;
@@ -28,7 +29,7 @@ auto parse(const std::string& inputFileName)
std::optional<AST> parsedInput = std::nullopt;
ParseAndLexContext context(inputFileName);
auto syntaxErrorCode = yyparse(parsedInput, context);
auto syntaxErrorCode = yy::parser(parsedInput, context)();
if (syntaxErrorCode != 0) {
return syntaxErrorCode;
}