Commit d2518722 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-11-20 13:14:28 by afrisch] Extend keyword too

Original author: afrisch
Date: 2003-11-20 13:14:29+00:00
parent 70da5c63
...@@ -72,26 +72,26 @@ runtime/value.cmo: misc/q_symbol.cmo types/atoms.cmi types/chars.cmi misc/encodi ...@@ -72,26 +72,26 @@ runtime/value.cmo: misc/q_symbol.cmo types/atoms.cmi types/chars.cmi misc/encodi
runtime/value.cmx: misc/q_symbol.cmo types/atoms.cmx types/chars.cmx misc/encodings.cmx \ runtime/value.cmx: misc/q_symbol.cmo types/atoms.cmx types/chars.cmx misc/encodings.cmx \
types/ident.cmx types/intervals.cmx compile/lambda.cmx misc/ns.cmx \ types/ident.cmx types/intervals.cmx compile/lambda.cmx misc/ns.cmx \
types/sequence.cmx types/types.cmx runtime/value.cmi types/sequence.cmx types/types.cmx runtime/value.cmi
schema/schema_xml.cmo: misc/q_symbol.cmo types/atoms.cmi misc/encodings.cmi misc/ns.cmi \ schema/schema_xml.cmo: misc/q_symbol.cmo schema/schema_xml.cmi
runtime/value.cmi schema/schema_xml.cmi schema/schema_xml.cmx: misc/q_symbol.cmo schema/schema_xml.cmi
schema/schema_xml.cmx: misc/q_symbol.cmo types/atoms.cmx misc/encodings.cmx misc/ns.cmx \
runtime/value.cmx schema/schema_xml.cmi
schema/schema_common.cmo: misc/q_symbol.cmo types/intervals.cmi schema/schema_types.cmi \ schema/schema_common.cmo: misc/q_symbol.cmo types/intervals.cmi schema/schema_types.cmi \
schema/schema_xml.cmi runtime/value.cmi schema/schema_common.cmi schema/schema_xml.cmi runtime/value.cmi schema/schema_common.cmi
schema/schema_common.cmx: misc/q_symbol.cmo types/intervals.cmx schema/schema_types.cmi \ schema/schema_common.cmx: misc/q_symbol.cmo types/intervals.cmx schema/schema_types.cmi \
schema/schema_xml.cmx runtime/value.cmx schema/schema_common.cmi schema/schema_xml.cmx runtime/value.cmx schema/schema_common.cmi
schema/schema_builtin.cmo: misc/q_symbol.cmo types/builtin_defs.cmi misc/encodings.cmi \ schema/schema_builtin.cmo: misc/q_symbol.cmo types/builtin_defs.cmi misc/encodings.cmi \
types/intervals.cmi schema/schema_common.cmi schema/schema_types.cmi \ types/intervals.cmi schema/schema_common.cmi schema/schema_types.cmi \
types/sequence.cmi types/types.cmi runtime/value.cmi \ schema/schema_xml.cmi types/sequence.cmi types/types.cmi \
schema/schema_builtin.cmi runtime/value.cmi schema/schema_builtin.cmi
schema/schema_builtin.cmx: misc/q_symbol.cmo types/builtin_defs.cmx misc/encodings.cmx \ schema/schema_builtin.cmx: misc/q_symbol.cmo types/builtin_defs.cmx misc/encodings.cmx \
types/intervals.cmx schema/schema_common.cmx schema/schema_types.cmi \ types/intervals.cmx schema/schema_common.cmx schema/schema_types.cmi \
types/sequence.cmx types/types.cmx runtime/value.cmx \ schema/schema_xml.cmx types/sequence.cmx types/types.cmx \
schema/schema_builtin.cmi runtime/value.cmx schema/schema_builtin.cmi
schema/schema_validator.cmo: misc/q_symbol.cmo types/intervals.cmi schema/schema_builtin.cmi \ schema/schema_validator.cmo: misc/q_symbol.cmo types/atoms.cmi misc/encodings.cmi \
types/intervals.cmi misc/ns.cmi schema/schema_builtin.cmi \
schema/schema_common.cmi schema/schema_types.cmi runtime/value.cmi \ schema/schema_common.cmi schema/schema_types.cmi runtime/value.cmi \
schema/schema_validator.cmi schema/schema_validator.cmi
schema/schema_validator.cmx: misc/q_symbol.cmo types/intervals.cmx schema/schema_builtin.cmx \ schema/schema_validator.cmx: misc/q_symbol.cmo types/atoms.cmx misc/encodings.cmx \
types/intervals.cmx misc/ns.cmx schema/schema_builtin.cmx \
schema/schema_common.cmx schema/schema_types.cmi runtime/value.cmx \ schema/schema_common.cmx schema/schema_types.cmi runtime/value.cmx \
schema/schema_validator.cmi schema/schema_validator.cmi
schema/schema_parser.cmo: misc/q_symbol.cmo types/intervals.cmi schema/schema_builtin.cmi \ schema/schema_parser.cmo: misc/q_symbol.cmo types/intervals.cmi schema/schema_builtin.cmi \
...@@ -119,21 +119,23 @@ parser/parser.cmx: misc/q_symbol.cmo parser/ast.cmx types/atoms.cmx types/chars. ...@@ -119,21 +119,23 @@ parser/parser.cmx: misc/q_symbol.cmo parser/ast.cmx types/atoms.cmx types/chars.
parser/location.cmx misc/ns.cmx schema/schema_parser.cmx \ parser/location.cmx misc/ns.cmx schema/schema_parser.cmx \
types/sequence.cmx types/types.cmx parser/ulexer.cmx parser/parser.cmi types/sequence.cmx types/types.cmx parser/ulexer.cmx parser/parser.cmi
typing/typed.cmo: misc/q_symbol.cmo types/ident.cmo parser/location.cmi types/patterns.cmi \ typing/typed.cmo: misc/q_symbol.cmo types/ident.cmo parser/location.cmi types/patterns.cmi \
types/types.cmi schema/schema_types.cmi types/types.cmi
typing/typed.cmx: misc/q_symbol.cmo types/ident.cmx parser/location.cmx types/patterns.cmx \ typing/typed.cmx: misc/q_symbol.cmo types/ident.cmx parser/location.cmx types/patterns.cmx \
types/types.cmx schema/schema_types.cmi types/types.cmx
typing/typer.cmo: misc/q_symbol.cmo parser/ast.cmo types/atoms.cmi types/builtin_defs.cmi \ typing/typer.cmo: misc/q_symbol.cmo parser/ast.cmo types/atoms.cmi types/builtin_defs.cmi \
types/chars.cmi types/ident.cmo types/intervals.cmi parser/location.cmi \ types/chars.cmi misc/encodings.cmi types/ident.cmo types/intervals.cmi \
misc/ns.cmi types/patterns.cmi schema/schema_builtin.cmi \ parser/location.cmi misc/ns.cmi types/patterns.cmi \
schema/schema_common.cmi schema/schema_types.cmi types/sequence.cmi \ schema/schema_builtin.cmi schema/schema_common.cmi \
misc/serialize.cmi misc/state.cmi misc/stats.cmi typing/typed.cmo \ schema/schema_types.cmi types/sequence.cmi misc/serialize.cmi \
types/types.cmi runtime/value.cmi typing/typer.cmi misc/state.cmi misc/stats.cmi typing/typed.cmo types/types.cmi \
runtime/value.cmi typing/typer.cmi
typing/typer.cmx: misc/q_symbol.cmo parser/ast.cmx types/atoms.cmx types/builtin_defs.cmx \ typing/typer.cmx: misc/q_symbol.cmo parser/ast.cmx types/atoms.cmx types/builtin_defs.cmx \
types/chars.cmx types/ident.cmx types/intervals.cmx parser/location.cmx \ types/chars.cmx misc/encodings.cmx types/ident.cmx types/intervals.cmx \
misc/ns.cmx types/patterns.cmx schema/schema_builtin.cmx \ parser/location.cmx misc/ns.cmx types/patterns.cmx \
schema/schema_common.cmx schema/schema_types.cmi types/sequence.cmx \ schema/schema_builtin.cmx schema/schema_common.cmx \
misc/serialize.cmx misc/state.cmx misc/stats.cmx typing/typed.cmx \ schema/schema_types.cmi types/sequence.cmx misc/serialize.cmx \
types/types.cmx runtime/value.cmx typing/typer.cmi misc/state.cmx misc/stats.cmx typing/typed.cmx types/types.cmx \
runtime/value.cmx typing/typer.cmi
compile/lambda.cmo: misc/q_symbol.cmo types/ident.cmo types/patterns.cmi misc/serialize.cmi \ compile/lambda.cmo: misc/q_symbol.cmo types/ident.cmo types/patterns.cmi misc/serialize.cmi \
types/types.cmi types/types.cmi
compile/lambda.cmx: misc/q_symbol.cmo types/ident.cmx types/patterns.cmx misc/serialize.cmx \ compile/lambda.cmx: misc/q_symbol.cmo types/ident.cmx types/patterns.cmx misc/serialize.cmx \
...@@ -159,11 +161,15 @@ runtime/print_xml.cmo: misc/q_symbol.cmo types/atoms.cmi misc/encodings.cmi type ...@@ -159,11 +161,15 @@ runtime/print_xml.cmo: misc/q_symbol.cmo types/atoms.cmi misc/encodings.cmi type
runtime/print_xml.cmx: misc/q_symbol.cmo types/atoms.cmx misc/encodings.cmx types/ident.cmx \ runtime/print_xml.cmx: misc/q_symbol.cmo types/atoms.cmx misc/encodings.cmx types/ident.cmx \
parser/location.cmx misc/ns.cmx types/sequence.cmx runtime/value.cmx parser/location.cmx misc/ns.cmx types/sequence.cmx runtime/value.cmx
runtime/eval.cmo: misc/q_symbol.cmo types/builtin_defs.cmi types/ident.cmo compile/lambda.cmo \ runtime/eval.cmo: misc/q_symbol.cmo types/builtin_defs.cmi types/ident.cmo compile/lambda.cmo \
types/patterns.cmi runtime/run_dispatch.cmi types/sequence.cmi \ types/patterns.cmi runtime/run_dispatch.cmi schema/schema_common.cmi \
typing/typed.cmo types/types.cmi runtime/value.cmi runtime/eval.cmi schema/schema_types.cmi schema/schema_validator.cmi types/sequence.cmi \
typing/typed.cmo typing/typer.cmi types/types.cmi runtime/value.cmi \
runtime/eval.cmi
runtime/eval.cmx: misc/q_symbol.cmo types/builtin_defs.cmx types/ident.cmx compile/lambda.cmx \ runtime/eval.cmx: misc/q_symbol.cmo types/builtin_defs.cmx types/ident.cmx compile/lambda.cmx \
types/patterns.cmx runtime/run_dispatch.cmx types/sequence.cmx \ types/patterns.cmx runtime/run_dispatch.cmx schema/schema_common.cmx \
typing/typed.cmx types/types.cmx runtime/value.cmx runtime/eval.cmi schema/schema_types.cmi schema/schema_validator.cmx types/sequence.cmx \
typing/typed.cmx typing/typer.cmx types/types.cmx runtime/value.cmx \
runtime/eval.cmi
compile/compile.cmo: misc/q_symbol.cmo parser/ast.cmo types/ident.cmo compile/lambda.cmo \ compile/compile.cmo: misc/q_symbol.cmo parser/ast.cmo types/ident.cmo compile/lambda.cmo \
parser/location.cmi types/patterns.cmi misc/serialize.cmi \ parser/location.cmi types/patterns.cmi misc/serialize.cmi \
typing/typed.cmo typing/typer.cmi types/types.cmi compile/compile.cmi typing/typed.cmo typing/typer.cmi types/types.cmi compile/compile.cmi
...@@ -199,15 +205,17 @@ driver/librarian.cmx: misc/q_symbol.cmo types/builtin.cmx compile/compile.cmx \ ...@@ -199,15 +205,17 @@ driver/librarian.cmx: misc/q_symbol.cmo types/builtin.cmx compile/compile.cmx \
driver/cduce.cmo: misc/q_symbol.cmo parser/ast.cmo types/builtin.cmi compile/compile.cmi \ driver/cduce.cmo: misc/q_symbol.cmo parser/ast.cmo types/builtin.cmi compile/compile.cmi \
misc/encodings.cmi runtime/eval.cmi runtime/explain.cmi types/ident.cmo \ misc/encodings.cmi runtime/eval.cmi runtime/explain.cmi types/ident.cmo \
driver/librarian.cmi parser/location.cmi misc/ns.cmi parser/parser.cmi \ driver/librarian.cmi parser/location.cmi misc/ns.cmi parser/parser.cmi \
types/patterns.cmi types/sample.cmi misc/state.cmi typing/typed.cmo \ types/patterns.cmi types/sample.cmi schema/schema_common.cmi \
typing/typer.cmi types/types.cmi parser/ulexer.cmi runtime/value.cmi \ misc/state.cmi typing/typed.cmo typing/typer.cmi types/types.cmi \
driver/cduce.cmi parser/ulexer.cmi runtime/value.cmi driver/cduce.cmi
driver/cduce.cmx: misc/q_symbol.cmo parser/ast.cmx types/builtin.cmx compile/compile.cmx \ driver/cduce.cmx: misc/q_symbol.cmo parser/ast.cmx types/builtin.cmx compile/compile.cmx \
misc/encodings.cmx runtime/eval.cmx runtime/explain.cmx types/ident.cmx \ misc/encodings.cmx runtime/eval.cmx runtime/explain.cmx types/ident.cmx \
driver/librarian.cmx parser/location.cmx misc/ns.cmx parser/parser.cmx \ driver/librarian.cmx parser/location.cmx misc/ns.cmx parser/parser.cmx \
types/patterns.cmx types/sample.cmx misc/state.cmx typing/typed.cmx \ types/patterns.cmx types/sample.cmx schema/schema_common.cmx \
typing/typer.cmx types/types.cmx parser/ulexer.cmx runtime/value.cmx \ misc/state.cmx typing/typed.cmx typing/typer.cmx types/types.cmx \
driver/cduce.cmi parser/ulexer.cmx runtime/value.cmx driver/cduce.cmi
query/query_parse.cmo: misc/q_symbol.cmo parser/parser.cmi
query/query_parse.cmx: misc/q_symbol.cmo parser/parser.cmx
driver/run.cmo: misc/q_symbol.cmo driver/cduce.cmi types/ident.cmo driver/librarian.cmi \ driver/run.cmo: misc/q_symbol.cmo driver/cduce.cmi types/ident.cmo driver/librarian.cmi \
runtime/load_xml.cmi parser/location.cmi types/sequence.cmi \ runtime/load_xml.cmi parser/location.cmi types/sequence.cmi \
misc/state.cmi misc/stats.cmi parser/ulexer.cmi runtime/value.cmi misc/state.cmi misc/stats.cmi parser/ulexer.cmi runtime/value.cmi
...@@ -240,7 +248,6 @@ types/sample.cmi: misc/q_symbol.cmo types/types.cmi ...@@ -240,7 +248,6 @@ types/sample.cmi: misc/q_symbol.cmo types/types.cmi
types/builtin_defs.cmi: misc/q_symbol.cmo types/atoms.cmi types/ident.cmo types/types.cmi types/builtin_defs.cmi: misc/q_symbol.cmo types/atoms.cmi types/ident.cmo types/types.cmi
runtime/value.cmi: misc/q_symbol.cmo types/atoms.cmi types/chars.cmi misc/encodings.cmi \ runtime/value.cmi: misc/q_symbol.cmo types/atoms.cmi types/chars.cmi misc/encodings.cmi \
types/ident.cmo types/intervals.cmi compile/lambda.cmo types/types.cmi types/ident.cmo types/intervals.cmi compile/lambda.cmo types/types.cmi
schema/schema_xml.cmi: misc/q_symbol.cmo runtime/value.cmi
schema/schema_common.cmi: misc/q_symbol.cmo types/intervals.cmi schema/schema_types.cmi schema/schema_common.cmi: misc/q_symbol.cmo types/intervals.cmi schema/schema_types.cmi
schema/schema_builtin.cmi: misc/q_symbol.cmo schema/schema_types.cmi types/types.cmi \ schema/schema_builtin.cmi: misc/q_symbol.cmo schema/schema_types.cmi types/types.cmi \
runtime/value.cmi runtime/value.cmi
......
...@@ -31,6 +31,7 @@ let top_phrases = Grammar.Entry.create gram "toplevel phrases" ...@@ -31,6 +31,7 @@ let top_phrases = Grammar.Entry.create gram "toplevel phrases"
let expr = Grammar.Entry.create gram "expression" let expr = Grammar.Entry.create gram "expression"
let pat = Grammar.Entry.create gram "type/pattern expression" let pat = Grammar.Entry.create gram "type/pattern expression"
let regexp = Grammar.Entry.create gram "type/pattern regexp" let regexp = Grammar.Entry.create gram "type/pattern regexp"
let keyword = Grammar.Entry.create gram "keyword"
let exp pos e = LocatedExpr (loc_of_pos pos,e) let exp pos e = LocatedExpr (loc_of_pos pos,e)
...@@ -84,7 +85,7 @@ let is_fun_decl = ...@@ -84,7 +85,7 @@ let is_fun_decl =
) )
EXTEND EXTEND
GLOBAL: top_phrases prog expr pat regexp; GLOBAL: top_phrases prog expr pat regexp keyword;
top_phrases: [ top_phrases: [
[ l = LIST0 phrase; ";;" -> List.flatten l ] [ l = LIST0 phrase; ";;" -> List.flatten l ]
...@@ -598,6 +599,7 @@ END ...@@ -598,6 +599,7 @@ END
module Hook = struct module Hook = struct
let expr = expr let expr = expr
let pat = pat let pat = pat
let keyword = keyword
end end
let pat = Grammar.Entry.parse pat let pat = Grammar.Entry.parse pat
......
...@@ -13,4 +13,5 @@ val sync : unit -> unit ...@@ -13,4 +13,5 @@ val sync : unit -> unit
module Hook: sig module Hook: sig
val expr: Ast.pexpr Grammar.Entry.e val expr: Ast.pexpr Grammar.Entry.e
val pat: Ast.ppat Grammar.Entry.e val pat: Ast.ppat Grammar.Entry.e
val keyword: string Grammar.Entry.e
end end
\ No newline at end of file
...@@ -4,7 +4,7 @@ open Parser.Hook ...@@ -4,7 +4,7 @@ open Parser.Hook
EXTEND EXTEND
GLOBAL: expr pat; GLOBAL: expr pat keyword;
expr: [ expr: [
...@@ -17,4 +17,6 @@ EXTEND ...@@ -17,4 +17,6 @@ EXTEND
cond: cond:
[ [
["`";"true" -> assert false ] ]; ["`";"true" -> assert false ] ];
keyword: [ [ a = [ "select" | "from" | "where" ] -> a ] ];
END END
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment