mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 18:52:07 +00:00
Comment the parsers better (#1463)
This commit is contained in:
@@ -51,6 +51,8 @@
|
||||
};
|
||||
}
|
||||
|
||||
/******************** Tokens and data types ********************/
|
||||
|
||||
%token YYEOF 0 "end of file"
|
||||
%token newline
|
||||
%token COMMA ","
|
||||
@@ -78,6 +80,8 @@
|
||||
|
||||
%%
|
||||
|
||||
/******************** Parser rules ********************/
|
||||
|
||||
lines:
|
||||
%empty
|
||||
| line lines
|
||||
@@ -147,7 +151,7 @@ optional:
|
||||
context.lineNo __VA_OPT__(, ) __VA_ARGS__ \
|
||||
)
|
||||
|
||||
// Lexer.
|
||||
/******************** Lexer ********************/
|
||||
|
||||
struct LexerStackEntry {
|
||||
std::filebuf file;
|
||||
@@ -366,7 +370,7 @@ yy::parser::symbol_type yylex() {
|
||||
// Not marking as unreachable; this will generate a warning if any codepath forgets to return.
|
||||
}
|
||||
|
||||
// Semantic actions.
|
||||
/******************** Semantic actions ********************/
|
||||
|
||||
static std::array<std::vector<uint16_t>, SECTTYPE_INVALID> curAddr;
|
||||
static SectionType activeType; // Index into curAddr
|
||||
@@ -677,7 +681,7 @@ static void placeSection(std::string const &name, bool isOptional) {
|
||||
}
|
||||
}
|
||||
|
||||
// External API.
|
||||
/******************** External API ********************/
|
||||
|
||||
void script_ProcessScript(char const *path) {
|
||||
activeType = SECTTYPE_INVALID;
|
||||
|
||||
Reference in New Issue
Block a user