aboutsummaryrefslogtreecommitdiffhomepage
path: root/parsing/ast.ml
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2000-07-28 13:19:28 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2000-07-28 13:19:28 +0000
commit0aa70be388ced06a8471ff9e53408b2b9770f2f7 (patch)
treebbab4c8316449dd5a5506d3af9a6034ea5b68f7e /parsing/ast.ml
parent503fc133279161abe87ff8329c630126b9b86e35 (diff)
Plus de piquants dans les actions des grammaires; nom de la grammaire pris comme parseur par defaut; le type List devient AstList
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@575 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'parsing/ast.ml')
-rwxr-xr-xparsing/ast.ml16
1 files changed, 6 insertions, 10 deletions
diff --git a/parsing/ast.ml b/parsing/ast.ml
index e7c6cb23c..d154b7970 100755
--- a/parsing/ast.ml
+++ b/parsing/ast.ml
@@ -544,16 +544,12 @@ let rec act_of_ast vars etyp ast =
| ETastl ->
let acl = List.map (caselist vars etyp) cl in
Acaselist (pa,acl))
- | Node(_,"ASTLIST",al) ->
- (match (etyp,al) with
- | (ETast,[a]) -> Aast (val_of_ast vars a)
- | (ETastl,_) -> Aastlist (vall_of_astl vars al)
- | (ETast,_) -> user_err_loc
- (loc ast,"Ast.act_of_ast",
- [< 'sTR
- "entry type is Ast, but the right hand side is a list"
- >]))
- | _ -> invalid_arg_loc (loc ast,"Ast.act_of_ast: ill-formed")
+ | Node(_,"ASTLIST",al) when etyp = ETastl ->
+ Aastlist (vall_of_astl vars al)
+ | a when etyp = ETast ->
+ Aast (val_of_ast vars a)
+ | _ ->
+ invalid_arg_loc (loc ast,"Ast.act_of_ast: ill-typed")
and case vars etyp ast =
match ast with