mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 18:52:07 +00:00
Adapt the RGBASM parser to C++ (#1333)
This uses variants instead of a `%union`, and "complete symbols" that can call complex constructors.
This commit is contained in:
1
src/asm/.gitignore
vendored
1
src/asm/.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
/parser.cpp
|
||||
/parser.hpp
|
||||
/stack.hh
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -399,8 +399,9 @@ int main(int argc, char *argv[]) {
|
||||
// Init lexer and file stack, providing file info
|
||||
fstk_Init(mainFileName, maxDepth);
|
||||
|
||||
// Perform parse (yyparse is auto-generated from `parser.y`)
|
||||
if (yyparse() != 0 && nbErrors == 0)
|
||||
// Perform parse
|
||||
yy::parser parser;
|
||||
if (parser.parse() != 0 && nbErrors == 0)
|
||||
nbErrors = 1;
|
||||
|
||||
if (dependfile)
|
||||
|
||||
1323
src/asm/parser.y
1323
src/asm/parser.y
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user