Skip to content

Commit

Permalink
parser.y: GLR -> LALR
Browse files Browse the repository at this point in the history
  • Loading branch information
rhendric committed Jul 20, 2024
1 parent abe6928 commit 6da99c3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/libexpr/parser.y
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%glr-parser
%define api.location.type { ::nix::ParserLocation }
%define api.pure
%locations
%define parse.error verbose
Expand All @@ -9,7 +9,6 @@
%lex-param { void * scanner }
%lex-param { nix::ParserState * state }
%expect 0
%expect-rr 0

%code requires {

Expand All @@ -27,7 +26,7 @@
#include "eval-settings.hh"
#include "parser-state.hh"

#define YYLTYPE ::nix::ParserLocation
#define YYLTYPE_IS_TRIVIAL 1
#define YY_DECL int yylex \
(YYSTYPE * yylval_param, YYLTYPE * yylloc_param, yyscan_t yyscanner, nix::ParserState * state)

Expand Down Expand Up @@ -77,7 +76,7 @@ YY_DECL;

using namespace nix;

#define CUR_POS state->at(*yylocp)
#define CUR_POS state->at(yyloc)


void yyerror(YYLTYPE * loc, yyscan_t scanner, ParserState * state, const char * error)
Expand Down

0 comments on commit 6da99c3

Please sign in to comment.