[ONOS-4762][ONOS-4601]Grammar for meta data + Union defect fix
Change-Id: I8f78127e5b292cca6a79b32d496c2602c9105acd
diff --git a/plugin/src/main/resources/YangLexer.g4 b/plugin/src/main/resources/YangLexer.g4
index da20fd8..d1f7fea 100644
--- a/plugin/src/main/resources/YangLexer.g4
+++ b/plugin/src/main/resources/YangLexer.g4
@@ -100,6 +100,7 @@
TRUE_KEYWORD : 'true';
UNBOUNDED_KEYWORD : 'unbounded';
USER_KEYWORD : 'user';
+ COMPILER_ANNOTATION_KEYWORD : 'compiler-annotation';
// Lexer tokens to be skipped
COMMENT
@@ -116,11 +117,18 @@
DATE_ARG : DIGIT DIGIT DIGIT DIGIT '-' DIGIT DIGIT '-' DIGIT DIGIT;
LEFT_CURLY_BRACE : '{';
RIGHT_CURLY_BRACE : '}';
+ LEFT_ROUND_BRACE : '(';
+ RIGHT_ROUND_BRACE : ')';
+ ANNOTATION_START : '@';
+ ANNOTATION_IDENTIFIER : ('@')(ALPHA | '_')
+ (ALPHA | DIGIT | '_' | '-' | '.')*;
IDENTIFIER : (ALPHA | '_')
(ALPHA | DIGIT | '_' | '-' | '.')*;
STMTEND : ';';
DQUOTE : '"';
COLON : ':';
+ COMMA : ',';
+ EQUAL : '=';
PLUS : '+';
MINUS: '-';