Commit 1839e1be authored by POTTIER Francois's avatar POTTIER Francois

Updated .mly and .expected files in bench/bad.

parent 21d67a84
File "declaration-error-01.mly", line 1, characters 0-20:
Error: syntax error in a %token declaration.
Here are sample valid declarations:
File "declaration-error-a.mly", line 1, characters 15-20:
Error: Ill-formed %token declaration.
Examples of well-formed declarations:
%token FOO
%token DOT SEMICOLON
%token <string> LID UID
File "declaration-error-b.mly", line 3, characters 10-11:
Error: Ill-formed %token declaration.
Examples of well-formed declarations:
%token FOO
%token DOT SEMICOLON
%token <string> LID UID
File "double-equals.mly", line 6, characters 7-10:
Error: syntax error inside a production.
File "double-equals.mly", line 6, characters 5-6:
Error: Ill-formed production.
A production is a sequence of producers, followed with a semantic action.
Examples of well-formed producers:
expr
option(COMMA)
separated_list(COMMA, expr)
e = expr
ds = declaration*
es = list(terminated(expr, SEMI))
es = list(e = expr SEMI { e })
xs = list(x = var { Some x } | WILDCARD { None })
File "invalid-declarations-01.mly", line 3, characters 0-14:
Error: syntax error in a %token declaration.
Here are sample valid declarations:
File "invalid-declarations-a.mly", line 3, characters 11-14:
Error: Ill-formed %token declaration.
Examples of well-formed declarations:
%token FOO
%token DOT SEMICOLON
%token <string> LID UID
File "invalid-declarations-b.mly", line 5, characters 7-10:
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
File "invalid-declarations-c.mly", line 6, characters 6-7:
Error: Ill-formed %type declaration.
Examples of well-formed declarations:
%type <Syntax.expression> expression
%type <int> date time
%type <int option> option(date)
......@@ -2,7 +2,7 @@
%token BAZ QUUX HOP
%token BAR BAT
%token FOO QWD ASFLJ QWKJH QWDK
%start<int> RAT
%start<int> rat
%type (int) date time /* error */
%%
......
File "invalid-declarations-d.mly", line 10, characters 0-9:
Error: Ill-formed precedence declaration.
Examples of well-formed declarations:
%left PLUS
%left PLUS MINUS
%nonassoc unary_minus
%right CONCAT
......@@ -2,7 +2,7 @@
%token BAZ QUUX HOP
%token BAR BAT
%token FOO QWD ASFLJ QWKJH QWDK
%start<int> RAT
%start<int> rat
%type<int> date time
%token BAZAR
%left FOO BAR
......
File "invalid-declarations-e.mly", line 17, characters 0-0:
Error: Ill-formed production.
A production is a sequence of producers, followed with a semantic action.
Examples of well-formed producers:
expr
option(COMMA)
separated_list(COMMA, expr)
e = expr
ds = declaration*
es = list(terminated(expr, SEMI))
es = list(e = expr SEMI { e })
xs = list(x = var { Some x } | WILDCARD { None })
......@@ -2,7 +2,7 @@
%token BAZ QUUX HOP
%token BAR BAT
%token FOO QWD ASFLJ QWKJH QWDK
%start<int> RAT
%start<int> rat
%type<int> date time
%token BAZAR
%left FOO BAR
......
File "lots-of-errors-01.mly", line 1, characters 0-1:
Error: syntax error inside a declaration.
File "lots-of-errors-a.mly", line 1, characters 0-1:
Error: Either a declaration or %% is expected at this point.
File "lots-of-errors-b.mly", line 1, characters 15-20:
Error: Ill-formed %token declaration.
Examples of well-formed declarations:
%token FOO
%token DOT SEMICOLON
%token <string> LID UID
File "lots-of-errors-c.mly", line 2, characters 7-8:
Error: Ill-formed %token declaration.
Examples of well-formed declarations:
%token FOO
%token DOT SEMICOLON
%token <string> LID UID
File "lowercase-token.mly", line 1, characters 0-10:
Error: syntax error in a %token declaration.
Here are sample valid declarations:
File "lowercase-token.mly", line 1, characters 7-10:
Error: Ill-formed %token declaration.
Examples of well-formed declarations:
%token FOO
%token DOT SEMICOLON
%token <string> LID UID
File "nonsense.mly", line 1, characters 47-50:
Error: syntax error inside the definition of a nonterminal symbol.
Error: Ill-formed rule.
Either a list of formal parameters or a colon is expected at this point.
Examples of well-formed rules:
main: e = expr EOL { e }
expr: i = INT { i } | e1 = expr PLUS e2 = expr { e1 + e2 }
option(X): { None } | x = X { Some x }
File "producer-with-a-positional-name.mly", line 4, characters 5-7:
Error: there are multiple producers named _1 in this sequence.
File "resync-on-action-prec.mly", line 7, characters 9-10:
Error: syntax error inside a production.
Error: Ill-formed production.
A production is a sequence of producers, followed with a semantic action.
Examples of well-formed producers:
expr
option(COMMA)
separated_list(COMMA, expr)
e = expr
ds = declaration*
es = list(terminated(expr, SEMI))
es = list(e = expr SEMI { e })
xs = list(x = var { Some x } | WILDCARD { None })
File "rule-error.mly", line 7, characters 12-13:
Error: syntax error inside a production.
File "rule-error.mly", line 11, characters 0-3:
Error: Ill-formed production.
A production is a sequence of producers, followed with a semantic action.
Examples of well-formed producers:
expr
option(COMMA)
separated_list(COMMA, expr)
e = expr
ds = declaration*
es = list(terminated(expr, SEMI))
es = list(e = expr SEMI { e })
xs = list(x = var { Some x } | WILDCARD { None })
......@@ -5,7 +5,9 @@
main:
A B { () }
| A ( x = B C { () }
/* due to anonymous rules, this actually looks good so far... */
/* but here, it no longer makes sense: */
bar:
A { () }
......
File "uppercase-start.mly", line 2, characters 0-10:
Error: syntax error in a %start declaration.
Here are sample valid declarations:
File "uppercase-start.mly", line 2, characters 7-10:
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
File "uppercase.mly", line 1, characters 0-18:
Error: syntax error in a %start declaration.
Here are sample valid declarations:
File "uppercase.mly", line 1, characters 14-18:
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
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