Commit d43802e0 authored by POTTIER Francois's avatar POTTIER Francois

Removed the file [ConcreteSyntax].

parent dd8cf6a8
......@@ -2,5 +2,4 @@
which could be produced by either ocamlyacc or Menhir. *)
val grammar :
(Lexing.lexbuf -> Parser.token) -> Lexing.lexbuf -> ConcreteSyntax.grammar
(Lexing.lexbuf -> Parser.token) -> Lexing.lexbuf -> Syntax.grammar
type grammar =
{
pg_filename : Syntax.filename;
pg_declarations : (Syntax.declaration Positions.located) list;
pg_rules : Syntax.parameterized_rule list;
pg_trailer : Syntax.trailer option;
}
......@@ -10,7 +10,6 @@
%{
open ConcreteSyntax
open Syntax
open Positions
......@@ -30,7 +29,7 @@ open Positions
/* ------------------------------------------------------------------------- */
/* Start symbol. */
%start <ConcreteSyntax.grammar> grammar
%start <Syntax.grammar> grammar
/* ------------------------------------------------------------------------- */
/* Priorities. */
......@@ -344,4 +343,3 @@ trailer:
{ Some (Lazy.force p) }
%%
......@@ -19,7 +19,7 @@ let load_partial_grammar filename =
let lexbuf = Lexing.from_string contents in
lexbuf.lex_curr_p <- { lexbuf.lex_curr_p with pos_fname = filename };
let grammar =
{ (Driver.grammar Lexer.main lexbuf) with ConcreteSyntax.pg_filename = filename }
{ (Driver.grammar Lexer.main lexbuf) with Syntax.pg_filename = filename }
in
Error.file_contents := None;
grammar
......@@ -164,4 +164,3 @@ let () =
exit 0
| Settings.PMNormal ->
()
open Misc
open Syntax
open ConcreteSyntax
open InternalSyntax
open Positions
......@@ -433,7 +432,7 @@ let iter_on_only_used_symbols f t =
| _ -> ())
t
let symbols_of grammar (pgrammar : ConcreteSyntax.grammar) =
let symbols_of grammar (pgrammar : Syntax.grammar) =
let tokens = grammar.p_tokens in
let symbols_of_rule symbols prule =
let rec store_except_rule_parameters =
......
val join_partial_grammars :
ConcreteSyntax.grammar list -> InternalSyntax.grammar
Syntax.grammar list -> InternalSyntax.grammar
......@@ -123,3 +123,10 @@ type parameterized_rule =
pr_branches : parameterized_branch list;
}
type grammar =
{
pg_filename : filename;
pg_declarations : declaration Positions.located list;
pg_rules : parameterized_rule list;
pg_trailer : trailer option;
}
......@@ -7,7 +7,6 @@
%{
open ConcreteSyntax
open Syntax
open Positions
......@@ -21,7 +20,7 @@ open Positions
%token <Stretch.t Lazy.t> PERCENTPERCENT
%token <Syntax.identifier option array -> Syntax.action> ACTION
%start grammar
%type <ConcreteSyntax.grammar> grammar
%type <Syntax.grammar> grammar
/* These declarations solve a shift-reduce conflict in favor of
shifting: when the declaration of a non-terminal symbol begins with
......@@ -335,4 +334,3 @@ producer:
{ Positions.lex_join (symbol_start_pos()) (symbol_end_pos()), Some $1, $3 }
%%
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment