This is an automated email from the ASF dual-hosted git repository. wusheng pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-skywalking-oal-tool.git
The following commit(s) were added to refs/heads/master by this push: new 8d43bd9 Finish a g4 draft and command parser. 8d43bd9 is described below commit 8d43bd9219caf20e76ec9c0a812b758b21c18a22 Author: Wu Sheng <wu.sh...@foxmail.com> AuthorDate: Wed Aug 1 17:09:09 2018 +0800 Finish a g4 draft and command parser. --- oal-syntax/pom.xml | 5 + oal-syntax/src/main/antlr4/Expr.g4 | 9 - .../apache/skywalking/oal/tool/grammar/OALLexer.g4 | 103 ++++++++ .../skywalking/oal/tool/grammar/OALLexer.tokens | 39 +++ .../skywalking/oal/tool/grammar/OALParser.g4 | 44 +++ .../java/org/apache/skywalking/oal/tool/Main.java | 48 ++++ oal-syntax/src/test/resources/oal_test.oal | 0 oal-syntax/target/classes/ExprBaseListener.class | Bin 1649 -> 0 bytes oal-syntax/target/classes/ExprLexer.class | Bin 3331 -> 0 bytes oal-syntax/target/classes/ExprListener.class | Bin 562 -> 0 bytes .../target/classes/ExprParser$ExprContext.class | Bin 1622 -> 0 bytes .../target/classes/ExprParser$ProgContext.class | Bin 1865 -> 0 bytes oal-syntax/target/classes/ExprParser.class | Bin 7477 -> 0 bytes oal-syntax/target/classes/META-INF/DEPENDENCIES | 4 + .../org/apache/skywalking/oal/tool/Main.class | Bin 0 -> 1952 bytes .../skywalking/oal/tool/grammar/OALLexer.class | Bin 0 -> 8453 bytes .../grammar/OALParser$MetricStatementContext.class | Bin 0 -> 1862 bytes .../OALParser$MetricStatementsContext.class | Bin 0 -> 1925 bytes .../oal/tool/grammar/OALParser$RootContext.class | Bin 0 -> 1919 bytes .../oal/tool/grammar/OALParser$SourceContext.class | Bin 0 -> 2216 bytes .../skywalking/oal/tool/grammar/OALParser.class | Bin 0 -> 8289 bytes .../oal/tool/grammar/OALParserBaseListener.class | Bin 0 -> 3010 bytes .../oal/tool/grammar/OALParserListener.class | Bin 0 -> 1368 bytes .../target/generated-sources/antlr4/Expr.tokens | 14 - .../generated-sources/antlr4/ExprBaseListener.java | 64 ----- .../target/generated-sources/antlr4/ExprLexer.java | 77 ------ .../generated-sources/antlr4/ExprLexer.tokens | 14 - .../generated-sources/antlr4/ExprListener.java | 31 --- .../generated-sources/antlr4/ExprParser.java | 258 ------------------ .../generated-sources/antlr4/OALLexer.tokens | 39 +++ .../generated-sources/antlr4/OALParser.tokens | 39 +++ .../skywalking/oal/tool/grammar/OALLexer.java | 215 +++++++++++++++ .../skywalking/oal/tool/grammar/OALParser.java | 294 +++++++++++++++++++++ .../oal/tool/grammar/OALParserBaseListener.java | 91 +++++++ .../oal/tool/grammar/OALParserListener.java | 54 ++++ .../META-INF/DEPENDENCIES | 4 + .../compile/default-compile/createdFiles.lst | 14 +- .../compile/default-compile/inputFiles.lst | 8 +- .../META-INF/DEPENDENCIES | 4 + oal-syntax/target/test-classes/META-INF/LICENSE | 202 ++++++++++++++ oal-syntax/target/test-classes/META-INF/NOTICE | 8 + oal-syntax/target/test-classes/oal_test.oal | 0 42 files changed, 1205 insertions(+), 477 deletions(-) diff --git a/oal-syntax/pom.xml b/oal-syntax/pom.xml index 19a93a4..7d847bb 100644 --- a/oal-syntax/pom.xml +++ b/oal-syntax/pom.xml @@ -36,6 +36,11 @@ <artifactId>antlr4</artifactId> <version>4.7.1</version> </dependency> + <dependency> + <groupId>commons-cli</groupId> + <artifactId>commons-cli</artifactId> + <version>1.4</version> + </dependency> </dependencies> <build> diff --git a/oal-syntax/src/main/antlr4/Expr.g4 b/oal-syntax/src/main/antlr4/Expr.g4 deleted file mode 100644 index ea22cfc..0000000 --- a/oal-syntax/src/main/antlr4/Expr.g4 +++ /dev/null @@ -1,9 +0,0 @@ -grammar Expr; -prog: (expr NEWLINE)* ; -expr: expr ('*'|'/') expr - | expr ('+'|'-') expr - | INT - | '(' expr ')' - ; -NEWLINE : [\r\n]+ ; -INT : [0-9]+ ; \ No newline at end of file diff --git a/oal-syntax/src/main/antlr4/org/apache/skywalking/oal/tool/grammar/OALLexer.g4 b/oal-syntax/src/main/antlr4/org/apache/skywalking/oal/tool/grammar/OALLexer.g4 new file mode 100644 index 0000000..9345bc9 --- /dev/null +++ b/oal-syntax/src/main/antlr4/org/apache/skywalking/oal/tool/grammar/OALLexer.g4 @@ -0,0 +1,103 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + * + */ + + +// Observability Analysis Language lexer +lexer grammar OALLexer; + +@Header {package org.apache.skywalking.oal.tool.grammar;} + +// Keywords + +FROM: 'from'; +FILTER: 'filter'; +SRC_ALL: 'All'; +SRC_SERVICE: 'Service'; +SRC_SERVICE_INSTANCE: 'ServiceInstance'; +SRC_ENDPOINT: 'Endpoint'; +SRC_SERVICE_RELATION: 'ServiceRelation'; +SRC_SERVICE_INSTANCE_RELATION: 'ServiceInstanceRelation'; +SRC_ENDPOINT_RELATION: 'EndpointRelation'; +SRC_SERVICE_INSTANCE_JVM_CPU: 'ServiceInstance_JVM_CPU'; +SRC_SERVICE_INSTANCE_JVM_MEMORY: 'ServiceInstance_JVM_CPU'; +SRC_SERVICE_INSTANCE_JVM_MEMORY_POOL: 'ServiceInstance_JVM_Memory_Pool'; + +// Literals + +DECIMAL_LITERAL: ('0' | [1-9] (Digits? | '_'+ Digits)) [lL]?; + +BOOL_LITERAL: 'true' + | 'false' + ; + +CHAR_LITERAL: '\'' (~['\\\r\n] | EscapeSequence) '\''; + +STRING_LITERAL: '"' (~["\\\r\n] | EscapeSequence)* '"'; + +DelimitedComment + : '/*' ( DelimitedComment | . )*? '*/' + -> channel(HIDDEN) + ; + +LineComment + : '//' ~[\u000A\u000D]* + -> channel(HIDDEN) + ; + +// Identifiers + +IDENTIFIER: Letter LetterOrDigit*; + +// Fragment rules + +fragment EscapeSequence + : '\\' [btnfr"'\\] + | '\\' ([0-3]? [0-7])? [0-7] + | '\\' 'u'+ HexDigit HexDigit HexDigit HexDigit + ; + +fragment HexDigits + : HexDigit ((HexDigit | '_')* HexDigit)? + ; + +fragment HexDigit + : [0-9a-fA-F] + ; + +fragment Digits + : [0-9] ([0-9_]* [0-9])? + ; + +fragment LetterOrDigit + : Letter + | [0-9] + ; + +fragment Letter + : [a-zA-Z$_] // these are the "java letters" below 0x7F + | ~[\u0000-\u007F\uD800-\uDBFF] // covers all characters above 0x7F which are not a surrogate + | [\uD800-\uDBFF] [\uDC00-\uDFFF] // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF + ; + +// Constructors symbols + +DOT: '.'; +LR_BRACKET: '('; +RR_BRACKET: ')'; +COMMA: ','; +SEMI: ';'; \ No newline at end of file diff --git a/oal-syntax/src/main/antlr4/org/apache/skywalking/oal/tool/grammar/OALLexer.tokens b/oal-syntax/src/main/antlr4/org/apache/skywalking/oal/tool/grammar/OALLexer.tokens new file mode 100644 index 0000000..d245282 --- /dev/null +++ b/oal-syntax/src/main/antlr4/org/apache/skywalking/oal/tool/grammar/OALLexer.tokens @@ -0,0 +1,39 @@ +FROM=1 +FILTER=2 +SRC_ALL=3 +SRC_SERVICE=4 +SRC_SERVICE_INSTANCE=5 +SRC_ENDPOINT=6 +SRC_SERVICE_RELATION=7 +SRC_SERVICE_INSTANCE_RELATION=8 +SRC_ENDPOINT_RELATION=9 +SRC_SERVICE_INSTANCE_JVM_CPU=10 +SRC_SERVICE_INSTANCE_JVM_MEMORY=11 +SRC_SERVICE_INSTANCE_JVM_MEMORY_POOL=12 +DECIMAL_LITERAL=13 +BOOL_LITERAL=14 +CHAR_LITERAL=15 +STRING_LITERAL=16 +DelimitedComment=17 +LineComment=18 +IDENTIFIER=19 +DOT=20 +LR_BRACKET=21 +RR_BRACKET=22 +COMMA=23 +SEMI=24 +'from'=1 +'filter'=2 +'All'=3 +'Service'=4 +'ServiceInstance'=5 +'Endpoint'=6 +'ServiceRelation'=7 +'ServiceInstanceRelation'=8 +'EndpointRelation'=9 +'ServiceInstance_JVM_Memory_Pool'=12 +'.'=20 +'('=21 +')'=22 +','=23 +';'=24 diff --git a/oal-syntax/src/main/antlr4/org/apache/skywalking/oal/tool/grammar/OALParser.g4 b/oal-syntax/src/main/antlr4/org/apache/skywalking/oal/tool/grammar/OALParser.g4 new file mode 100644 index 0000000..65fdff1 --- /dev/null +++ b/oal-syntax/src/main/antlr4/org/apache/skywalking/oal/tool/grammar/OALParser.g4 @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + * + */ + +parser grammar OALParser; + +@Header {package org.apache.skywalking.oal.tool.grammar;} + +options { tokenVocab=OALLexer; } + + +// Top Level Description + +root + : metricStatements? DelimitedComment ? LineComment ? EOF + ; + +metricStatements + : metricStatement* + ; + +metricStatement + : FROM '(' source '.' IDENTIFIER ')' + ; + +source + : SRC_ALL | SRC_SERVICE | SRC_SERVICE_INSTANCE | SRC_ENDPOINT | + SRC_SERVICE_RELATION | SRC_SERVICE_INSTANCE_RELATION | SRC_ENDPOINT_RELATION | + SRC_SERVICE_INSTANCE_JVM_CPU | SRC_SERVICE_INSTANCE_JVM_MEMORY | SRC_SERVICE_INSTANCE_JVM_MEMORY_POOL // JVM source of service instance + ; \ No newline at end of file diff --git a/oal-syntax/src/main/java/org/apache/skywalking/oal/tool/Main.java b/oal-syntax/src/main/java/org/apache/skywalking/oal/tool/Main.java new file mode 100644 index 0000000..19880c5 --- /dev/null +++ b/oal-syntax/src/main/java/org/apache/skywalking/oal/tool/Main.java @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.apache.skywalking.oal.tool; + +import java.io.File; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.CommandLineParser; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; + +/** + * The main of SkyWalking OAL tool + */ +public class Main { + public static void main(String[] args) throws ParseException { + Options options = new Options(); + options.addRequiredOption("s", "script-filepath", true, "Need the absolute file path of OAL script."); + options.addRequiredOption("o", "output", true, "Need the root output folder of the generated codes."); + + CommandLineParser parser = new DefaultParser(); + CommandLine line = parser.parse( options, args ); + + String scriptFilePath = line.getOptionValue("s"); + String outputPath = line.getOptionValue("o"); + + File scriptFile = new File(scriptFilePath); + if (!scriptFile.exists()) { + throw new IllegalArgumentException("OAL script file [" + scriptFilePath + "] doesn't exist"); + } + } +} diff --git a/oal-syntax/src/test/resources/oal_test.oal b/oal-syntax/src/test/resources/oal_test.oal new file mode 100644 index 0000000..e69de29 diff --git a/oal-syntax/target/classes/ExprBaseListener.class b/oal-syntax/target/classes/ExprBaseListener.class deleted file mode 100644 index 732ec58..0000000 Binary files a/oal-syntax/target/classes/ExprBaseListener.class and /dev/null differ diff --git a/oal-syntax/target/classes/ExprLexer.class b/oal-syntax/target/classes/ExprLexer.class deleted file mode 100644 index 1626812..0000000 Binary files a/oal-syntax/target/classes/ExprLexer.class and /dev/null differ diff --git a/oal-syntax/target/classes/ExprListener.class b/oal-syntax/target/classes/ExprListener.class deleted file mode 100644 index 08fbdfc..0000000 Binary files a/oal-syntax/target/classes/ExprListener.class and /dev/null differ diff --git a/oal-syntax/target/classes/ExprParser$ExprContext.class b/oal-syntax/target/classes/ExprParser$ExprContext.class deleted file mode 100644 index 8619253..0000000 Binary files a/oal-syntax/target/classes/ExprParser$ExprContext.class and /dev/null differ diff --git a/oal-syntax/target/classes/ExprParser$ProgContext.class b/oal-syntax/target/classes/ExprParser$ProgContext.class deleted file mode 100644 index 015b59a..0000000 Binary files a/oal-syntax/target/classes/ExprParser$ProgContext.class and /dev/null differ diff --git a/oal-syntax/target/classes/ExprParser.class b/oal-syntax/target/classes/ExprParser.class deleted file mode 100644 index e920973..0000000 Binary files a/oal-syntax/target/classes/ExprParser.class and /dev/null differ diff --git a/oal-syntax/target/classes/META-INF/DEPENDENCIES b/oal-syntax/target/classes/META-INF/DEPENDENCIES index 2764812..d7e502c 100644 --- a/oal-syntax/target/classes/META-INF/DEPENDENCIES +++ b/oal-syntax/target/classes/META-INF/DEPENDENCIES @@ -28,6 +28,10 @@ From: 'Oracle' (http://www.oracle.com) - JSR 353 (JSON Processing) Default Provider (http://jsonp.java.net) org.glassfish:javax.json:bundle:1.0.4 License: Dual license consisting of the CDDL v1.1 and GPL v2 (https://glassfish.java.net/public/CDDL+GPL_1_1.html) +From: 'The Apache Software Foundation' (https://www.apache.org/) + - Apache Commons CLI (http://commons.apache.org/proper/commons-cli/) commons-cli:commons-cli:jar:1.4 + License: Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) + diff --git a/oal-syntax/target/classes/org/apache/skywalking/oal/tool/Main.class b/oal-syntax/target/classes/org/apache/skywalking/oal/tool/Main.class new file mode 100644 index 0000000..5a3be3b Binary files /dev/null and b/oal-syntax/target/classes/org/apache/skywalking/oal/tool/Main.class differ diff --git a/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALLexer.class b/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALLexer.class new file mode 100644 index 0000000..f9557cc Binary files /dev/null and b/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALLexer.class differ diff --git a/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParser$MetricStatementContext.class b/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParser$MetricStatementContext.class new file mode 100644 index 0000000..16ec3bc Binary files /dev/null and b/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParser$MetricStatementContext.class differ diff --git a/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParser$MetricStatementsContext.class b/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParser$MetricStatementsContext.class new file mode 100644 index 0000000..9f50c4b Binary files /dev/null and b/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParser$MetricStatementsContext.class differ diff --git a/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParser$RootContext.class b/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParser$RootContext.class new file mode 100644 index 0000000..846b9bf Binary files /dev/null and b/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParser$RootContext.class differ diff --git a/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParser$SourceContext.class b/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParser$SourceContext.class new file mode 100644 index 0000000..6dc4fd1 Binary files /dev/null and b/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParser$SourceContext.class differ diff --git a/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParser.class b/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParser.class new file mode 100644 index 0000000..ce89ba0 Binary files /dev/null and b/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParser.class differ diff --git a/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParserBaseListener.class b/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParserBaseListener.class new file mode 100644 index 0000000..b79a112 Binary files /dev/null and b/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParserBaseListener.class differ diff --git a/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParserListener.class b/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParserListener.class new file mode 100644 index 0000000..5f93eea Binary files /dev/null and b/oal-syntax/target/classes/org/apache/skywalking/oal/tool/grammar/OALParserListener.class differ diff --git a/oal-syntax/target/generated-sources/antlr4/Expr.tokens b/oal-syntax/target/generated-sources/antlr4/Expr.tokens deleted file mode 100644 index ea8dd4d..0000000 --- a/oal-syntax/target/generated-sources/antlr4/Expr.tokens +++ /dev/null @@ -1,14 +0,0 @@ -T__5=1 -NEWLINE=7 -T__4=2 -T__3=3 -T__2=4 -T__1=5 -T__0=6 -INT=8 -'-'=6 -'+'=5 -'*'=4 -')'=3 -'('=2 -'/'=1 diff --git a/oal-syntax/target/generated-sources/antlr4/ExprBaseListener.java b/oal-syntax/target/generated-sources/antlr4/ExprBaseListener.java deleted file mode 100644 index 5087b09..0000000 --- a/oal-syntax/target/generated-sources/antlr4/ExprBaseListener.java +++ /dev/null @@ -1,64 +0,0 @@ -// Generated from Expr.g4 by ANTLR 4.3 - -import org.antlr.v4.runtime.ParserRuleContext; -import org.antlr.v4.runtime.misc.NotNull; -import org.antlr.v4.runtime.tree.ErrorNode; -import org.antlr.v4.runtime.tree.TerminalNode; - -/** - * This class provides an empty implementation of {@link ExprListener}, - * which can be extended to create a listener which only needs to handle a subset - * of the available methods. - */ -public class ExprBaseListener implements ExprListener { - /** - * {@inheritDoc} - * - * <p>The default implementation does nothing.</p> - */ - @Override public void enterExpr(@NotNull ExprParser.ExprContext ctx) { } - /** - * {@inheritDoc} - * - * <p>The default implementation does nothing.</p> - */ - @Override public void exitExpr(@NotNull ExprParser.ExprContext ctx) { } - - /** - * {@inheritDoc} - * - * <p>The default implementation does nothing.</p> - */ - @Override public void enterProg(@NotNull ExprParser.ProgContext ctx) { } - /** - * {@inheritDoc} - * - * <p>The default implementation does nothing.</p> - */ - @Override public void exitProg(@NotNull ExprParser.ProgContext ctx) { } - - /** - * {@inheritDoc} - * - * <p>The default implementation does nothing.</p> - */ - @Override public void enterEveryRule(@NotNull ParserRuleContext ctx) { } - /** - * {@inheritDoc} - * - * <p>The default implementation does nothing.</p> - */ - @Override public void exitEveryRule(@NotNull ParserRuleContext ctx) { } - /** - * {@inheritDoc} - * - * <p>The default implementation does nothing.</p> - */ - @Override public void visitTerminal(@NotNull TerminalNode node) { } - /** - * {@inheritDoc} - * - * <p>The default implementation does nothing.</p> - */ - @Override public void visitErrorNode(@NotNull ErrorNode node) { } -} \ No newline at end of file diff --git a/oal-syntax/target/generated-sources/antlr4/ExprLexer.java b/oal-syntax/target/generated-sources/antlr4/ExprLexer.java deleted file mode 100644 index e44c300..0000000 --- a/oal-syntax/target/generated-sources/antlr4/ExprLexer.java +++ /dev/null @@ -1,77 +0,0 @@ -// Generated from Expr.g4 by ANTLR 4.3 -import org.antlr.v4.runtime.Lexer; -import org.antlr.v4.runtime.CharStream; -import org.antlr.v4.runtime.Token; -import org.antlr.v4.runtime.TokenStream; -import org.antlr.v4.runtime.*; -import org.antlr.v4.runtime.atn.*; -import org.antlr.v4.runtime.dfa.DFA; -import org.antlr.v4.runtime.misc.*; - -@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) -public class ExprLexer extends Lexer { - static { RuntimeMetaData.checkVersion("4.3", RuntimeMetaData.VERSION); } - - protected static final DFA[] _decisionToDFA; - protected static final PredictionContextCache _sharedContextCache = - new PredictionContextCache(); - public static final int - T__5=1, T__4=2, T__3=3, T__2=4, T__1=5, T__0=6, NEWLINE=7, INT=8; - public static String[] modeNames = { - "DEFAULT_MODE" - }; - - public static final String[] tokenNames = { - "'\\u0000'", "'\\u0001'", "'\\u0002'", "'\\u0003'", "'\\u0004'", "'\\u0005'", - "'\\u0006'", "'\\u0007'", "'\b'" - }; - public static final String[] ruleNames = { - "T__5", "T__4", "T__3", "T__2", "T__1", "T__0", "NEWLINE", "INT" - }; - - - public ExprLexer(CharStream input) { - super(input); - _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); - } - - @Override - public String getGrammarFileName() { return "Expr.g4"; } - - @Override - public String[] getTokenNames() { return tokenNames; } - - @Override - public String[] getRuleNames() { return ruleNames; } - - @Override - public String getSerializedATN() { return _serializedATN; } - - @Override - public String[] getModeNames() { return modeNames; } - - @Override - public ATN getATN() { return _ATN; } - - public static final String _serializedATN = - "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2\n)\b\1\4\2\t\2\4"+ - "\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\3\2\3\2\3\3\3\3"+ - "\3\4\3\4\3\5\3\5\3\6\3\6\3\7\3\7\3\b\6\b!\n\b\r\b\16\b\"\3\t\6\t&\n\t"+ - "\r\t\16\t\'\2\2\n\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\3\2\4\4\2\f\f\17"+ - "\17\3\2\62;*\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2"+ - "\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\3\23\3\2\2\2\5\25\3\2\2\2\7"+ - "\27\3\2\2\2\t\31\3\2\2\2\13\33\3\2\2\2\r\35\3\2\2\2\17 \3\2\2\2\21%\3"+ - "\2\2\2\23\24\7\61\2\2\24\4\3\2\2\2\25\26\7*\2\2\26\6\3\2\2\2\27\30\7+"+ - "\2\2\30\b\3\2\2\2\31\32\7,\2\2\32\n\3\2\2\2\33\34\7-\2\2\34\f\3\2\2\2"+ - "\35\36\7/\2\2\36\16\3\2\2\2\37!\t\2\2\2 \37\3\2\2\2!\"\3\2\2\2\" \3\2"+ - "\2\2\"#\3\2\2\2#\20\3\2\2\2$&\t\3\2\2%$\3\2\2\2&\'\3\2\2\2\'%\3\2\2\2"+ - "\'(\3\2\2\2(\22\3\2\2\2\5\2\"\'\2"; - public static final ATN _ATN = - new ATNDeserializer().deserialize(_serializedATN.toCharArray()); - static { - _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; - for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { - _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); - } - } -} \ No newline at end of file diff --git a/oal-syntax/target/generated-sources/antlr4/ExprLexer.tokens b/oal-syntax/target/generated-sources/antlr4/ExprLexer.tokens deleted file mode 100644 index ea8dd4d..0000000 --- a/oal-syntax/target/generated-sources/antlr4/ExprLexer.tokens +++ /dev/null @@ -1,14 +0,0 @@ -T__5=1 -NEWLINE=7 -T__4=2 -T__3=3 -T__2=4 -T__1=5 -T__0=6 -INT=8 -'-'=6 -'+'=5 -'*'=4 -')'=3 -'('=2 -'/'=1 diff --git a/oal-syntax/target/generated-sources/antlr4/ExprListener.java b/oal-syntax/target/generated-sources/antlr4/ExprListener.java deleted file mode 100644 index 30832ca..0000000 --- a/oal-syntax/target/generated-sources/antlr4/ExprListener.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated from Expr.g4 by ANTLR 4.3 -import org.antlr.v4.runtime.misc.NotNull; -import org.antlr.v4.runtime.tree.ParseTreeListener; - -/** - * This interface defines a complete listener for a parse tree produced by - * {@link ExprParser}. - */ -public interface ExprListener extends ParseTreeListener { - /** - * Enter a parse tree produced by {@link ExprParser#expr}. - * @param ctx the parse tree - */ - void enterExpr(@NotNull ExprParser.ExprContext ctx); - /** - * Exit a parse tree produced by {@link ExprParser#expr}. - * @param ctx the parse tree - */ - void exitExpr(@NotNull ExprParser.ExprContext ctx); - - /** - * Enter a parse tree produced by {@link ExprParser#prog}. - * @param ctx the parse tree - */ - void enterProg(@NotNull ExprParser.ProgContext ctx); - /** - * Exit a parse tree produced by {@link ExprParser#prog}. - * @param ctx the parse tree - */ - void exitProg(@NotNull ExprParser.ProgContext ctx); -} \ No newline at end of file diff --git a/oal-syntax/target/generated-sources/antlr4/ExprParser.java b/oal-syntax/target/generated-sources/antlr4/ExprParser.java deleted file mode 100644 index 0c4d5cb..0000000 --- a/oal-syntax/target/generated-sources/antlr4/ExprParser.java +++ /dev/null @@ -1,258 +0,0 @@ -// Generated from Expr.g4 by ANTLR 4.3 -import org.antlr.v4.runtime.atn.*; -import org.antlr.v4.runtime.dfa.DFA; -import org.antlr.v4.runtime.*; -import org.antlr.v4.runtime.misc.*; -import org.antlr.v4.runtime.tree.*; -import java.util.List; -import java.util.Iterator; -import java.util.ArrayList; - -@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) -public class ExprParser extends Parser { - static { RuntimeMetaData.checkVersion("4.3", RuntimeMetaData.VERSION); } - - protected static final DFA[] _decisionToDFA; - protected static final PredictionContextCache _sharedContextCache = - new PredictionContextCache(); - public static final int - T__5=1, T__4=2, T__3=3, T__2=4, T__1=5, T__0=6, NEWLINE=7, INT=8; - public static final String[] tokenNames = { - "<INVALID>", "'/'", "'('", "')'", "'*'", "'+'", "'-'", "NEWLINE", "INT" - }; - public static final int - RULE_prog = 0, RULE_expr = 1; - public static final String[] ruleNames = { - "prog", "expr" - }; - - @Override - public String getGrammarFileName() { return "Expr.g4"; } - - @Override - public String[] getTokenNames() { return tokenNames; } - - @Override - public String[] getRuleNames() { return ruleNames; } - - @Override - public String getSerializedATN() { return _serializedATN; } - - @Override - public ATN getATN() { return _ATN; } - - public ExprParser(TokenStream input) { - super(input); - _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); - } - public static class ProgContext extends ParserRuleContext { - public List<ExprContext> expr() { - return getRuleContexts(ExprContext.class); - } - public ExprContext expr(int i) { - return getRuleContext(ExprContext.class,i); - } - public List<TerminalNode> NEWLINE() { return getTokens(ExprParser.NEWLINE); } - public TerminalNode NEWLINE(int i) { - return getToken(ExprParser.NEWLINE, i); - } - public ProgContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_prog; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof ExprListener ) ((ExprListener)listener).enterProg(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof ExprListener ) ((ExprListener)listener).exitProg(this); - } - } - - public final ProgContext prog() throws RecognitionException { - ProgContext _localctx = new ProgContext(_ctx, getState()); - enterRule(_localctx, 0, RULE_prog); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(9); - _errHandler.sync(this); - _la = _input.LA(1); - while (_la==T__4 || _la==INT) { - { - { - setState(4); expr(0); - setState(5); match(NEWLINE); - } - } - setState(11); - _errHandler.sync(this); - _la = _input.LA(1); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ExprContext extends ParserRuleContext { - public List<ExprContext> expr() { - return getRuleContexts(ExprContext.class); - } - public ExprContext expr(int i) { - return getRuleContext(ExprContext.class,i); - } - public TerminalNode INT() { return getToken(ExprParser.INT, 0); } - public ExprContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_expr; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof ExprListener ) ((ExprListener)listener).enterExpr(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof ExprListener ) ((ExprListener)listener).exitExpr(this); - } - } - - public final ExprContext expr() throws RecognitionException { - return expr(0); - } - - private ExprContext expr(int _p) throws RecognitionException { - ParserRuleContext _parentctx = _ctx; - int _parentState = getState(); - ExprContext _localctx = new ExprContext(_ctx, _parentState); - ExprContext _prevctx = _localctx; - int _startState = 2; - enterRecursionRule(_localctx, 2, RULE_expr, _p); - int _la; - try { - int _alt; - enterOuterAlt(_localctx, 1); - { - setState(18); - switch (_input.LA(1)) { - case INT: - { - setState(13); match(INT); - } - break; - case T__4: - { - setState(14); match(T__4); - setState(15); expr(0); - setState(16); match(T__3); - } - break; - default: - throw new NoViableAltException(this); - } - _ctx.stop = _input.LT(-1); - setState(28); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,3,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - if ( _parseListeners!=null ) triggerExitRuleEvent(); - _prevctx = _localctx; - { - setState(26); - switch ( getInterpreter().adaptivePredict(_input,2,_ctx) ) { - case 1: - { - _localctx = new ExprContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(20); - if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)"); - setState(21); - _la = _input.LA(1); - if ( !(_la==T__5 || _la==T__2) ) { - _errHandler.recoverInline(this); - } - consume(); - setState(22); expr(5); - } - break; - - case 2: - { - _localctx = new ExprContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(23); - if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); - setState(24); - _la = _input.LA(1); - if ( !(_la==T__1 || _la==T__0) ) { - _errHandler.recoverInline(this); - } - consume(); - setState(25); expr(4); - } - break; - } - } - } - setState(30); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,3,_ctx); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - unrollRecursionContexts(_parentctx); - } - return _localctx; - } - - public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { - switch (ruleIndex) { - case 1: return expr_sempred((ExprContext)_localctx, predIndex); - } - return true; - } - private boolean expr_sempred(ExprContext _localctx, int predIndex) { - switch (predIndex) { - case 0: return precpred(_ctx, 4); - - case 1: return precpred(_ctx, 3); - } - return true; - } - - public static final String _serializedATN = - "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\n\"\4\2\t\2\4\3\t"+ - "\3\3\2\3\2\3\2\7\2\n\n\2\f\2\16\2\r\13\2\3\3\3\3\3\3\3\3\3\3\3\3\5\3\25"+ - "\n\3\3\3\3\3\3\3\3\3\3\3\3\3\7\3\35\n\3\f\3\16\3 \13\3\3\3\2\3\4\4\2\4"+ - "\2\4\4\2\3\3\6\6\3\2\7\b#\2\13\3\2\2\2\4\24\3\2\2\2\6\7\5\4\3\2\7\b\7"+ - "\t\2\2\b\n\3\2\2\2\t\6\3\2\2\2\n\r\3\2\2\2\13\t\3\2\2\2\13\f\3\2\2\2\f"+ - "\3\3\2\2\2\r\13\3\2\2\2\16\17\b\3\1\2\17\25\7\n\2\2\20\21\7\4\2\2\21\22"+ - "\5\4\3\2\22\23\7\5\2\2\23\25\3\2\2\2\24\16\3\2\2\2\24\20\3\2\2\2\25\36"+ - "\3\2\2\2\26\27\f\6\2\2\27\30\t\2\2\2\30\35\5\4\3\7\31\32\f\5\2\2\32\33"+ - "\t\3\2\2\33\35\5\4\3\6\34\26\3\2\2\2\34\31\3\2\2\2\35 \3\2\2\2\36\34\3"+ - "\2\2\2\36\37\3\2\2\2\37\5\3\2\2\2 \36\3\2\2\2\6\13\24\34\36"; - public static final ATN _ATN = - new ATNDeserializer().deserialize(_serializedATN.toCharArray()); - static { - _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; - for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { - _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); - } - } -} \ No newline at end of file diff --git a/oal-syntax/target/generated-sources/antlr4/OALLexer.tokens b/oal-syntax/target/generated-sources/antlr4/OALLexer.tokens new file mode 100644 index 0000000..19d4b02 --- /dev/null +++ b/oal-syntax/target/generated-sources/antlr4/OALLexer.tokens @@ -0,0 +1,39 @@ +COMMA=23 +FILTER=2 +SRC_ALL=3 +DOT=20 +SEMI=24 +SRC_SERVICE_INSTANCE=5 +SRC_SERVICE_INSTANCE_JVM_MEMORY=11 +LineComment=18 +LR_BRACKET=21 +FROM=1 +SRC_SERVICE_INSTANCE_JVM_CPU=10 +DelimitedComment=17 +SRC_SERVICE=4 +SRC_SERVICE_RELATION=7 +BOOL_LITERAL=14 +SRC_ENDPOINT_RELATION=9 +SRC_SERVICE_INSTANCE_JVM_MEMORY_POOL=12 +SRC_ENDPOINT=6 +RR_BRACKET=22 +SRC_SERVICE_INSTANCE_RELATION=8 +STRING_LITERAL=16 +CHAR_LITERAL=15 +IDENTIFIER=19 +DECIMAL_LITERAL=13 +'.'=20 +','=23 +'Service'=4 +')'=22 +'('=21 +'ServiceInstanceRelation'=8 +'ServiceInstance_JVM_Memory_Pool'=12 +'from'=1 +'All'=3 +'EndpointRelation'=9 +';'=24 +'Endpoint'=6 +'filter'=2 +'ServiceRelation'=7 +'ServiceInstance'=5 diff --git a/oal-syntax/target/generated-sources/antlr4/OALParser.tokens b/oal-syntax/target/generated-sources/antlr4/OALParser.tokens new file mode 100644 index 0000000..19d4b02 --- /dev/null +++ b/oal-syntax/target/generated-sources/antlr4/OALParser.tokens @@ -0,0 +1,39 @@ +COMMA=23 +FILTER=2 +SRC_ALL=3 +DOT=20 +SEMI=24 +SRC_SERVICE_INSTANCE=5 +SRC_SERVICE_INSTANCE_JVM_MEMORY=11 +LineComment=18 +LR_BRACKET=21 +FROM=1 +SRC_SERVICE_INSTANCE_JVM_CPU=10 +DelimitedComment=17 +SRC_SERVICE=4 +SRC_SERVICE_RELATION=7 +BOOL_LITERAL=14 +SRC_ENDPOINT_RELATION=9 +SRC_SERVICE_INSTANCE_JVM_MEMORY_POOL=12 +SRC_ENDPOINT=6 +RR_BRACKET=22 +SRC_SERVICE_INSTANCE_RELATION=8 +STRING_LITERAL=16 +CHAR_LITERAL=15 +IDENTIFIER=19 +DECIMAL_LITERAL=13 +'.'=20 +','=23 +'Service'=4 +')'=22 +'('=21 +'ServiceInstanceRelation'=8 +'ServiceInstance_JVM_Memory_Pool'=12 +'from'=1 +'All'=3 +'EndpointRelation'=9 +';'=24 +'Endpoint'=6 +'filter'=2 +'ServiceRelation'=7 +'ServiceInstance'=5 diff --git a/oal-syntax/target/generated-sources/antlr4/org/apache/skywalking/oal/tool/grammar/OALLexer.java b/oal-syntax/target/generated-sources/antlr4/org/apache/skywalking/oal/tool/grammar/OALLexer.java new file mode 100644 index 0000000..08cab30 --- /dev/null +++ b/oal-syntax/target/generated-sources/antlr4/org/apache/skywalking/oal/tool/grammar/OALLexer.java @@ -0,0 +1,215 @@ +// Generated from org/apache/skywalking/oal/tool/grammar/OALLexer.g4 by ANTLR 4.3 +package org.apache.skywalking.oal.tool.grammar; +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.misc.*; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class OALLexer extends Lexer { + static { RuntimeMetaData.checkVersion("4.3", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + FROM=1, FILTER=2, SRC_ALL=3, SRC_SERVICE=4, SRC_SERVICE_INSTANCE=5, SRC_ENDPOINT=6, + SRC_SERVICE_RELATION=7, SRC_SERVICE_INSTANCE_RELATION=8, SRC_ENDPOINT_RELATION=9, + SRC_SERVICE_INSTANCE_JVM_CPU=10, SRC_SERVICE_INSTANCE_JVM_MEMORY=11, SRC_SERVICE_INSTANCE_JVM_MEMORY_POOL=12, + DECIMAL_LITERAL=13, BOOL_LITERAL=14, CHAR_LITERAL=15, STRING_LITERAL=16, + DelimitedComment=17, LineComment=18, IDENTIFIER=19, DOT=20, LR_BRACKET=21, + RR_BRACKET=22, COMMA=23, SEMI=24; + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + public static final String[] tokenNames = { + "'\\u0000'", "'\\u0001'", "'\\u0002'", "'\\u0003'", "'\\u0004'", "'\\u0005'", + "'\\u0006'", "'\\u0007'", "'\b'", "'\t'", "'\n'", "'\\u000B'", "'\f'", + "'\r'", "'\\u000E'", "'\\u000F'", "'\\u0010'", "'\\u0011'", "'\\u0012'", + "'\\u0013'", "'\\u0014'", "'\\u0015'", "'\\u0016'", "'\\u0017'", "'\\u0018'" + }; + public static final String[] ruleNames = { + "FROM", "FILTER", "SRC_ALL", "SRC_SERVICE", "SRC_SERVICE_INSTANCE", "SRC_ENDPOINT", + "SRC_SERVICE_RELATION", "SRC_SERVICE_INSTANCE_RELATION", "SRC_ENDPOINT_RELATION", + "SRC_SERVICE_INSTANCE_JVM_CPU", "SRC_SERVICE_INSTANCE_JVM_MEMORY", "SRC_SERVICE_INSTANCE_JVM_MEMORY_POOL", + "DECIMAL_LITERAL", "BOOL_LITERAL", "CHAR_LITERAL", "STRING_LITERAL", "DelimitedComment", + "LineComment", "IDENTIFIER", "EscapeSequence", "HexDigits", "HexDigit", + "Digits", "LetterOrDigit", "Letter", "DOT", "LR_BRACKET", "RR_BRACKET", + "COMMA", "SEMI" + }; + + + public OALLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "OALLexer.g4"; } + + @Override + public String[] getTokenNames() { return tokenNames; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2\32\u018a\b\1\4\2"+ + "\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4"+ + "\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22"+ + "\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31"+ + "\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\3\2"+ + "\3\2\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\5\3\5\3"+ + "\5\3\5\3\5\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6"+ + "\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3"+ + "\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\t\3\t"+ + "\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3"+ + "\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n"+ + "\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13"+ + "\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\f"+ + "\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3"+ + "\f\3\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r"+ + "\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\16"+ + "\3\16\3\16\5\16\u00fd\n\16\3\16\6\16\u0100\n\16\r\16\16\16\u0101\3\16"+ + "\5\16\u0105\n\16\5\16\u0107\n\16\3\16\5\16\u010a\n\16\3\17\3\17\3\17\3"+ + "\17\3\17\3\17\3\17\3\17\3\17\5\17\u0115\n\17\3\20\3\20\3\20\5\20\u011a"+ + "\n\20\3\20\3\20\3\21\3\21\3\21\7\21\u0121\n\21\f\21\16\21\u0124\13\21"+ + "\3\21\3\21\3\22\3\22\3\22\3\22\3\22\7\22\u012d\n\22\f\22\16\22\u0130\13"+ + "\22\3\22\3\22\3\22\3\22\3\22\3\23\3\23\3\23\3\23\7\23\u013b\n\23\f\23"+ + "\16\23\u013e\13\23\3\23\3\23\3\24\3\24\7\24\u0144\n\24\f\24\16\24\u0147"+ + "\13\24\3\25\3\25\3\25\3\25\5\25\u014d\n\25\3\25\5\25\u0150\n\25\3\25\3"+ + "\25\3\25\6\25\u0155\n\25\r\25\16\25\u0156\3\25\3\25\3\25\3\25\3\25\5\25"+ + "\u015e\n\25\3\26\3\26\3\26\7\26\u0163\n\26\f\26\16\26\u0166\13\26\3\26"+ + "\5\26\u0169\n\26\3\27\3\27\3\30\3\30\7\30\u016f\n\30\f\30\16\30\u0172"+ + "\13\30\3\30\5\30\u0175\n\30\3\31\3\31\5\31\u0179\n\31\3\32\3\32\3\32\3"+ + "\32\5\32\u017f\n\32\3\33\3\33\3\34\3\34\3\35\3\35\3\36\3\36\3\37\3\37"+ + "\3\u012e\2 \3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33"+ + "\17\35\20\37\21!\22#\23%\24\'\25)\2+\2-\2/\2\61\2\63\2\65\26\67\279\30"+ + ";\31=\32\3\2\21\3\2\63;\4\2NNnn\6\2\f\f\17\17))^^\6\2\f\f\17\17$$^^\4"+ + "\2\f\f\17\17\n\2$$))^^ddhhppttvv\3\2\62\65\3\2\629\5\2\62;CHch\3\2\62"+ + ";\4\2\62;aa\6\2&&C\\aac|\4\2\2\u0081\ud802\udc01\3\2\ud802\udc01\3\2\udc02"+ + "\ue001\u019d\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2"+ + "\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2"+ + "\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2"+ + "\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3"+ + "\2\2\2\2;\3\2\2\2\2=\3\2\2\2\3?\3\2\2\2\5D\3\2\2\2\7K\3\2\2\2\tO\3\2\2"+ + "\2\13W\3\2\2\2\rg\3\2\2\2\17p\3\2\2\2\21\u0080\3\2\2\2\23\u0098\3\2\2"+ + "\2\25\u00a9\3\2\2\2\27\u00c1\3\2\2\2\31\u00d9\3\2\2\2\33\u0106\3\2\2\2"+ + "\35\u0114\3\2\2\2\37\u0116\3\2\2\2!\u011d\3\2\2\2#\u0127\3\2\2\2%\u0136"+ + "\3\2\2\2\'\u0141\3\2\2\2)\u015d\3\2\2\2+\u015f\3\2\2\2-\u016a\3\2\2\2"+ + "/\u016c\3\2\2\2\61\u0178\3\2\2\2\63\u017e\3\2\2\2\65\u0180\3\2\2\2\67"+ + "\u0182\3\2\2\29\u0184\3\2\2\2;\u0186\3\2\2\2=\u0188\3\2\2\2?@\7h\2\2@"+ + "A\7t\2\2AB\7q\2\2BC\7o\2\2C\4\3\2\2\2DE\7h\2\2EF\7k\2\2FG\7n\2\2GH\7v"+ + "\2\2HI\7g\2\2IJ\7t\2\2J\6\3\2\2\2KL\7C\2\2LM\7n\2\2MN\7n\2\2N\b\3\2\2"+ + "\2OP\7U\2\2PQ\7g\2\2QR\7t\2\2RS\7x\2\2ST\7k\2\2TU\7e\2\2UV\7g\2\2V\n\3"+ + "\2\2\2WX\7U\2\2XY\7g\2\2YZ\7t\2\2Z[\7x\2\2[\\\7k\2\2\\]\7e\2\2]^\7g\2"+ + "\2^_\7K\2\2_`\7p\2\2`a\7u\2\2ab\7v\2\2bc\7c\2\2cd\7p\2\2de\7e\2\2ef\7"+ + "g\2\2f\f\3\2\2\2gh\7G\2\2hi\7p\2\2ij\7f\2\2jk\7r\2\2kl\7q\2\2lm\7k\2\2"+ + "mn\7p\2\2no\7v\2\2o\16\3\2\2\2pq\7U\2\2qr\7g\2\2rs\7t\2\2st\7x\2\2tu\7"+ + "k\2\2uv\7e\2\2vw\7g\2\2wx\7T\2\2xy\7g\2\2yz\7n\2\2z{\7c\2\2{|\7v\2\2|"+ + "}\7k\2\2}~\7q\2\2~\177\7p\2\2\177\20\3\2\2\2\u0080\u0081\7U\2\2\u0081"+ + "\u0082\7g\2\2\u0082\u0083\7t\2\2\u0083\u0084\7x\2\2\u0084\u0085\7k\2\2"+ + "\u0085\u0086\7e\2\2\u0086\u0087\7g\2\2\u0087\u0088\7K\2\2\u0088\u0089"+ + "\7p\2\2\u0089\u008a\7u\2\2\u008a\u008b\7v\2\2\u008b\u008c\7c\2\2\u008c"+ + "\u008d\7p\2\2\u008d\u008e\7e\2\2\u008e\u008f\7g\2\2\u008f\u0090\7T\2\2"+ + "\u0090\u0091\7g\2\2\u0091\u0092\7n\2\2\u0092\u0093\7c\2\2\u0093\u0094"+ + "\7v\2\2\u0094\u0095\7k\2\2\u0095\u0096\7q\2\2\u0096\u0097\7p\2\2\u0097"+ + "\22\3\2\2\2\u0098\u0099\7G\2\2\u0099\u009a\7p\2\2\u009a\u009b\7f\2\2\u009b"+ + "\u009c\7r\2\2\u009c\u009d\7q\2\2\u009d\u009e\7k\2\2\u009e\u009f\7p\2\2"+ + "\u009f\u00a0\7v\2\2\u00a0\u00a1\7T\2\2\u00a1\u00a2\7g\2\2\u00a2\u00a3"+ + "\7n\2\2\u00a3\u00a4\7c\2\2\u00a4\u00a5\7v\2\2\u00a5\u00a6\7k\2\2\u00a6"+ + "\u00a7\7q\2\2\u00a7\u00a8\7p\2\2\u00a8\24\3\2\2\2\u00a9\u00aa\7U\2\2\u00aa"+ + "\u00ab\7g\2\2\u00ab\u00ac\7t\2\2\u00ac\u00ad\7x\2\2\u00ad\u00ae\7k\2\2"+ + "\u00ae\u00af\7e\2\2\u00af\u00b0\7g\2\2\u00b0\u00b1\7K\2\2\u00b1\u00b2"+ + "\7p\2\2\u00b2\u00b3\7u\2\2\u00b3\u00b4\7v\2\2\u00b4\u00b5\7c\2\2\u00b5"+ + "\u00b6\7p\2\2\u00b6\u00b7\7e\2\2\u00b7\u00b8\7g\2\2\u00b8\u00b9\7a\2\2"+ + "\u00b9\u00ba\7L\2\2\u00ba\u00bb\7X\2\2\u00bb\u00bc\7O\2\2\u00bc\u00bd"+ + "\7a\2\2\u00bd\u00be\7E\2\2\u00be\u00bf\7R\2\2\u00bf\u00c0\7W\2\2\u00c0"+ + "\26\3\2\2\2\u00c1\u00c2\7U\2\2\u00c2\u00c3\7g\2\2\u00c3\u00c4\7t\2\2\u00c4"+ + "\u00c5\7x\2\2\u00c5\u00c6\7k\2\2\u00c6\u00c7\7e\2\2\u00c7\u00c8\7g\2\2"+ + "\u00c8\u00c9\7K\2\2\u00c9\u00ca\7p\2\2\u00ca\u00cb\7u\2\2\u00cb\u00cc"+ + "\7v\2\2\u00cc\u00cd\7c\2\2\u00cd\u00ce\7p\2\2\u00ce\u00cf\7e\2\2\u00cf"+ + "\u00d0\7g\2\2\u00d0\u00d1\7a\2\2\u00d1\u00d2\7L\2\2\u00d2\u00d3\7X\2\2"+ + "\u00d3\u00d4\7O\2\2\u00d4\u00d5\7a\2\2\u00d5\u00d6\7E\2\2\u00d6\u00d7"+ + "\7R\2\2\u00d7\u00d8\7W\2\2\u00d8\30\3\2\2\2\u00d9\u00da\7U\2\2\u00da\u00db"+ + "\7g\2\2\u00db\u00dc\7t\2\2\u00dc\u00dd\7x\2\2\u00dd\u00de\7k\2\2\u00de"+ + "\u00df\7e\2\2\u00df\u00e0\7g\2\2\u00e0\u00e1\7K\2\2\u00e1\u00e2\7p\2\2"+ + "\u00e2\u00e3\7u\2\2\u00e3\u00e4\7v\2\2\u00e4\u00e5\7c\2\2\u00e5\u00e6"+ + "\7p\2\2\u00e6\u00e7\7e\2\2\u00e7\u00e8\7g\2\2\u00e8\u00e9\7a\2\2\u00e9"+ + "\u00ea\7L\2\2\u00ea\u00eb\7X\2\2\u00eb\u00ec\7O\2\2\u00ec\u00ed\7a\2\2"+ + "\u00ed\u00ee\7O\2\2\u00ee\u00ef\7g\2\2\u00ef\u00f0\7o\2\2\u00f0\u00f1"+ + "\7q\2\2\u00f1\u00f2\7t\2\2\u00f2\u00f3\7{\2\2\u00f3\u00f4\7a\2\2\u00f4"+ + "\u00f5\7R\2\2\u00f5\u00f6\7q\2\2\u00f6\u00f7\7q\2\2\u00f7\u00f8\7n\2\2"+ + "\u00f8\32\3\2\2\2\u00f9\u0107\7\62\2\2\u00fa\u0104\t\2\2\2\u00fb\u00fd"+ + "\5/\30\2\u00fc\u00fb\3\2\2\2\u00fc\u00fd\3\2\2\2\u00fd\u0105\3\2\2\2\u00fe"+ + "\u0100\7a\2\2\u00ff\u00fe\3\2\2\2\u0100\u0101\3\2\2\2\u0101\u00ff\3\2"+ + "\2\2\u0101\u0102\3\2\2\2\u0102\u0103\3\2\2\2\u0103\u0105\5/\30\2\u0104"+ + "\u00fc\3\2\2\2\u0104\u00ff\3\2\2\2\u0105\u0107\3\2\2\2\u0106\u00f9\3\2"+ + "\2\2\u0106\u00fa\3\2\2\2\u0107\u0109\3\2\2\2\u0108\u010a\t\3\2\2\u0109"+ + "\u0108\3\2\2\2\u0109\u010a\3\2\2\2\u010a\34\3\2\2\2\u010b\u010c\7v\2\2"+ + "\u010c\u010d\7t\2\2\u010d\u010e\7w\2\2\u010e\u0115\7g\2\2\u010f\u0110"+ + "\7h\2\2\u0110\u0111\7c\2\2\u0111\u0112\7n\2\2\u0112\u0113\7u\2\2\u0113"+ + "\u0115\7g\2\2\u0114\u010b\3\2\2\2\u0114\u010f\3\2\2\2\u0115\36\3\2\2\2"+ + "\u0116\u0119\7)\2\2\u0117\u011a\n\4\2\2\u0118\u011a\5)\25\2\u0119\u0117"+ + "\3\2\2\2\u0119\u0118\3\2\2\2\u011a\u011b\3\2\2\2\u011b\u011c\7)\2\2\u011c"+ + " \3\2\2\2\u011d\u0122\7$\2\2\u011e\u0121\n\5\2\2\u011f\u0121\5)\25\2\u0120"+ + "\u011e\3\2\2\2\u0120\u011f\3\2\2\2\u0121\u0124\3\2\2\2\u0122\u0120\3\2"+ + "\2\2\u0122\u0123\3\2\2\2\u0123\u0125\3\2\2\2\u0124\u0122\3\2\2\2\u0125"+ + "\u0126\7$\2\2\u0126\"\3\2\2\2\u0127\u0128\7\61\2\2\u0128\u0129\7,\2\2"+ + "\u0129\u012e\3\2\2\2\u012a\u012d\5#\22\2\u012b\u012d\13\2\2\2\u012c\u012a"+ + "\3\2\2\2\u012c\u012b\3\2\2\2\u012d\u0130\3\2\2\2\u012e\u012f\3\2\2\2\u012e"+ + "\u012c\3\2\2\2\u012f\u0131\3\2\2\2\u0130\u012e\3\2\2\2\u0131\u0132\7,"+ + "\2\2\u0132\u0133\7\61\2\2\u0133\u0134\3\2\2\2\u0134\u0135\b\22\2\2\u0135"+ + "$\3\2\2\2\u0136\u0137\7\61\2\2\u0137\u0138\7\61\2\2\u0138\u013c\3\2\2"+ + "\2\u0139\u013b\n\6\2\2\u013a\u0139\3\2\2\2\u013b\u013e\3\2\2\2\u013c\u013a"+ + "\3\2\2\2\u013c\u013d\3\2\2\2\u013d\u013f\3\2\2\2\u013e\u013c\3\2\2\2\u013f"+ + "\u0140\b\23\2\2\u0140&\3\2\2\2\u0141\u0145\5\63\32\2\u0142\u0144\5\61"+ + "\31\2\u0143\u0142\3\2\2\2\u0144\u0147\3\2\2\2\u0145\u0143\3\2\2\2\u0145"+ + "\u0146\3\2\2\2\u0146(\3\2\2\2\u0147\u0145\3\2\2\2\u0148\u0149\7^\2\2\u0149"+ + "\u015e\t\7\2\2\u014a\u014f\7^\2\2\u014b\u014d\t\b\2\2\u014c\u014b\3\2"+ + "\2\2\u014c\u014d\3\2\2\2\u014d\u014e\3\2\2\2\u014e\u0150\t\t\2\2\u014f"+ + "\u014c\3\2\2\2\u014f\u0150\3\2\2\2\u0150\u0151\3\2\2\2\u0151\u015e\t\t"+ + "\2\2\u0152\u0154\7^\2\2\u0153\u0155\7w\2\2\u0154\u0153\3\2\2\2\u0155\u0156"+ + "\3\2\2\2\u0156\u0154\3\2\2\2\u0156\u0157\3\2\2\2\u0157\u0158\3\2\2\2\u0158"+ + "\u0159\5-\27\2\u0159\u015a\5-\27\2\u015a\u015b\5-\27\2\u015b\u015c\5-"+ + "\27\2\u015c\u015e\3\2\2\2\u015d\u0148\3\2\2\2\u015d\u014a\3\2\2\2\u015d"+ + "\u0152\3\2\2\2\u015e*\3\2\2\2\u015f\u0168\5-\27\2\u0160\u0163\5-\27\2"+ + "\u0161\u0163\7a\2\2\u0162\u0160\3\2\2\2\u0162\u0161\3\2\2\2\u0163\u0166"+ + "\3\2\2\2\u0164\u0162\3\2\2\2\u0164\u0165\3\2\2\2\u0165\u0167\3\2\2\2\u0166"+ + "\u0164\3\2\2\2\u0167\u0169\5-\27\2\u0168\u0164\3\2\2\2\u0168\u0169\3\2"+ + "\2\2\u0169,\3\2\2\2\u016a\u016b\t\n\2\2\u016b.\3\2\2\2\u016c\u0174\t\13"+ + "\2\2\u016d\u016f\t\f\2\2\u016e\u016d\3\2\2\2\u016f\u0172\3\2\2\2\u0170"+ + "\u016e\3\2\2\2\u0170\u0171\3\2\2\2\u0171\u0173\3\2\2\2\u0172\u0170\3\2"+ + "\2\2\u0173\u0175\t\13\2\2\u0174\u0170\3\2\2\2\u0174\u0175\3\2\2\2\u0175"+ + "\60\3\2\2\2\u0176\u0179\5\63\32\2\u0177\u0179\t\13\2\2\u0178\u0176\3\2"+ + "\2\2\u0178\u0177\3\2\2\2\u0179\62\3\2\2\2\u017a\u017f\t\r\2\2\u017b\u017f"+ + "\n\16\2\2\u017c\u017d\t\17\2\2\u017d\u017f\t\20\2\2\u017e\u017a\3\2\2"+ + "\2\u017e\u017b\3\2\2\2\u017e\u017c\3\2\2\2\u017f\64\3\2\2\2\u0180\u0181"+ + "\7\60\2\2\u0181\66\3\2\2\2\u0182\u0183\7*\2\2\u01838\3\2\2\2\u0184\u0185"+ + "\7+\2\2\u0185:\3\2\2\2\u0186\u0187\7.\2\2\u0187<\3\2\2\2\u0188\u0189\7"+ + "=\2\2\u0189>\3\2\2\2\33\2\u00fc\u0101\u0104\u0106\u0109\u0114\u0119\u0120"+ + "\u0122\u012c\u012e\u013c\u0145\u014c\u014f\u0156\u015d\u0162\u0164\u0168"+ + "\u0170\u0174\u0178\u017e\3\2\3\2"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/oal-syntax/target/generated-sources/antlr4/org/apache/skywalking/oal/tool/grammar/OALParser.java b/oal-syntax/target/generated-sources/antlr4/org/apache/skywalking/oal/tool/grammar/OALParser.java new file mode 100644 index 0000000..e237ef9 --- /dev/null +++ b/oal-syntax/target/generated-sources/antlr4/org/apache/skywalking/oal/tool/grammar/OALParser.java @@ -0,0 +1,294 @@ +// Generated from org/apache/skywalking/oal/tool/grammar/OALParser.g4 by ANTLR 4.3 +package org.apache.skywalking.oal.tool.grammar; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.misc.*; +import org.antlr.v4.runtime.tree.*; +import java.util.List; +import java.util.Iterator; +import java.util.ArrayList; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class OALParser extends Parser { + static { RuntimeMetaData.checkVersion("4.3", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + COMMA=23, FILTER=2, SRC_ALL=3, DOT=20, SEMI=24, SRC_SERVICE_INSTANCE=5, + SRC_SERVICE_INSTANCE_JVM_MEMORY=11, LineComment=18, LR_BRACKET=21, FROM=1, + SRC_SERVICE_INSTANCE_JVM_CPU=10, DelimitedComment=17, SRC_SERVICE=4, SRC_SERVICE_RELATION=7, + BOOL_LITERAL=14, SRC_ENDPOINT_RELATION=9, SRC_SERVICE_INSTANCE_JVM_MEMORY_POOL=12, + SRC_ENDPOINT=6, RR_BRACKET=22, SRC_SERVICE_INSTANCE_RELATION=8, STRING_LITERAL=16, + CHAR_LITERAL=15, IDENTIFIER=19, DECIMAL_LITERAL=13; + public static final String[] tokenNames = { + "<INVALID>", "'from'", "'filter'", "'All'", "'Service'", "'ServiceInstance'", + "'Endpoint'", "'ServiceRelation'", "'ServiceInstanceRelation'", "'EndpointRelation'", + "SRC_SERVICE_INSTANCE_JVM_CPU", "SRC_SERVICE_INSTANCE_JVM_MEMORY", "'ServiceInstance_JVM_Memory_Pool'", + "DECIMAL_LITERAL", "BOOL_LITERAL", "CHAR_LITERAL", "STRING_LITERAL", "DelimitedComment", + "LineComment", "IDENTIFIER", "'.'", "'('", "')'", "','", "';'" + }; + public static final int + RULE_root = 0, RULE_metricStatements = 1, RULE_metricStatement = 2, RULE_source = 3; + public static final String[] ruleNames = { + "root", "metricStatements", "metricStatement", "source" + }; + + @Override + public String getGrammarFileName() { return "OALParser.g4"; } + + @Override + public String[] getTokenNames() { return tokenNames; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public OALParser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + public static class RootContext extends ParserRuleContext { + public TerminalNode EOF() { return getToken(OALParser.EOF, 0); } + public MetricStatementsContext metricStatements() { + return getRuleContext(MetricStatementsContext.class,0); + } + public TerminalNode DelimitedComment() { return getToken(OALParser.DelimitedComment, 0); } + public TerminalNode LineComment() { return getToken(OALParser.LineComment, 0); } + public RootContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_root; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof OALParserListener ) ((OALParserListener)listener).enterRoot(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof OALParserListener ) ((OALParserListener)listener).exitRoot(this); + } + } + + public final RootContext root() throws RecognitionException { + RootContext _localctx = new RootContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_root); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(9); + switch ( getInterpreter().adaptivePredict(_input,0,_ctx) ) { + case 1: + { + setState(8); metricStatements(); + } + break; + } + setState(12); + _la = _input.LA(1); + if (_la==DelimitedComment) { + { + setState(11); match(DelimitedComment); + } + } + + setState(15); + _la = _input.LA(1); + if (_la==LineComment) { + { + setState(14); match(LineComment); + } + } + + setState(17); match(EOF); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MetricStatementsContext extends ParserRuleContext { + public List<MetricStatementContext> metricStatement() { + return getRuleContexts(MetricStatementContext.class); + } + public MetricStatementContext metricStatement(int i) { + return getRuleContext(MetricStatementContext.class,i); + } + public MetricStatementsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_metricStatements; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof OALParserListener ) ((OALParserListener)listener).enterMetricStatements(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof OALParserListener ) ((OALParserListener)listener).exitMetricStatements(this); + } + } + + public final MetricStatementsContext metricStatements() throws RecognitionException { + MetricStatementsContext _localctx = new MetricStatementsContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_metricStatements); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(22); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FROM) { + { + { + setState(19); metricStatement(); + } + } + setState(24); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MetricStatementContext extends ParserRuleContext { + public SourceContext source() { + return getRuleContext(SourceContext.class,0); + } + public TerminalNode FROM() { return getToken(OALParser.FROM, 0); } + public TerminalNode IDENTIFIER() { return getToken(OALParser.IDENTIFIER, 0); } + public MetricStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_metricStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof OALParserListener ) ((OALParserListener)listener).enterMetricStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof OALParserListener ) ((OALParserListener)listener).exitMetricStatement(this); + } + } + + public final MetricStatementContext metricStatement() throws RecognitionException { + MetricStatementContext _localctx = new MetricStatementContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_metricStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(25); match(FROM); + setState(26); match(LR_BRACKET); + setState(27); source(); + setState(28); match(DOT); + setState(29); match(IDENTIFIER); + setState(30); match(RR_BRACKET); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SourceContext extends ParserRuleContext { + public TerminalNode SRC_ENDPOINT() { return getToken(OALParser.SRC_ENDPOINT, 0); } + public TerminalNode SRC_SERVICE_INSTANCE_JVM_MEMORY_POOL() { return getToken(OALParser.SRC_SERVICE_INSTANCE_JVM_MEMORY_POOL, 0); } + public TerminalNode SRC_SERVICE_INSTANCE_JVM_CPU() { return getToken(OALParser.SRC_SERVICE_INSTANCE_JVM_CPU, 0); } + public TerminalNode SRC_SERVICE_RELATION() { return getToken(OALParser.SRC_SERVICE_RELATION, 0); } + public TerminalNode SRC_SERVICE_INSTANCE_RELATION() { return getToken(OALParser.SRC_SERVICE_INSTANCE_RELATION, 0); } + public TerminalNode SRC_ENDPOINT_RELATION() { return getToken(OALParser.SRC_ENDPOINT_RELATION, 0); } + public TerminalNode SRC_SERVICE_INSTANCE_JVM_MEMORY() { return getToken(OALParser.SRC_SERVICE_INSTANCE_JVM_MEMORY, 0); } + public TerminalNode SRC_SERVICE_INSTANCE() { return getToken(OALParser.SRC_SERVICE_INSTANCE, 0); } + public TerminalNode SRC_ALL() { return getToken(OALParser.SRC_ALL, 0); } + public TerminalNode SRC_SERVICE() { return getToken(OALParser.SRC_SERVICE, 0); } + public SourceContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_source; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof OALParserListener ) ((OALParserListener)listener).enterSource(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof OALParserListener ) ((OALParserListener)listener).exitSource(this); + } + } + + public final SourceContext source() throws RecognitionException { + SourceContext _localctx = new SourceContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_source); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(32); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << SRC_ALL) | (1L << SRC_SERVICE) | (1L << SRC_SERVICE_INSTANCE) | (1L << SRC_ENDPOINT) | (1L << SRC_SERVICE_RELATION) | (1L << SRC_SERVICE_INSTANCE_RELATION) | (1L << SRC_ENDPOINT_RELATION) | (1L << SRC_SERVICE_INSTANCE_JVM_CPU) | (1L << SRC_SERVICE_INSTANCE_JVM_MEMORY) | (1L << SRC_SERVICE_INSTANCE_JVM_MEMORY_POOL))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\32%\4\2\t\2\4\3\t"+ + "\3\4\4\t\4\4\5\t\5\3\2\5\2\f\n\2\3\2\5\2\17\n\2\3\2\5\2\22\n\2\3\2\3\2"+ + "\3\3\7\3\27\n\3\f\3\16\3\32\13\3\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3"+ + "\5\2\2\6\2\4\6\b\2\3\3\2\5\16$\2\13\3\2\2\2\4\30\3\2\2\2\6\33\3\2\2\2"+ + "\b\"\3\2\2\2\n\f\5\4\3\2\13\n\3\2\2\2\13\f\3\2\2\2\f\16\3\2\2\2\r\17\7"+ + "\23\2\2\16\r\3\2\2\2\16\17\3\2\2\2\17\21\3\2\2\2\20\22\7\24\2\2\21\20"+ + "\3\2\2\2\21\22\3\2\2\2\22\23\3\2\2\2\23\24\7\2\2\3\24\3\3\2\2\2\25\27"+ + "\5\6\4\2\26\25\3\2\2\2\27\32\3\2\2\2\30\26\3\2\2\2\30\31\3\2\2\2\31\5"+ + "\3\2\2\2\32\30\3\2\2\2\33\34\7\3\2\2\34\35\7\27\2\2\35\36\5\b\5\2\36\37"+ + "\7\26\2\2\37 \7\25\2\2 !\7\30\2\2!\7\3\2\2\2\"#\t\2\2\2#\t\3\2\2\2\6\13"+ + "\16\21\30"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/oal-syntax/target/generated-sources/antlr4/org/apache/skywalking/oal/tool/grammar/OALParserBaseListener.java b/oal-syntax/target/generated-sources/antlr4/org/apache/skywalking/oal/tool/grammar/OALParserBaseListener.java new file mode 100644 index 0000000..9a3aabe --- /dev/null +++ b/oal-syntax/target/generated-sources/antlr4/org/apache/skywalking/oal/tool/grammar/OALParserBaseListener.java @@ -0,0 +1,91 @@ +// Generated from org/apache/skywalking/oal/tool/grammar/OALParser.g4 by ANTLR 4.3 +package org.apache.skywalking.oal.tool.grammar; + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ErrorNode; +import org.antlr.v4.runtime.tree.TerminalNode; + +/** + * This class provides an empty implementation of {@link OALParserListener}, + * which can be extended to create a listener which only needs to handle a subset + * of the available methods. + */ +public class OALParserBaseListener implements OALParserListener { + /** + * {@inheritDoc} + * + * <p>The default implementation does nothing.</p> + */ + @Override public void enterMetricStatements(@NotNull OALParser.MetricStatementsContext ctx) { } + /** + * {@inheritDoc} + * + * <p>The default implementation does nothing.</p> + */ + @Override public void exitMetricStatements(@NotNull OALParser.MetricStatementsContext ctx) { } + + /** + * {@inheritDoc} + * + * <p>The default implementation does nothing.</p> + */ + @Override public void enterRoot(@NotNull OALParser.RootContext ctx) { } + /** + * {@inheritDoc} + * + * <p>The default implementation does nothing.</p> + */ + @Override public void exitRoot(@NotNull OALParser.RootContext ctx) { } + + /** + * {@inheritDoc} + * + * <p>The default implementation does nothing.</p> + */ + @Override public void enterMetricStatement(@NotNull OALParser.MetricStatementContext ctx) { } + /** + * {@inheritDoc} + * + * <p>The default implementation does nothing.</p> + */ + @Override public void exitMetricStatement(@NotNull OALParser.MetricStatementContext ctx) { } + + /** + * {@inheritDoc} + * + * <p>The default implementation does nothing.</p> + */ + @Override public void enterSource(@NotNull OALParser.SourceContext ctx) { } + /** + * {@inheritDoc} + * + * <p>The default implementation does nothing.</p> + */ + @Override public void exitSource(@NotNull OALParser.SourceContext ctx) { } + + /** + * {@inheritDoc} + * + * <p>The default implementation does nothing.</p> + */ + @Override public void enterEveryRule(@NotNull ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + * <p>The default implementation does nothing.</p> + */ + @Override public void exitEveryRule(@NotNull ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + * <p>The default implementation does nothing.</p> + */ + @Override public void visitTerminal(@NotNull TerminalNode node) { } + /** + * {@inheritDoc} + * + * <p>The default implementation does nothing.</p> + */ + @Override public void visitErrorNode(@NotNull ErrorNode node) { } +} \ No newline at end of file diff --git a/oal-syntax/target/generated-sources/antlr4/org/apache/skywalking/oal/tool/grammar/OALParserListener.java b/oal-syntax/target/generated-sources/antlr4/org/apache/skywalking/oal/tool/grammar/OALParserListener.java new file mode 100644 index 0000000..451ddc7 --- /dev/null +++ b/oal-syntax/target/generated-sources/antlr4/org/apache/skywalking/oal/tool/grammar/OALParserListener.java @@ -0,0 +1,54 @@ +// Generated from org/apache/skywalking/oal/tool/grammar/OALParser.g4 by ANTLR 4.3 +package org.apache.skywalking.oal.tool.grammar; +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ParseTreeListener; + +/** + * This interface defines a complete listener for a parse tree produced by + * {@link OALParser}. + */ +public interface OALParserListener extends ParseTreeListener { + /** + * Enter a parse tree produced by {@link OALParser#metricStatements}. + * @param ctx the parse tree + */ + void enterMetricStatements(@NotNull OALParser.MetricStatementsContext ctx); + /** + * Exit a parse tree produced by {@link OALParser#metricStatements}. + * @param ctx the parse tree + */ + void exitMetricStatements(@NotNull OALParser.MetricStatementsContext ctx); + + /** + * Enter a parse tree produced by {@link OALParser#root}. + * @param ctx the parse tree + */ + void enterRoot(@NotNull OALParser.RootContext ctx); + /** + * Exit a parse tree produced by {@link OALParser#root}. + * @param ctx the parse tree + */ + void exitRoot(@NotNull OALParser.RootContext ctx); + + /** + * Enter a parse tree produced by {@link OALParser#metricStatement}. + * @param ctx the parse tree + */ + void enterMetricStatement(@NotNull OALParser.MetricStatementContext ctx); + /** + * Exit a parse tree produced by {@link OALParser#metricStatement}. + * @param ctx the parse tree + */ + void exitMetricStatement(@NotNull OALParser.MetricStatementContext ctx); + + /** + * Enter a parse tree produced by {@link OALParser#source}. + * @param ctx the parse tree + */ + void enterSource(@NotNull OALParser.SourceContext ctx); + /** + * Exit a parse tree produced by {@link OALParser#source}. + * @param ctx the parse tree + */ + void exitSource(@NotNull OALParser.SourceContext ctx); +} \ No newline at end of file diff --git a/oal-syntax/target/maven-shared-archive-resources/META-INF/DEPENDENCIES b/oal-syntax/target/maven-shared-archive-resources/META-INF/DEPENDENCIES index 2764812..d7e502c 100644 --- a/oal-syntax/target/maven-shared-archive-resources/META-INF/DEPENDENCIES +++ b/oal-syntax/target/maven-shared-archive-resources/META-INF/DEPENDENCIES @@ -28,6 +28,10 @@ From: 'Oracle' (http://www.oracle.com) - JSR 353 (JSON Processing) Default Provider (http://jsonp.java.net) org.glassfish:javax.json:bundle:1.0.4 License: Dual license consisting of the CDDL v1.1 and GPL v2 (https://glassfish.java.net/public/CDDL+GPL_1_1.html) +From: 'The Apache Software Foundation' (https://www.apache.org/) + - Apache Commons CLI (http://commons.apache.org/proper/commons-cli/) commons-cli:commons-cli:jar:1.4 + License: Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) + diff --git a/oal-syntax/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/oal-syntax/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst index 004152f..8fd0c8f 100644 --- a/oal-syntax/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +++ b/oal-syntax/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -1,6 +1,8 @@ -ExprParser.class -ExprParser$ExprContext.class -ExprBaseListener.class -ExprLexer.class -ExprListener.class -ExprParser$ProgContext.class +org/apache/skywalking/oal/tool/grammar/OALParser$MetricStatementContext.class +org/apache/skywalking/oal/tool/grammar/OALParserListener.class +org/apache/skywalking/oal/tool/grammar/OALParser$MetricStatementsContext.class +org/apache/skywalking/oal/tool/grammar/OALLexer.class +org/apache/skywalking/oal/tool/grammar/OALParserBaseListener.class +org/apache/skywalking/oal/tool/grammar/OALParser$RootContext.class +org/apache/skywalking/oal/tool/grammar/OALParser$SourceContext.class +org/apache/skywalking/oal/tool/grammar/OALParser.class diff --git a/oal-syntax/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/oal-syntax/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst index 422e840..0273d5e 100644 --- a/oal-syntax/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +++ b/oal-syntax/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -1,4 +1,4 @@ -/Users/wusheng/Documents/GitHub/incubator-skywalking-oal-tool/oal-syntax/target/generated-sources/antlr4/ExprBaseListener.java -/Users/wusheng/Documents/GitHub/incubator-skywalking-oal-tool/oal-syntax/target/generated-sources/antlr4/ExprListener.java -/Users/wusheng/Documents/GitHub/incubator-skywalking-oal-tool/oal-syntax/target/generated-sources/antlr4/ExprLexer.java -/Users/wusheng/Documents/GitHub/incubator-skywalking-oal-tool/oal-syntax/target/generated-sources/antlr4/ExprParser.java +/Users/wusheng/Documents/GitHub/incubator-skywalking-oal-tool/oal-syntax/target/generated-sources/antlr4/org/apache/skywalking/oal/tool/grammar/OALParserBaseListener.java +/Users/wusheng/Documents/GitHub/incubator-skywalking-oal-tool/oal-syntax/target/generated-sources/antlr4/org/apache/skywalking/oal/tool/grammar/OALParser.java +/Users/wusheng/Documents/GitHub/incubator-skywalking-oal-tool/oal-syntax/target/generated-sources/antlr4/org/apache/skywalking/oal/tool/grammar/OALLexer.java +/Users/wusheng/Documents/GitHub/incubator-skywalking-oal-tool/oal-syntax/target/generated-sources/antlr4/org/apache/skywalking/oal/tool/grammar/OALParserListener.java diff --git a/oal-syntax/target/maven-shared-archive-resources/META-INF/DEPENDENCIES b/oal-syntax/target/test-classes/META-INF/DEPENDENCIES similarity index 86% copy from oal-syntax/target/maven-shared-archive-resources/META-INF/DEPENDENCIES copy to oal-syntax/target/test-classes/META-INF/DEPENDENCIES index 2764812..d7e502c 100644 --- a/oal-syntax/target/maven-shared-archive-resources/META-INF/DEPENDENCIES +++ b/oal-syntax/target/test-classes/META-INF/DEPENDENCIES @@ -28,6 +28,10 @@ From: 'Oracle' (http://www.oracle.com) - JSR 353 (JSON Processing) Default Provider (http://jsonp.java.net) org.glassfish:javax.json:bundle:1.0.4 License: Dual license consisting of the CDDL v1.1 and GPL v2 (https://glassfish.java.net/public/CDDL+GPL_1_1.html) +From: 'The Apache Software Foundation' (https://www.apache.org/) + - Apache Commons CLI (http://commons.apache.org/proper/commons-cli/) commons-cli:commons-cli:jar:1.4 + License: Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) + diff --git a/oal-syntax/target/test-classes/META-INF/LICENSE b/oal-syntax/target/test-classes/META-INF/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/oal-syntax/target/test-classes/META-INF/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/oal-syntax/target/test-classes/META-INF/NOTICE b/oal-syntax/target/test-classes/META-INF/NOTICE new file mode 100644 index 0000000..82d5ff9 --- /dev/null +++ b/oal-syntax/target/test-classes/META-INF/NOTICE @@ -0,0 +1,8 @@ + +oal-syntax +Copyright 2018 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + + diff --git a/oal-syntax/target/test-classes/oal_test.oal b/oal-syntax/target/test-classes/oal_test.oal new file mode 100644 index 0000000..e69de29