diff options
Diffstat (limited to 'lib/qparser/parser.mly')
-rw-r--r-- | lib/qparser/parser.mly | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/qparser/parser.mly b/lib/qparser/parser.mly index d84e534..81b630a 100644 --- a/lib/qparser/parser.mly +++ b/lib/qparser/parser.mly @@ -5,21 +5,20 @@ type action_block = { loc : Qsp_syntax.S.pos ; expression : - Analyzer.Expression.t' * Qsp_syntax.Report.t list - ; body : Analyzer.Instruction.t Qsp_syntax.S.repr list + Analyzer.Expression.t' + ; body : Analyzer.Instruction.t list ; pos : Qsp_syntax.S.pos ; clauses : ( ( (Analyzer.Instruction.expression, Analyzer.Instruction.t) Qsp_syntax.S.clause list - * (Qsp_syntax.S.pos *Analyzer.Instruction.t Qsp_syntax.S.repr list) option + * (Qsp_syntax.S.pos * Analyzer.Instruction.t list) option ) option ) } module Helper = Qsp_syntax.S.Helper(Analyzer.Expression) - module HelperI = Qsp_syntax.S.Helper(Analyzer.Instruction) %} %parameter<Analyzer: Qsp_syntax.S.Analyzer> -%start <(Analyzer.Location.t * Qsp_syntax.Report.t list) Qsp_syntax.S.repr>main +%start <(Analyzer.Location.t * Qsp_syntax.Report.t list)>main %on_error_reduce expression instruction unary_operator assignation_operator %% @@ -31,7 +30,7 @@ main: instructions = line_statement* LOCATION_END { - let instructions = List.map instructions ~f:(HelperI.v) in + let instructions = List.map instructions ~f:(Analyzer.Instruction.v) in Analyzer.Location.location $loc instructions } @@ -75,7 +74,7 @@ line_statement: END TOKEN? line_sep { - let expression = Helper.v' e in + let expression = Analyzer.Expression.v e in let clauses = match b with | None -> None | Some (elifs, clauses) -> @@ -84,7 +83,7 @@ line_statement: | _ -> List.map elifs ~f:(fun ((pos:Qsp_syntax.S.pos), e, instructions) -> - let e = Helper.v' e in + let e = Analyzer.Expression.v e in (pos, e, instructions) ) |