Project

General

Profile

Revision 19a1e66b src/parsers/parser_lustre.mly

View differences:

src/parsers/parser_lustre.mly
57 57

  
58 58
%token <string> STRING
59 59
%token AUTOMATON STATE UNTIL UNLESS RESTART RESUME 
60
%token ASSERT OPEN QUOTE FUNCTION
60
%token ASSERT OPEN INCLUDE QUOTE POINT FUNCTION
61 61
%token <string> IDENT
62 62
%token <string> UIDENT
63 63
%token TRUE FALSE
......
128 128
%type <Lustre_types.var_decl list> vdecl_list
129 129
%%
130 130

  
131

  
131 132
module_ident:
132 133
  UIDENT { $1 }
133 134
| IDENT  { $1 }
134 135

  
136
file_ident:
137
module_ident { $1 } 
138
| module_ident POINT file_ident { $1 ^ "." ^ $3 } 
139

  
140
path_ident:
141
POINT DIV path_ident { "./" ^ $3 }
142
| file_ident DIV path_ident { $1 ^ "/" ^ $3 }
143
| DIV path_ident { "/" ^ $2 }
144
| file_ident { $1 }
145

  
135 146
tag_ident:
136 147
  UIDENT  { $1 }
137 148
| TRUE    { tag_true }
......
172 183
| open_lusi open_list { $1 :: $2 }
173 184

  
174 185
open_lusi:
175
| OPEN QUOTE module_ident QUOTE { mktop_decl false (Open (true, $3))}
176
| OPEN LT module_ident GT { mktop_decl false (Open (false, $3)) }
186
  | OPEN QUOTE path_ident QUOTE { mktop_decl false (Open (true, $3)) }
187
  | INCLUDE QUOTE path_ident QUOTE { mktop_decl false (Include ($3)) }
188
  | OPEN LT path_ident GT { mktop_decl false (Open (false, $3))  }
177 189

  
178 190
top_decl_list:
179 191
   {[]}

Also available in: Unified diff