summaryrefslogtreecommitdiff
path: root/parsing
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2013-10-24 04:19:08 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2013-10-24 04:19:08 +0000
commit8fb5fdc9f212f5b834329c2f75f5943fc393622d (patch)
tree736632c468a0a7ce006031c31fdb3a110e323506 /parsing
parentc628fb2dc9a45c2cd96475442c6c4045d81f7ae1 (diff)
parent349f151c0d7f0747d03a1e6d9a0696d480523abf (diff)
downloadocaml-8fb5fdc9f212f5b834329c2f75f5943fc393622d.tar.gz
merge trunk:14244 to fix bootstrap
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14245 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'parsing')
-rw-r--r--parsing/parser.mly10
1 files changed, 7 insertions, 3 deletions
diff --git a/parsing/parser.mly b/parsing/parser.mly
index 1fa33b2111..c0b9bf3cc7 100644
--- a/parsing/parser.mly
+++ b/parsing/parser.mly
@@ -496,13 +496,17 @@ interface:
;
toplevel_phrase:
top_structure SEMISEMI { Ptop_def $1 }
- | seq_expr post_item_attributes SEMISEMI { Ptop_def[mkstrexp $1 $2] }
| toplevel_directive SEMISEMI { $1 }
| EOF { raise End_of_file }
;
top_structure:
- structure_item { [$1] }
- | structure_item top_structure { $1 :: $2 }
+ str_attribute top_structure { $1 :: $2 }
+ | seq_expr post_item_attributes { [mkstrexp $1 $2] }
+ | top_structure_tail { $1 }
+;
+top_structure_tail:
+ /* empty */ { [] }
+ | structure_item top_structure_tail { $1 :: $2 }
;
use_file:
use_file_tail { $1 }