diff options
author | Jon Bratseth <bratseth@oath.com> | 2020-03-13 22:53:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-13 22:53:09 +0100 |
commit | ea5fe1bf8c0d389a3964d2e5c490994920d21a4e (patch) | |
tree | 661d9d3b319c3299a6f70eb47044c192476f1494 /config-model/src/main/javacc/SDParser.jj | |
parent | 7e92c3852e893d09f0aa821e04e4e9dbe83b4ab2 (diff) | |
parent | a289c6ea55bc0251e437805892e545c5c3090f99 (diff) |
Merge pull request #12565 from vespa-engine/revert-12563-bratseth/search-to-schema
Revert "Bratseth/search to schema"
Diffstat (limited to 'config-model/src/main/javacc/SDParser.jj')
-rw-r--r-- | config-model/src/main/javacc/SDParser.jj | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/config-model/src/main/javacc/SDParser.jj b/config-model/src/main/javacc/SDParser.jj index 2ee0d870d0e..0cfd13f2a9c 100644 --- a/config-model/src/main/javacc/SDParser.jj +++ b/config-model/src/main/javacc/SDParser.jj @@ -197,7 +197,6 @@ TOKEN : < NL: "\n" > | < ANNOTATION: "annotation" > | < ANNOTATIONREFERENCE: "annotationreference" > -| < SCHEMA: "schema" > | < SEARCH: "search" > | < DIVERSITY: "diversity" > | < MIN_GROUPS: "min-groups" > @@ -404,38 +403,38 @@ Search search(DocumentTypeManager docMan, String dir) : Search search; } { - (<NL>)* (search = rootSchema(dir) | search = rootDocument(dir)) + (<NL>)* (search = rootSearch(dir) | search = rootDocument(dir)) { return search; } } /** - * This rule consumes a proper schema block. This and rootDocument() are the only rules that should ever consume + * This rule consumes a proper search block. This and rootDocument() are the only rules that should ever consume * trailing newline tokens. * - * @param dir the directory containing the file being parsed. - * @return the schema definition object. + * @param dir The directory containing the file being parsed. + * @return The search definition object. */ -Search rootSchema(String dir) : +Search rootSearch(String dir) : { String name; Search search; } { - ( ( <SCHEMA> | <SEARCH> ) name = identifier() { search = new Search(name, app); + ( <SEARCH> name = identifier() { search = new Search(name, app); rankProfileRegistry.add(new DefaultRankProfile(search, rankProfileRegistry)); rankProfileRegistry.add(new UnrankedRankProfile(search, rankProfileRegistry));} - lbrace() (rootSchemaItem(search) (<NL>)*)* <RBRACE> (<NL>)* <EOF>) + lbrace() (rootSearchItem(search) (<NL>)*)* <RBRACE> (<NL>)* <EOF>) { return search; } } /** - * Consumes an element of a schema block. This and rootSearch() are the only rules that should ever consume + * Consumes an element of a search block. This and rootSearch() are the only rules that should ever consume * trailing newline tokens. * * @param search The search object to modify. * @return Null. */ -Object rootSchemaItem(Search search) : { } +Object rootSearchItem(Search search) : { } { ( document(search) | documentSummary(search) @@ -453,10 +452,10 @@ Object rootSchemaItem(Search search) : { } } /** - * Consumes a schema definition that contains only documents to be used for inheritance, etc. + * Consumes a search definition that contains only documents to be used for inheritance, etc. * - * @param dir the directory containing the file being parsed. - * @return the schema definition object. + * @param dir The directory containing the file being parsed. + * @return The search definition object. */ Search rootDocument(String dir) : { @@ -482,7 +481,7 @@ Object rootDocumentItem(Search search) : { } /** * Consumes a use-document statement. This currently does nothing. * - * @param search the search object to modify. + * @param search The search object to modify. */ void useDocument(Search search) : { } { @@ -492,7 +491,7 @@ void useDocument(Search search) : { } /** * Consumes a document element. The name defaults to the search's name, but may be set. * - * @param search the search object to add content to. + * @param search The search object to add content to. */ void document(Search search) : { @@ -511,7 +510,7 @@ void document(Search search) : /** * Consumes a document element, explicitly named * - * @param search the search object to add content to. + * @param search The search object to add content to. */ void namedDocument(Search search) : { @@ -2618,7 +2617,6 @@ String identifier() : { } | <REFERENCE> | <REMOVEIFZERO> | <RERANKCOUNT> - | <SCHEMA> | <SEARCH> | <SECONDARY> | <SECONDPHASE> |