Vidyashree Rama
Committed by Gerrit Code Review

[ONOS-3882, 3883, 3892]Implement Yang container, list, leaf, leaf-list parsing

Change-Id: I39039c91385fe0d530d037350ef7833c2459514d
Showing 15 changed files with 1123 additions and 0 deletions
/*
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.yangutils.parser.impl.listeners;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
*
* ABNF grammar as per RFC6020
* config-stmt = config-keyword sep
* config-arg-str stmtend
* config-arg-str = < a string that matches the rule
* config-arg >
* config-arg = true-keyword / false-keyword
*
* ANTLR grammar rule
* configStatement : CONFIG_KEYWORD (TRUE_KEYWORD | FALSE_KEYWORD) STMTEND;
*/
/**
* Implements listener based call back function corresponding to the "config"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class ConfigListener {
/**
* Creates a new config listener.
*/
private ConfigListener() {
}
/**
* It is called when parser receives an input matching the grammar
* rule (config), performs validation and updates the data model
* tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processConfigEntry(TreeWalkListener listener,
GeneratedYangParser.ConfigStatementContext ctx) {
// TODO method implementation
}
/**
* It is called when parser exits from grammar rule (config), it performs
* validation and updates the data model tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processConfigExit(TreeWalkListener listener,
GeneratedYangParser.ConfigStatementContext ctx) {
// TODO method implementation
}
}
\ No newline at end of file
/*
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.yangutils.parser.impl.listeners;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
*
* ABNF grammar as per RFC6020
* container-stmt = container-keyword sep identifier-arg-str optsep
* (";" /
* "{" stmtsep
* ;; these stmts can appear in any order
* [when-stmt stmtsep]
* *(if-feature-stmt stmtsep)
* *(must-stmt stmtsep)
* [presence-stmt stmtsep]
* [config-stmt stmtsep]
* [status-stmt stmtsep]
* [description-stmt stmtsep]
* [reference-stmt stmtsep]
* *((typedef-stmt /
* grouping-stmt) stmtsep)
* *(data-def-stmt stmtsep)
* "}")
*
* ANTLR grammar rule
* containerStatement : CONTAINER_KEYWORD IDENTIFIER
* (STMTEND | LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | mustStatement |
* presenceStatement | configStatement | statusStatement | descriptionStatement |
* referenceStatement | typedefStatement | groupingStatement
* | dataDefStatement)* RIGHT_CURLY_BRACE);
*/
/**
* Implements listener based call back function corresponding to the "container"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class ContainerListener {
/**
* Creates a new container listener.
*/
private ContainerListener() {
}
/**
* It is called when parser receives an input matching the grammar
* rule (container), performs validation and updates the data model
* tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processContainerEntry(TreeWalkListener listener,
GeneratedYangParser.ContainerStatementContext ctx) {
// TODO method implementation
}
/**
* It is called when parser exits from grammar rule (container), it perform
* validations and updates the data model tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processContainerExit(TreeWalkListener listener,
GeneratedYangParser.ContainerStatementContext ctx) {
//TODO method implementation
}
}
/*
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.yangutils.parser.impl.listeners;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
*
* ABNF grammar as per RFC6020
* description-stmt = description-keyword sep string optsep stmtend
*
* ANTLR grammar rule
* descriptionStatement : DESCRIPTION_KEYWORD string STMTEND;
*/
/**
* Implements listener based call back function corresponding to the "description"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class DescriptionListener {
/**
* Creates a new description listener.
*/
private DescriptionListener() {
}
/**
* It is called when parser receives an input matching the grammar
* rule (description), perform validations and updates the data model
* tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processDescriptionEntry(TreeWalkListener listener,
GeneratedYangParser.DescriptionStatementContext ctx) {
// TODO method implementation
}
/**
* It is called when parser exits from grammar rule (description), it perform
* validations and updates the data model tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processDescriptionExit(TreeWalkListener listener,
GeneratedYangParser.DescriptionStatementContext ctx) {
// TODO method implementation
}
}
\ No newline at end of file
/*
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.yangutils.parser.impl.listeners;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
*
* ABNF grammar as per RFC6020
* key-stmt = key-keyword sep key-arg-str stmtend
*
* ANTLR grammar rule
* keyStatement : KEY_KEYWORD string STMTEND;
*/
/**
* Implements listener based call back function corresponding to the "key"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class KeyListener {
/**
* Creates a new key listener.
*/
private KeyListener() {
}
/**
* It is called when parser receives an input matching the grammar
* rule (key), perform validations and updates the data model
* tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processKeyEntry(TreeWalkListener listener,
GeneratedYangParser.KeyStatementContext ctx) {
// TODO method implementation
}
/**
* It is called when parser exits from grammar rule (key), it perform
* validations and updates the data model tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processKeyExit(TreeWalkListener listener,
GeneratedYangParser.KeyStatementContext ctx) {
// TODO method implementation
}
}
\ No newline at end of file
/*
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.yangutils.parser.impl.listeners;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
*
* ABNF grammar as per RFC6020
* leaf-list-stmt = leaf-list-keyword sep identifier-arg-str optsep
* "{" stmtsep
* ;; these stmts can appear in any order
* [when-stmt stmtsep]
* *(if-feature-stmt stmtsep)
* type-stmt stmtsep
* [units-stmt stmtsep]
* *(must-stmt stmtsep)
* [config-stmt stmtsep]
* [min-elements-stmt stmtsep]
* [max-elements-stmt stmtsep]
* [ordered-by-stmt stmtsep]
* [status-stmt stmtsep]
* [description-stmt stmtsep]
* [reference-stmt stmtsep]
* "}"
*
* ANTLR grammar rule
* leafListStatement : LEAF_LIST_KEYWORD IDENTIFIER LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement |
* typeStatement | unitsStatement | mustStatement | configStatement | minElementsStatement | maxElementsStatement |
* orderedByStatement | statusStatement | descriptionStatement | referenceStatement)* RIGHT_CURLY_BRACE;
*/
/**
* Implements listener based call back function corresponding to the "leaf-list"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class LeafListListener {
/**
* Creates a new leaf list listener.
*/
private LeafListListener() {
}
/**
* It is called when parser receives an input matching the grammar
* rule (leaf-list), performs validation and updates the data model
* tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processLeafListEntry(TreeWalkListener listener,
GeneratedYangParser.LeafListStatementContext ctx) {
// TODO method implementation
}
/**
* It is called when parser exits from grammar rule (leaf-list), it performs
* validation and updates the data model tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processLeafListExit(TreeWalkListener listener,
GeneratedYangParser.LeafListStatementContext ctx) {
// TODO method implementation
}
}
\ No newline at end of file
/*
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Implements listener based call back function corresponding to the "leaf"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
package org.onosproject.yangutils.parser.impl.listeners;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
*
* ABNF grammar as per RFC6020
* leaf-stmt = leaf-keyword sep identifier-arg-str optsep
* "{" stmtsep
* ;; these stmts can appear in any order
* [when-stmt stmtsep]
* *(if-feature-stmt stmtsep)
* type-stmt stmtsep
* [units-stmt stmtsep]
* *(must-stmt stmtsep)
* [default-stmt stmtsep]
* [config-stmt stmtsep]
* [mandatory-stmt stmtsep]
* [status-stmt stmtsep]
* [description-stmt stmtsep]
* [reference-stmt stmtsep]
* "}"
*
* ANTLR grammar rule
* leafStatement : LEAF_KEYWORD IDENTIFIER LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | typeStatement |
* unitsStatement | mustStatement | defaultStatement | configStatement | mandatoryStatement | statusStatement |
* descriptionStatement | referenceStatement)* RIGHT_CURLY_BRACE;
*/
/**
* Implements listener based call back function corresponding to the "leaf"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class LeafListener {
/**
* Creates a new leaf listener.
*/
private LeafListener() {
}
/**
* It is called when parser receives an input matching the grammar
* rule (leaf), performs validation and updates the data model
* tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processLeafEntry(TreeWalkListener listener,
GeneratedYangParser.LeafStatementContext ctx) {
// TODO method implementation
}
/**
* It is called when parser exits from grammar rule (leaf), performs
* validation and updates the data model tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processLeafExit(TreeWalkListener listener,
GeneratedYangParser.LeafStatementContext ctx) {
// TODO method implementation
}
}
\ No newline at end of file
/*
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.yangutils.parser.impl.listeners;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
*
* ABNF grammar as per RFC6020
* list-stmt = list-keyword sep identifier-arg-str optsep
* "{" stmtsep
* ;; these stmts can appear in any order
* [when-stmt stmtsep]
* *(if-feature-stmt stmtsep)
* *(must-stmt stmtsep)
* [key-stmt stmtsep]
* *(unique-stmt stmtsep)
* [config-stmt stmtsep]
* [min-elements-stmt stmtsep]
* [max-elements-stmt stmtsep]
* [ordered-by-stmt stmtsep]
* [status-stmt stmtsep]
* [description-stmt stmtsep]
* [reference-stmt stmtsep]
* *((typedef-stmt /
* grouping-stmt) stmtsep)
* 1*(data-def-stmt stmtsep)
* "}"
*
* ANTLR grammar rule
* listStatement : LIST_KEYWORD IDENTIFIER LEFT_CURLY_BRACE (whenStatement | ifFeatureStatement | mustStatement |
* keyStatement | uniqueStatement | configStatement | minElementsStatement | maxElementsStatement |
* orderedByStatement | statusStatement | descriptionStatement | referenceStatement | typedefStatement |
* groupingStatement| dataDefStatement)* RIGHT_CURLY_BRACE;
*/
/**
* Implements listener based call back function corresponding to the "list"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class ListListener {
/**
* Creates a new list listener.
*/
private ListListener() {
}
/**
* It is called when parser receives an input matching the grammar
* rule (list), performs validation and updates the data model
* tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processListEntry(TreeWalkListener listener,
GeneratedYangParser.ListStatementContext ctx) {
// TODO
}
/**
* It is called when parser exits from grammar rule (list), it performs
* validation and updates the data model tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processListExit(TreeWalkListener listener,
GeneratedYangParser.ListStatementContext ctx) {
// TODO
}
}
\ No newline at end of file
/*
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.yangutils.parser.impl.listeners;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
*
* ABNF grammar as per RFC6020
* mandatory-stmt = mandatory-keyword sep
* mandatory-arg-str stmtend
*
* mandatory-arg-str = < a string that matches the rule
* mandatory-arg >
*
* mandatory-arg = true-keyword / false-keyword
*
* ANTLR grammar rule
* mandatoryStatement : MANDATORY_KEYWORD (TRUE_KEYWORD | FALSE_KEYWORD) STMTEND;
*/
/**
* Implements listener based call back function corresponding to the "mandatory"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class MandatoryListener {
/**
* Creates a new mandatory listener.
*/
private MandatoryListener() {
}
/**
* It is called when parser receives an input matching the grammar
* rule (mandatory), performs validation and updates the data model
* tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processMandatoryEntry(TreeWalkListener listener,
GeneratedYangParser.MandatoryStatementContext ctx) {
// TODO method implementation
}
/**
* It is called when parser exits from grammar rule (mandatory), it performs
* validation and updates the data model tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processMandatoryExit(TreeWalkListener listener,
GeneratedYangParser.MandatoryStatementContext ctx) {
// TODO method implementation
}
}
\ No newline at end of file
/*
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.yangutils.parser.impl.listeners;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
*
* ABNF grammar as per RFC6020
* max-elements-stmt = max-elements-keyword sep
* max-value-arg-str stmtend
* max-value-arg-str = < a string that matches the rule
* max-value-arg >
*
* ANTLR grammar rule
* maxElementsStatement : MAX_ELEMENTS_KEYWORD maxValueArgument STMTEND;
*/
/**
* Implements listener based call back function corresponding to the "max-elements"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class MaxElementsListener {
/**
* Creates a new max-elements listener.
*/
private MaxElementsListener() {
}
/**
* It is called when parser receives an input matching the grammar
* rule (max-elements), performs validation and updates the data model
* tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processMaxElementsEntry(TreeWalkListener listener,
GeneratedYangParser.MaxElementsStatementContext ctx) {
// TODO method implementation
}
/**
* It is called when parser exits from grammar rule (max-elements), it performs
* validation and updates the data model tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processMaxElementsExit(TreeWalkListener listener,
GeneratedYangParser.MaxElementsStatementContext ctx) {
// TODO method implementation
}
}
\ No newline at end of file
/*
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.yangutils.parser.impl.listeners;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
*
* ABNF grammar as per RFC6020
* min-elements-stmt = min-elements-keyword sep
* min-value-arg-str stmtend
* min-value-arg-str = < a string that matches the rule
* min-value-arg >
* min-value-arg = non-negative-integer-value
*
* ANTLR grammar rule
* minElementsStatement : MIN_ELEMENTS_KEYWORD INTEGER STMTEND;
*/
/**
* Implements listener based call back function corresponding to the "min-elements"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class MinElementsListener {
/**
* Creates a new min-elements listener.
*/
private MinElementsListener() {
}
/**
* It is called when parser receives an input matching the grammar
* rule (min-elements), performs validation and updates the data model
* tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processMinElementsEntry(TreeWalkListener listener,
GeneratedYangParser.MinElementsStatementContext ctx) {
// TODO method implementation
}
/**
* It is called when parser exits from grammar rule (min-elements), it performs
* validation and updates the data model tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processMinElementsExit(TreeWalkListener listener,
GeneratedYangParser.MinElementsStatementContext ctx) {
// TODO method implementation
}
}
\ No newline at end of file
/*
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.yangutils.parser.impl.listeners;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
*
* ABNF grammar as per RFC6020
* presence-stmt = presence-keyword sep string stmtend
*
* ANTLR grammar rule
* presenceStatement : PRESENCE_KEYWORD string STMTEND;
*/
/**
* Implements listener based call back function corresponding to the "presence"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class PresenceListener {
/**
* Creates a new presence listener.
*/
private PresenceListener() {
}
/**
* It is called when parser receives an input matching the grammar
* rule (presence), performs validation and updates the data model
* tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processPresenceEntry(TreeWalkListener listener,
GeneratedYangParser.PresenceStatementContext ctx) {
// TODO method implementation
}
/**
* It is called when parser exits from grammar rule (presence), it performs
* validation and updates the data model tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processPresenceExit(TreeWalkListener listener,
GeneratedYangParser.PresenceStatementContext ctx) {
// TODO method implementation
}
}
\ No newline at end of file
/*
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.yangutils.parser.impl.listeners;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
*
* ABNF grammar as per RFC6020
* reference-stmt = reference-keyword sep string optsep stmtend
*
* ANTLR grammar rule
* referenceStatement : REFERENCE_KEYWORD string STMTEND;
*/
/**
* Implements listener based call back function corresponding to the "reference"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class ReferenceListener {
/**
* Creates a new reference listener.
*/
private ReferenceListener() {
}
/**
* It is called when parser receives an input matching the grammar
* rule (reference), performs validation and updates the data model
* tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processReferenceEntry(TreeWalkListener listener,
GeneratedYangParser.ReferenceStatementContext ctx) {
// TODO method implementation
}
/**
* It is called when parser exits from grammar rule (reference), it performs
* validation and updates the data model tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processReferenceExit(TreeWalkListener listener,
GeneratedYangParser.ReferenceStatementContext ctx) {
// TODO method implementation
}
}
\ No newline at end of file
/*
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.yangutils.parser.impl.listeners;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
*
* ABNF grammar as per RFC6020
* status-stmt = status-keyword sep status-arg-str stmtend
* status-arg-str = < a string that matches the rule
* status-arg >
* status-arg = current-keyword /
* obsolete-keyword /
* deprecated-keyword
*
* ANTLR grammar rule
* statusStatement : STATUS_KEYWORD (CURRENT_KEYWORD | OBSOLETE_KEYWORD | DEPRECATED_KEYWORD) STMTEND;
*/
/**
* Implements listener based call back function corresponding to the "status"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class StatusListener {
/**
* Creates a new status listener.
*/
private StatusListener() {
}
/**
* It is called when parser receives an input matching the grammar
* rule (status), performs validation and updates the data model
* tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processStatusEntry(TreeWalkListener listener,
GeneratedYangParser.StatusStatementContext ctx) {
// TODO method implementation
}
/**
* It is called when parser exits from grammar rule (status), it performs
* validation and updates the data model tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processStatusExit(TreeWalkListener listener,
GeneratedYangParser.StatusStatementContext ctx) {
// TODO method implementation
}
}
\ No newline at end of file
/*
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.yangutils.parser.impl.listeners;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
*
* ABNF grammar as per RFC6020
* type-stmt = type-keyword sep identifier-ref-arg-str optsep
* (";" /
* "{" stmtsep
* type-body-stmts
* "}")
*
* ANTLR grammar rule
* typeStatement : TYPE_KEYWORD string (STMTEND | LEFT_CURLY_BRACE typeBodyStatements RIGHT_CURLY_BRACE);
*/
/**
* Implements listener based call back function corresponding to the "type"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class TypeListener {
/**
* Creates a new type listener.
*/
private TypeListener() {
}
/**
* It is called when parser receives an input matching the grammar
* rule (type), performs validation and updates the data model
* tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processTypeEntry(TreeWalkListener listener,
GeneratedYangParser.TypeStatementContext ctx) {
// TODO method implementation
}
/**
* It is called when parser exits from grammar rule (type), it performs
* validation and updates the data model tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processTypeExit(TreeWalkListener listener,
GeneratedYangParser.TypeStatementContext ctx) {
// TODO method implementation
}
}
\ No newline at end of file
/*
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.yangutils.parser.impl.listeners;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
*
* ABNF grammar as per RFC6020
* units-stmt = units-keyword sep string optsep stmtend
*
* ANTLR grammar rule
* unitsStatement : UNITS_KEYWORD string STMTEND;
*/
/**
* Implements listener based call back function corresponding to the "units"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class UnitsListener {
/**
* Creates a new units listener.
*/
private UnitsListener() {
}
/**
* It is called when parser receives an input matching the grammar
* rule (units), performs validation and updates the data model
* tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processUnitsEntry(TreeWalkListener listener,
GeneratedYangParser.UnitsStatementContext ctx) {
// TODO method implementation
}
/**
* It is called when parser exits from grammar rule (units), it performs
* validation and updates the data model tree.
*
* @param listener listener's object.
* @param ctx context object of the grammar rule.
*/
public static void processUnitsExit(TreeWalkListener listener,
GeneratedYangParser.UnitsStatementContext ctx) {
// TODO method implementation
}
}
\ No newline at end of file