-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Sibling modules should be accessible from qualified parsers
- Loading branch information
1 parent
f7af2d0
commit b00114b
Showing
7 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
test/blackbox-tests/test-cases/menhir/include-subdirs-siblings.t/dune
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(include_subdirs qualified) | ||
|
||
(executable | ||
(name foo)) |
2 changes: 2 additions & 0 deletions
2
test/blackbox-tests/test-cases/menhir/include-subdirs-siblings.t/dune-project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(lang dune 3.14) | ||
(using menhir 2.1) |
2 changes: 2 additions & 0 deletions
2
test/blackbox-tests/test-cases/menhir/include-subdirs-siblings.t/foo.ml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
let () = | ||
assert (Lang.Parser.expr (fun _ -> Lang.Parser.EOF) (Lexing.from_string "") = Lang.Ast.Unit) |
2 changes: 2 additions & 0 deletions
2
test/blackbox-tests/test-cases/menhir/include-subdirs-siblings.t/lang/ast.ml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
type expr = | ||
| Unit |
2 changes: 2 additions & 0 deletions
2
test/blackbox-tests/test-cases/menhir/include-subdirs-siblings.t/lang/dune
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(menhir | ||
(modules parser)) |
8 changes: 8 additions & 0 deletions
8
test/blackbox-tests/test-cases/menhir/include-subdirs-siblings.t/lang/parser.mly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
%token EOF | ||
|
||
%start <Ast.expr> expr | ||
|
||
%% | ||
|
||
expr: | ||
| EOF { Ast.Unit } |
6 changes: 6 additions & 0 deletions
6
test/blackbox-tests/test-cases/menhir/include-subdirs-siblings.t/run.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Menhir parsers in qualified subdirectories should be able to refer to sibling modules: | ||
|
||
$ dune build | ||
File "lang/parser.mly", line 3, characters 8-16: | ||
Error: Unbound module Ast | ||
[1] |