1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-21 09:49:36 +01:00

libexpr: Switch parser.y to %skeleton lalr1.cc

Since the parser is now LALR we can easily switch
over to the less ugly sketelon than the default C one.
This would allow us to switch from %union to %define api.value.type variant
in the future to avoid the need for triviall POD types.
This commit is contained in:
Sergei Zimmerman 2025-09-28 21:44:54 +03:00
parent 241c7cd1f9
commit a8715a2d6e
No known key found for this signature in database
6 changed files with 51 additions and 33 deletions

View file

@ -2,16 +2,12 @@
#include <cstddef>
// including the generated headers twice leads to errors
#ifndef BISON_HEADER
# include "lexer-tab.hh"
# include "parser-tab.hh"
#endif
#include "parser-scanner-decls.hh"
namespace nix::lexer::internal {
void initLoc(YYLTYPE * loc);
void initLoc(Parser::location_type * loc);
void adjustLoc(yyscan_t yyscanner, YYLTYPE * loc, const char * s, size_t len);
void adjustLoc(yyscan_t yyscanner, Parser::location_type * loc, const char * s, size_t len);
} // namespace nix::lexer::internal