Vidyashree Rama | fe971cb | 2016-02-12 18:44:12 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | 0f7908b | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Laboratory |
Vidyashree Rama | fe971cb | 2016-02-12 18:44:12 +0530 | [diff] [blame] | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package org.onosproject.yangutils.parser.impl.listeners; |
| 18 | |
Vidyashree Rama | b24ca90 | 2016-02-13 21:47:58 +0530 | [diff] [blame] | 19 | import org.onosproject.yangutils.datamodel.YangDataTypes; |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 20 | import org.onosproject.yangutils.datamodel.YangDerivedInfo; |
Vidyashree Rama | b24ca90 | 2016-02-13 21:47:58 +0530 | [diff] [blame] | 21 | import org.onosproject.yangutils.datamodel.YangLeaf; |
| 22 | import org.onosproject.yangutils.datamodel.YangLeafList; |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 23 | import org.onosproject.yangutils.datamodel.YangNode; |
| 24 | import org.onosproject.yangutils.datamodel.YangNodeIdentifier; |
| 25 | import org.onosproject.yangutils.datamodel.YangResolutionInfo; |
Vidyashree Rama | b24ca90 | 2016-02-13 21:47:58 +0530 | [diff] [blame] | 26 | import org.onosproject.yangutils.datamodel.YangType; |
Vinod Kumar S | 48848f7 | 2016-02-25 15:52:16 +0530 | [diff] [blame] | 27 | import org.onosproject.yangutils.datamodel.YangTypeDef; |
Gaurav Agrawal | f6ccc97 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 28 | import org.onosproject.yangutils.datamodel.YangUnion; |
| 29 | import org.onosproject.yangutils.datamodel.exceptions.DataModelException; |
Vidyashree Rama | b24ca90 | 2016-02-13 21:47:58 +0530 | [diff] [blame] | 30 | import org.onosproject.yangutils.parser.Parsable; |
Vidyashree Rama | fe971cb | 2016-02-12 18:44:12 +0530 | [diff] [blame] | 31 | import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; |
Vidyashree Rama | b24ca90 | 2016-02-13 21:47:58 +0530 | [diff] [blame] | 32 | import org.onosproject.yangutils.parser.exceptions.ParserException; |
Vidyashree Rama | fe971cb | 2016-02-12 18:44:12 +0530 | [diff] [blame] | 33 | import org.onosproject.yangutils.parser.impl.TreeWalkListener; |
Vinod Kumar S | 48848f7 | 2016-02-25 15:52:16 +0530 | [diff] [blame] | 34 | |
Vinod Kumar S | f677daf | 2016-04-15 18:08:57 +0530 | [diff] [blame] | 35 | import static org.onosproject.yangutils.datamodel.ResolvableStatus.UNRESOLVED; |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 36 | import static org.onosproject.yangutils.datamodel.utils.DataModelUtils.addResolutionInfo; |
Vidyashree Rama | e300f70 | 2016-02-20 19:27:56 +0530 | [diff] [blame] | 37 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY; |
Gaurav Agrawal | 4ce3acf | 2016-02-25 04:37:05 +0530 | [diff] [blame] | 38 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT; |
Vinod Kumar S | f677daf | 2016-04-15 18:08:57 +0530 | [diff] [blame] | 39 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction |
| 40 | .constructExtendedListenerErrorMessage; |
| 41 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction |
| 42 | .constructListenerErrorMessage; |
Vidyashree Rama | e300f70 | 2016-02-20 19:27:56 +0530 | [diff] [blame] | 43 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER; |
Gaurav Agrawal | 4ce3acf | 2016-02-25 04:37:05 +0530 | [diff] [blame] | 44 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER; |
Vidyashree Rama | e300f70 | 2016-02-20 19:27:56 +0530 | [diff] [blame] | 45 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER; |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 46 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.UNHANDLED_PARSED_DATA; |
| 47 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidNodeIdentifier; |
Vidyashree Rama | e300f70 | 2016-02-20 19:27:56 +0530 | [diff] [blame] | 48 | import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty; |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 49 | import static org.onosproject.yangutils.utils.YangConstructType.TYPE_DATA; |
Vidyashree Rama | e300f70 | 2016-02-20 19:27:56 +0530 | [diff] [blame] | 50 | |
Vidyashree Rama | fe971cb | 2016-02-12 18:44:12 +0530 | [diff] [blame] | 51 | /* |
| 52 | * Reference: RFC6020 and YANG ANTLR Grammar |
| 53 | * |
| 54 | * ABNF grammar as per RFC6020 |
| 55 | * type-stmt = type-keyword sep identifier-ref-arg-str optsep |
| 56 | * (";" / |
| 57 | * "{" stmtsep |
| 58 | * type-body-stmts |
| 59 | * "}") |
| 60 | * |
| 61 | * ANTLR grammar rule |
| 62 | * typeStatement : TYPE_KEYWORD string (STMTEND | LEFT_CURLY_BRACE typeBodyStatements RIGHT_CURLY_BRACE); |
| 63 | */ |
| 64 | |
| 65 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 66 | * Represents listener based call back function corresponding to the "type" rule |
Gaurav Agrawal | 4ce3acf | 2016-02-25 04:37:05 +0530 | [diff] [blame] | 67 | * defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020. |
Vidyashree Rama | fe971cb | 2016-02-12 18:44:12 +0530 | [diff] [blame] | 68 | */ |
| 69 | public final class TypeListener { |
| 70 | |
| 71 | /** |
| 72 | * Creates a new type listener. |
| 73 | */ |
| 74 | private TypeListener() { |
| 75 | } |
| 76 | |
| 77 | /** |
Gaurav Agrawal | 4ce3acf | 2016-02-25 04:37:05 +0530 | [diff] [blame] | 78 | * It is called when parser receives an input matching the grammar rule |
| 79 | * (type), performs validation and updates the data model tree. |
Vidyashree Rama | fe971cb | 2016-02-12 18:44:12 +0530 | [diff] [blame] | 80 | * |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 81 | * @param listener listener's object |
| 82 | * @param ctx context object of the grammar rule |
Vidyashree Rama | fe971cb | 2016-02-12 18:44:12 +0530 | [diff] [blame] | 83 | */ |
| 84 | public static void processTypeEntry(TreeWalkListener listener, |
Gaurav Agrawal | 4ce3acf | 2016-02-25 04:37:05 +0530 | [diff] [blame] | 85 | GeneratedYangParser.TypeStatementContext ctx) { |
Vidyashree Rama | fe971cb | 2016-02-12 18:44:12 +0530 | [diff] [blame] | 86 | |
Vidyashree Rama | b24ca90 | 2016-02-13 21:47:58 +0530 | [diff] [blame] | 87 | // Check for stack to be non empty. |
Vidyashree Rama | e300f70 | 2016-02-20 19:27:56 +0530 | [diff] [blame] | 88 | checkStackIsNotEmpty(listener, MISSING_HOLDER, TYPE_DATA, ctx.string().getText(), ENTRY); |
Vidyashree Rama | b24ca90 | 2016-02-13 21:47:58 +0530 | [diff] [blame] | 89 | |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 90 | // Validate node identifier. |
Vidyashree Rama | 1396065 | 2016-04-26 15:06:06 +0530 | [diff] [blame] | 91 | YangNodeIdentifier nodeIdentifier = getValidNodeIdentifier(ctx.string().getText(), TYPE_DATA, |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 92 | ctx); |
Vinod Kumar S | 48848f7 | 2016-02-25 15:52:16 +0530 | [diff] [blame] | 93 | |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 94 | // Obtain the YANG data type. |
| 95 | YangDataTypes yangDataTypes = YangDataTypes.getType(ctx.string().getText()); |
| 96 | |
| 97 | // Create YANG type object and fill the values. |
| 98 | YangType<?> type = new YangType(); |
| 99 | type.setNodeIdentifier(nodeIdentifier); |
Vidyashree Rama | b24ca90 | 2016-02-13 21:47:58 +0530 | [diff] [blame] | 100 | type.setDataType(yangDataTypes); |
| 101 | |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 102 | int errorLine = ctx.getStart().getLine(); |
| 103 | int errorPosition = ctx.getStart().getCharPositionInLine(); |
| 104 | |
Vidyashree Rama | b24ca90 | 2016-02-13 21:47:58 +0530 | [diff] [blame] | 105 | Parsable tmpData = listener.getParsedDataStack().peek(); |
Gaurav Agrawal | db828bd | 2016-02-27 03:57:50 +0530 | [diff] [blame] | 106 | switch (tmpData.getYangConstructType()) { |
Vidyashree Rama | b24ca90 | 2016-02-13 21:47:58 +0530 | [diff] [blame] | 107 | case LEAF_DATA: |
| 108 | YangLeaf leaf = (YangLeaf) tmpData; |
Vidyashree Rama | 1396065 | 2016-04-26 15:06:06 +0530 | [diff] [blame] | 109 | leaf.setDataType(type); |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 110 | |
| 111 | /* |
| 112 | * If data type is derived, resolution information to be added |
| 113 | * in resolution list. |
| 114 | */ |
| 115 | if (yangDataTypes == YangDataTypes.DERIVED) { |
| 116 | // Parent YANG node of leaf to be added in resolution information. |
| 117 | Parsable leafData = listener.getParsedDataStack().pop(); |
| 118 | Parsable parentNodeOfLeaf = listener.getParsedDataStack().peek(); |
| 119 | listener.getParsedDataStack().push(leafData); |
| 120 | |
| 121 | // Verify parent node of leaf |
| 122 | if (!(parentNodeOfLeaf instanceof YangNode)) { |
| 123 | throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, TYPE_DATA, |
| 124 | ctx.string().getText(), EXIT)); |
| 125 | } |
| 126 | |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 127 | // Create empty derived info and attach it to type extended info. |
| 128 | YangDerivedInfo<?> yangDerivedInfo = new YangDerivedInfo<>(); |
| 129 | ((YangType<YangDerivedInfo>) type).setDataTypeExtendedInfo(yangDerivedInfo); |
| 130 | |
Vinod Kumar S | f677daf | 2016-04-15 18:08:57 +0530 | [diff] [blame] | 131 | type.setResolvableStatus(UNRESOLVED); |
| 132 | |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 133 | // Add resolution information to the list |
| 134 | YangResolutionInfo resolutionInfo = new YangResolutionInfo<YangType>(type, |
Vinod Kumar S | f677daf | 2016-04-15 18:08:57 +0530 | [diff] [blame] | 135 | (YangNode) parentNodeOfLeaf, errorLine, errorPosition); |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 136 | addToResolutionList(resolutionInfo, ctx); |
| 137 | } |
Vidyashree Rama | b24ca90 | 2016-02-13 21:47:58 +0530 | [diff] [blame] | 138 | break; |
| 139 | case LEAF_LIST_DATA: |
| 140 | YangLeafList leafList = (YangLeafList) tmpData; |
Vidyashree Rama | 1396065 | 2016-04-26 15:06:06 +0530 | [diff] [blame] | 141 | leafList.setDataType(type); |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 142 | |
| 143 | /* |
| 144 | * If data type is derived, resolution information to be added |
| 145 | * in resolution list. |
| 146 | */ |
| 147 | if (yangDataTypes == YangDataTypes.DERIVED) { |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 148 | // Parent YANG node of leaf list to be added in resolution information. |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 149 | Parsable leafListData = listener.getParsedDataStack().pop(); |
| 150 | Parsable parentNodeOfLeafList = listener.getParsedDataStack().peek(); |
| 151 | listener.getParsedDataStack().push(leafListData); |
| 152 | |
| 153 | // Verify parent node of leaf |
| 154 | if (!(parentNodeOfLeafList instanceof YangNode)) { |
| 155 | throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, TYPE_DATA, |
| 156 | ctx.string().getText(), EXIT)); |
| 157 | } |
| 158 | |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 159 | // Create empty derived info and attach it to type extended info. |
| 160 | YangDerivedInfo<?> yangDerivedInfo = new YangDerivedInfo<>(); |
| 161 | ((YangType<YangDerivedInfo>) type).setDataTypeExtendedInfo(yangDerivedInfo); |
| 162 | |
| 163 | // Add resolution information to the list |
Vinod Kumar S | f677daf | 2016-04-15 18:08:57 +0530 | [diff] [blame] | 164 | YangResolutionInfo resolutionInfo = |
| 165 | new YangResolutionInfo<YangType>(type, (YangNode) parentNodeOfLeafList, errorLine, |
| 166 | errorPosition); |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 167 | addToResolutionList(resolutionInfo, ctx); |
| 168 | } |
Vidyashree Rama | b24ca90 | 2016-02-13 21:47:58 +0530 | [diff] [blame] | 169 | break; |
Gaurav Agrawal | f6ccc97 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 170 | case UNION_DATA: |
| 171 | YangUnion unionNode = (YangUnion) tmpData; |
| 172 | try { |
Vidyashree Rama | 1396065 | 2016-04-26 15:06:06 +0530 | [diff] [blame] | 173 | unionNode.addType(type); |
Gaurav Agrawal | f6ccc97 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 174 | } catch (DataModelException e) { |
| 175 | ParserException parserException = new ParserException(e.getMessage()); |
| 176 | parserException.setLine(ctx.getStart().getLine()); |
| 177 | parserException.setCharPosition(ctx.getStart().getCharPositionInLine()); |
| 178 | throw parserException; |
| 179 | } |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 180 | |
| 181 | /* |
| 182 | * If data type is derived, resolution information to be added |
| 183 | * in resolution list. |
| 184 | */ |
| 185 | if (yangDataTypes == YangDataTypes.DERIVED) { |
| 186 | |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 187 | // Create empty derived info and attach it to type extended info. |
| 188 | YangDerivedInfo<?> yangDerivedInfo = new YangDerivedInfo<>(); |
| 189 | ((YangType<YangDerivedInfo>) type).setDataTypeExtendedInfo(yangDerivedInfo); |
| 190 | |
| 191 | // Add resolution information to the list |
| 192 | YangResolutionInfo resolutionInfo = |
Vidyashree Rama | 1396065 | 2016-04-26 15:06:06 +0530 | [diff] [blame] | 193 | new YangResolutionInfo<YangType>(type, unionNode, errorLine, errorPosition); |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 194 | addToResolutionList(resolutionInfo, ctx); |
| 195 | } |
| 196 | |
Gaurav Agrawal | f6ccc97 | 2016-03-25 11:25:36 +0530 | [diff] [blame] | 197 | break; |
Vinod Kumar S | 48848f7 | 2016-02-25 15:52:16 +0530 | [diff] [blame] | 198 | case TYPEDEF_DATA: |
Vinod Kumar S | 48848f7 | 2016-02-25 15:52:16 +0530 | [diff] [blame] | 199 | /* Prepare the base type info and set in derived type */ |
| 200 | YangTypeDef typeDef = (YangTypeDef) tmpData; |
Vidyashree Rama | 1396065 | 2016-04-26 15:06:06 +0530 | [diff] [blame] | 201 | typeDef.setDataType(type); |
Vinod Kumar S | 48848f7 | 2016-02-25 15:52:16 +0530 | [diff] [blame] | 202 | |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 203 | /* |
| 204 | * If data type is derived, resolution information to be added |
| 205 | * in resolution list. |
| 206 | */ |
| 207 | if (yangDataTypes == YangDataTypes.DERIVED) { |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 208 | // Create empty derived info and attach it to type extended info. |
| 209 | YangDerivedInfo<?> yangDerivedInfo = new YangDerivedInfo<>(); |
| 210 | ((YangType<YangDerivedInfo>) type).setDataTypeExtendedInfo(yangDerivedInfo); |
| 211 | |
| 212 | // Add resolution information to the list |
Vinod Kumar S | f677daf | 2016-04-15 18:08:57 +0530 | [diff] [blame] | 213 | YangResolutionInfo resolutionInfo = |
Vidyashree Rama | 1396065 | 2016-04-26 15:06:06 +0530 | [diff] [blame] | 214 | new YangResolutionInfo<YangType>(type, typeDef, errorLine, errorPosition); |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 215 | addToResolutionList(resolutionInfo, ctx); |
| 216 | } |
Vidyashree Rama | b24ca90 | 2016-02-13 21:47:58 +0530 | [diff] [blame] | 217 | break; |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 218 | //TODO: deviate replacement statement.case TYPEDEF_DATA: //TODO |
Vinod Kumar S | 48848f7 | 2016-02-25 15:52:16 +0530 | [diff] [blame] | 219 | |
Vidyashree Rama | b24ca90 | 2016-02-13 21:47:58 +0530 | [diff] [blame] | 220 | default: |
Vidyashree Rama | e300f70 | 2016-02-20 19:27:56 +0530 | [diff] [blame] | 221 | throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, TYPE_DATA, |
Gaurav Agrawal | 4ce3acf | 2016-02-25 04:37:05 +0530 | [diff] [blame] | 222 | ctx.string().getText(), EXIT)); |
Vidyashree Rama | b24ca90 | 2016-02-13 21:47:58 +0530 | [diff] [blame] | 223 | } |
Vidyashree Rama | bc9611f | 2016-04-12 23:33:33 +0530 | [diff] [blame] | 224 | |
| 225 | // Push the type to the stack. |
| 226 | listener.getParsedDataStack().push(type); |
Vidyashree Rama | fe971cb | 2016-02-12 18:44:12 +0530 | [diff] [blame] | 227 | } |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 228 | |
| 229 | /** |
Vidyashree Rama | bc9611f | 2016-04-12 23:33:33 +0530 | [diff] [blame] | 230 | * It is called when parser exits from grammar rule (type), it perform |
| 231 | * validations and update the data model tree. |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 232 | * |
Vidyashree Rama | bc9611f | 2016-04-12 23:33:33 +0530 | [diff] [blame] | 233 | * @param listener Listener's object |
| 234 | * @param ctx context object of the grammar rule |
| 235 | */ |
| 236 | public static void processTypeExit(TreeWalkListener listener, |
| 237 | GeneratedYangParser.TypeStatementContext ctx) { |
| 238 | |
| 239 | // Check for stack to be non empty. |
| 240 | checkStackIsNotEmpty(listener, MISSING_CURRENT_HOLDER, TYPE_DATA, ctx.string().getText(), EXIT); |
| 241 | |
| 242 | Parsable parsableType = listener.getParsedDataStack().pop(); |
| 243 | if (!(parsableType instanceof YangType)) { |
| 244 | throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, TYPE_DATA, |
| 245 | ctx.string().getText(), EXIT)); |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | /** |
| 250 | * Adds to resolution list. |
| 251 | * |
| 252 | * @param resolutionInfo resolution information |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 253 | * @param ctx context object of the grammar rule |
| 254 | */ |
| 255 | private static void addToResolutionList(YangResolutionInfo<YangType> resolutionInfo, |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 256 | GeneratedYangParser.TypeStatementContext ctx) { |
Gaurav Agrawal | 1fbfae1 | 2016-03-29 02:17:23 +0530 | [diff] [blame] | 257 | try { |
| 258 | addResolutionInfo(resolutionInfo); |
| 259 | } catch (DataModelException e) { |
| 260 | throw new ParserException(constructExtendedListenerErrorMessage(UNHANDLED_PARSED_DATA, |
| 261 | TYPE_DATA, ctx.string().getText(), EXIT, e.getMessage())); |
| 262 | } |
| 263 | } |
Gaurav Agrawal | 4ce3acf | 2016-02-25 04:37:05 +0530 | [diff] [blame] | 264 | } |