Skip to content

Commit

Permalink
retab
Browse files Browse the repository at this point in the history
  • Loading branch information
pippijn committed Jun 27, 2013
1 parent 9111aad commit 743ff54
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ The terminals file contains an ocamlyacc grammar or tokens file amended with
token names. An extract of this file could look like this:

```ocaml
%token<string> TkIDENTIFIER "identifier"
%token TkIF "if"
%token TkTHEN "then"
%token TkELSE "else"
%token<string> TkIDENTIFIER "identifier"
%token TkIF "if"
%token TkTHEN "then"
%token TkELSE "else"
```

Merr uses these strings when producing default error messages, so that the
Expand Down Expand Up @@ -63,13 +63,13 @@ open Etokens (* provides the 'token' type *)
let message = function
| "open" -> function
| EOF -> "expected module name after 'open'"
| TkIDENTIFIER -> "unexpected identifier `%s' after 'open'"
| EOF -> "expected module name after 'open'"
| TkIDENTIFIER -> "unexpected identifier `%s' after 'open'"
"expected module name (capitalised)"
| _ -> "unexpected token '%s' in handler definition"
| _ -> "unexpected token '%s' in handler definition"
| "open Foo let message = function" -> function
| EOF -> "expected '|'-separated code fragments"
| _ -> "unexpected token '%s' where code fragments expected"
| EOF -> "expected '|'-separated code fragments"
| _ -> "unexpected token '%s' where code fragments expected"
```

One or more `open` directives are always required, and the opened modules
Expand Down

0 comments on commit 743ff54

Please sign in to comment.