diff options
author | 1999-09-08 13:54:35 +0000 | |
---|---|---|
committer | 1999-09-08 13:54:35 +0000 | |
commit | cfba911ee7f12c68e24b2d8db2cee08d6c6713ff (patch) | |
tree | 79bc8e510194dad127dbc818624dc8501be75d33 /parsing/g_prim.ml4 | |
parent | 6560ae848fbc6a60e432d48d85fbbf12a8d2e6aa (diff) |
compilation des grammaires (ouf)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@57 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'parsing/g_prim.ml4')
-rw-r--r-- | parsing/g_prim.ml4 | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/parsing/g_prim.ml4 b/parsing/g_prim.ml4 index 9ccc40ea3..7be07ea0d 100644 --- a/parsing/g_prim.ml4 +++ b/parsing/g_prim.ml4 @@ -10,10 +10,10 @@ GEXTEND Gram GLOBAL: var ident number string path ast astpat astact entry_type; var: - [ [ s = LIDENT -> Nvar(loc,s) ] ] + [ [ s = IDENT -> Nvar(loc,s) ] ] ; ident: - [ [ s = LIDENT -> Id(loc,s) ] ] + [ [ s = IDENT -> Id(loc,s) ] ] ; number: [ [ i = INT -> Num(loc, int_of_string i) ] ] @@ -25,23 +25,23 @@ GEXTEND Gram [ [ (l,pk) = qualid -> Path(loc,l,pk) ] ] ; qualid: - [ [ "#"; l = LIST1 LIDENT SEP "#"; "."; pk = LIDENT -> (l, pk) ] ] + [ [ "#"; l = LIST1 IDENT SEP "#"; "."; pk = IDENT -> (l, pk) ] ] ; (* ast *) ast: - [ [ id = LIDENT -> Nvar(loc,id) + [ [ id = IDENT -> Nvar(loc,id) | s = INT -> Num(loc, int_of_string s) | s = STRING -> Str(loc,s) | p = path -> p - | "{"; s = LIDENT; "}" -> Id(loc,s) - | "("; nname = LIDENT; l = LIST0 ast; ")" -> Node(loc,nname,l) + | "{"; s = IDENT; "}" -> Id(loc,s) + | "("; nname = IDENT; l = LIST0 ast; ")" -> Node(loc,nname,l) | "["; ido = idoption; "]"; b = ast -> Slam(loc,ido,b) | "'"; a = ast -> Node(loc,"$QUOTE",[a]) ] ] ; idoption: [ [ "<>" -> None - | id = LIDENT -> Some id ] ] + | id = IDENT -> Some id ] ] ; (* meta-syntax entries *) @@ -55,10 +55,10 @@ GEXTEND Gram [ [ l = LIST0 ast -> Node loc "ASTLIST" l ] ] ; action: - [ [ LIDENT "let"; p = astlist; et = entry_type; "="; e1 = action; "in"; + [ [ IDENT "let"; p = astlist; et = entry_type; "="; e1 = action; "in"; e = action -> Node(loc,"$CASE",[e1; et; Node(loc,"CASE",[p;e])]) - | LIDENT "case"; a = action; et = entry_type; "of"; - cl = LIST1 case SEP "|"; LIDENT "esac" -> + | IDENT "case"; a = action; et = entry_type; "of"; + cl = LIST1 case SEP "|"; IDENT "esac" -> Node(loc,"$CASE",a::et::cl) | "["; al = astlist; "]" -> al ] ] ; @@ -66,8 +66,8 @@ GEXTEND Gram [[ p = astlist; "->"; a = action -> Node(loc,"CASE",[p;a]) ]] ; entry_type: - [[ ":"; LIDENT "List" -> Id(loc,"LIST") - | ":"; LIDENT "Ast" -> Id(loc,"AST") + [[ ":"; IDENT "List" -> Id(loc,"LIST") + | ":"; IDENT "Ast" -> Id(loc,"AST") | -> Id(loc,"AST") ]] ; END |