Commit cb78d0a0 authored by POTTIER Francois's avatar POTTIER Francois

Added negative tests involving parameterized start symbols.

parent 6f048a93
File "parameterized-start-weird.mly", line 4, characters 17-18:
Error: syntax error.
Ill-formed %start declaration.
A start symbol must begin with a lowercase letter.
Examples of well-formed declarations:
%start program
%start expression phrase
%start <int> date time
%token A B
(* Forbidden because a start symbol cannot be an application of a
parameterized symbol: *)
%start<unit> main(A)
%%
main(X):
X B {}
File "parameterized-start.mly", line 3, characters 13-17:
Error: how is this symbol parameterized?
It is used at sorts * -> * and *.
The sort * -> * is not compatible with the sort *.
(* Forbidden because every symbol that appears in a %start or %type
declaration must have sort "*": *)
%start<unit> main
%%
main(X):
X {}
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