mirror of
https://github.com/NixOS/nix.git
synced 2025-11-20 01:09:37 +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:
parent
241c7cd1f9
commit
a8715a2d6e
6 changed files with 51 additions and 33 deletions
|
|
@ -1,11 +1,11 @@
|
|||
#include "lexer-helpers.hh"
|
||||
|
||||
void nix::lexer::internal::initLoc(YYLTYPE * loc)
|
||||
void nix::lexer::internal::initLoc(Parser::location_type * loc)
|
||||
{
|
||||
loc->beginOffset = loc->endOffset = 0;
|
||||
}
|
||||
|
||||
void nix::lexer::internal::adjustLoc(yyscan_t yyscanner, YYLTYPE * loc, const char * s, size_t len)
|
||||
void nix::lexer::internal::adjustLoc(yyscan_t yyscanner, Parser::location_type * loc, const char * s, size_t len)
|
||||
{
|
||||
loc->stash();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue