| // |
| // 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 |
| // |
| // https://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. |
| // |
| |
| //------------------------------------------------------------------------------ |
| // <auto-generated> |
| // This code was generated by a tool. |
| // ANTLR Version: 4.13.2 |
| // |
| // Changes to this file may cause incorrect behavior and will be lost if |
| // the code is regenerated. |
| // </auto-generated> |
| //------------------------------------------------------------------------------ |
| |
| // Generated from code-generation/protocol-base-mspec/src/main/antlr4/org/apache/plc4x/plugins/codegenerator/language/mspec/expression/Expression.g4 by ANTLR 4.13.2 |
| |
| // Unreachable code detected |
| #pragma warning disable 0162 |
| // The variable '...' is assigned but its value is never used |
| #pragma warning disable 0219 |
| // Missing XML comment for publicly visible type or member '...' |
| #pragma warning disable 1591 |
| // Ambiguous reference in cref attribute |
| #pragma warning disable 419 |
| |
| namespace org.apache.plc4net.tools.codegen.grammar { |
| using System; |
| using System.IO; |
| using System.Text; |
| using Antlr4.Runtime; |
| using Antlr4.Runtime.Atn; |
| using Antlr4.Runtime.Misc; |
| using DFA = Antlr4.Runtime.Dfa.DFA; |
| |
| [System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.2")] |
| [System.CLSCompliant(false)] |
| public partial class ExpressionLexer : Lexer { |
| protected static DFA[] decisionToDFA; |
| protected static PredictionContextCache sharedContextCache = new PredictionContextCache(); |
| public const int |
| T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9, |
| T__9=10, T__10=11, T__11=12, T__12=13, T__13=14, T__14=15, T__15=16, T__16=17, |
| T__17=18, T__18=19, T__19=20, T__20=21, T__21=22, T__22=23, T__23=24, |
| T__24=25, T__25=26, T__26=27, Null=28, Bool=29, Number=30, Identifier=31, |
| String=32, Space=33, HexExpression=34; |
| public static string[] channelNames = { |
| "DEFAULT_TOKEN_CHANNEL", "HIDDEN" |
| }; |
| |
| public static string[] modeNames = { |
| "DEFAULT_MODE" |
| }; |
| |
| public static readonly string[] ruleNames = { |
| "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8", |
| "T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16", |
| "T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "T__23", "T__24", |
| "T__25", "T__26", "Null", "Bool", "Number", "Identifier", "String", "Space", |
| "Int", "Digit", "HexExpression", "HexCharacters", "HexCharacter" |
| }; |
| |
| |
| public ExpressionLexer(ICharStream input) |
| : this(input, Console.Out, Console.Error) { } |
| |
| public ExpressionLexer(ICharStream input, TextWriter output, TextWriter errorOutput) |
| : base(input, output, errorOutput) |
| { |
| Interpreter = new LexerATNSimulator(this, _ATN, decisionToDFA, sharedContextCache); |
| } |
| |
| private static readonly string[] _LiteralNames = { |
| null, "'-'", "'!'", "'^'", "'*'", "'/'", "'%'", "'+'", "'>>'", "'<<'", |
| "'>='", "'<='", "'>'", "'<'", "'=='", "'!='", "'&&'", "'&'", "'||'", "'|'", |
| "'?'", "':'", "'('", "')'", "'.'", "','", "'['", "']'", "'null'" |
| }; |
| private static readonly string[] _SymbolicNames = { |
| null, null, null, null, null, null, null, null, null, null, null, null, |
| null, null, null, null, null, null, null, null, null, null, null, null, |
| null, null, null, null, "Null", "Bool", "Number", "Identifier", "String", |
| "Space", "HexExpression" |
| }; |
| public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); |
| |
| [NotNull] |
| public override IVocabulary Vocabulary |
| { |
| get |
| { |
| return DefaultVocabulary; |
| } |
| } |
| |
| public override string GrammarFileName { get { return "Expression.g4"; } } |
| |
| public override string[] RuleNames { get { return ruleNames; } } |
| |
| public override string[] ChannelNames { get { return channelNames; } } |
| |
| public override string[] ModeNames { get { return modeNames; } } |
| |
| public override int[] SerializedAtn { get { return _serializedATN; } } |
| |
| static ExpressionLexer() { |
| decisionToDFA = new DFA[_ATN.NumberOfDecisions]; |
| for (int i = 0; i < _ATN.NumberOfDecisions; i++) { |
| decisionToDFA[i] = new DFA(_ATN.GetDecisionState(i), i); |
| } |
| } |
| private static int[] _serializedATN = { |
| 4,0,34,221,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, |
| 6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14, |
| 7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21, |
| 7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28, |
| 7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35, |
| 7,35,2,36,7,36,2,37,7,37,1,0,1,0,1,1,1,1,1,2,1,2,1,3,1,3,1,4,1,4,1,5,1, |
| 5,1,6,1,6,1,7,1,7,1,7,1,8,1,8,1,8,1,9,1,9,1,9,1,10,1,10,1,10,1,11,1,11, |
| 1,12,1,12,1,13,1,13,1,13,1,14,1,14,1,14,1,15,1,15,1,15,1,16,1,16,1,17, |
| 1,17,1,17,1,18,1,18,1,19,1,19,1,20,1,20,1,21,1,21,1,22,1,22,1,23,1,23, |
| 1,24,1,24,1,25,1,25,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28, |
| 1,28,1,28,1,28,1,28,1,28,1,28,3,28,154,8,28,1,29,1,29,1,29,5,29,159,8, |
| 29,10,29,12,29,162,9,29,3,29,164,8,29,1,30,1,30,5,30,168,8,30,10,30,12, |
| 30,171,9,30,1,31,1,31,1,31,1,31,5,31,177,8,31,10,31,12,31,180,9,31,1,31, |
| 1,31,1,31,1,31,1,31,5,31,187,8,31,10,31,12,31,190,9,31,1,31,3,31,193,8, |
| 31,1,32,1,32,1,32,1,32,1,33,1,33,5,33,201,8,33,10,33,12,33,204,9,33,1, |
| 33,3,33,207,8,33,1,34,1,34,1,35,1,35,1,35,1,35,1,36,4,36,216,8,36,11,36, |
| 12,36,217,1,37,1,37,0,0,38,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19, |
| 10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43, |
| 22,45,23,47,24,49,25,51,26,53,27,55,28,57,29,59,30,61,31,63,32,65,33,67, |
| 0,69,0,71,34,73,0,75,0,1,0,12,3,0,65,90,95,95,97,122,4,0,48,57,65,90,95, |
| 95,97,122,1,0,34,34,4,0,10,10,13,13,34,34,92,92,2,0,10,10,13,13,1,0,39, |
| 39,4,0,10,10,13,13,39,39,92,92,3,0,9,10,12,13,32,32,1,0,49,57,1,0,48,57, |
| 2,0,88,88,120,120,3,0,48,57,65,70,97,102,228,0,1,1,0,0,0,0,3,1,0,0,0,0, |
| 5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0, |
| 0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27, |
| 1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0, |
| 0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49, |
| 1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0, |
| 0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,71,1,0,0,0,1,77,1,0,0,0,3,79, |
| 1,0,0,0,5,81,1,0,0,0,7,83,1,0,0,0,9,85,1,0,0,0,11,87,1,0,0,0,13,89,1,0, |
| 0,0,15,91,1,0,0,0,17,94,1,0,0,0,19,97,1,0,0,0,21,100,1,0,0,0,23,103,1, |
| 0,0,0,25,105,1,0,0,0,27,107,1,0,0,0,29,110,1,0,0,0,31,113,1,0,0,0,33,116, |
| 1,0,0,0,35,118,1,0,0,0,37,121,1,0,0,0,39,123,1,0,0,0,41,125,1,0,0,0,43, |
| 127,1,0,0,0,45,129,1,0,0,0,47,131,1,0,0,0,49,133,1,0,0,0,51,135,1,0,0, |
| 0,53,137,1,0,0,0,55,139,1,0,0,0,57,153,1,0,0,0,59,155,1,0,0,0,61,165,1, |
| 0,0,0,63,192,1,0,0,0,65,194,1,0,0,0,67,206,1,0,0,0,69,208,1,0,0,0,71,210, |
| 1,0,0,0,73,215,1,0,0,0,75,219,1,0,0,0,77,78,5,45,0,0,78,2,1,0,0,0,79,80, |
| 5,33,0,0,80,4,1,0,0,0,81,82,5,94,0,0,82,6,1,0,0,0,83,84,5,42,0,0,84,8, |
| 1,0,0,0,85,86,5,47,0,0,86,10,1,0,0,0,87,88,5,37,0,0,88,12,1,0,0,0,89,90, |
| 5,43,0,0,90,14,1,0,0,0,91,92,5,62,0,0,92,93,5,62,0,0,93,16,1,0,0,0,94, |
| 95,5,60,0,0,95,96,5,60,0,0,96,18,1,0,0,0,97,98,5,62,0,0,98,99,5,61,0,0, |
| 99,20,1,0,0,0,100,101,5,60,0,0,101,102,5,61,0,0,102,22,1,0,0,0,103,104, |
| 5,62,0,0,104,24,1,0,0,0,105,106,5,60,0,0,106,26,1,0,0,0,107,108,5,61,0, |
| 0,108,109,5,61,0,0,109,28,1,0,0,0,110,111,5,33,0,0,111,112,5,61,0,0,112, |
| 30,1,0,0,0,113,114,5,38,0,0,114,115,5,38,0,0,115,32,1,0,0,0,116,117,5, |
| 38,0,0,117,34,1,0,0,0,118,119,5,124,0,0,119,120,5,124,0,0,120,36,1,0,0, |
| 0,121,122,5,124,0,0,122,38,1,0,0,0,123,124,5,63,0,0,124,40,1,0,0,0,125, |
| 126,5,58,0,0,126,42,1,0,0,0,127,128,5,40,0,0,128,44,1,0,0,0,129,130,5, |
| 41,0,0,130,46,1,0,0,0,131,132,5,46,0,0,132,48,1,0,0,0,133,134,5,44,0,0, |
| 134,50,1,0,0,0,135,136,5,91,0,0,136,52,1,0,0,0,137,138,5,93,0,0,138,54, |
| 1,0,0,0,139,140,5,110,0,0,140,141,5,117,0,0,141,142,5,108,0,0,142,143, |
| 5,108,0,0,143,56,1,0,0,0,144,145,5,116,0,0,145,146,5,114,0,0,146,147,5, |
| 117,0,0,147,154,5,101,0,0,148,149,5,102,0,0,149,150,5,97,0,0,150,151,5, |
| 108,0,0,151,152,5,115,0,0,152,154,5,101,0,0,153,144,1,0,0,0,153,148,1, |
| 0,0,0,154,58,1,0,0,0,155,163,3,67,33,0,156,160,5,46,0,0,157,159,3,69,34, |
| 0,158,157,1,0,0,0,159,162,1,0,0,0,160,158,1,0,0,0,160,161,1,0,0,0,161, |
| 164,1,0,0,0,162,160,1,0,0,0,163,156,1,0,0,0,163,164,1,0,0,0,164,60,1,0, |
| 0,0,165,169,7,0,0,0,166,168,7,1,0,0,167,166,1,0,0,0,168,171,1,0,0,0,169, |
| 167,1,0,0,0,169,170,1,0,0,0,170,62,1,0,0,0,171,169,1,0,0,0,172,178,7,2, |
| 0,0,173,177,8,3,0,0,174,175,5,92,0,0,175,177,8,4,0,0,176,173,1,0,0,0,176, |
| 174,1,0,0,0,177,180,1,0,0,0,178,176,1,0,0,0,178,179,1,0,0,0,179,181,1, |
| 0,0,0,180,178,1,0,0,0,181,193,7,2,0,0,182,188,7,5,0,0,183,187,8,6,0,0, |
| 184,185,5,92,0,0,185,187,8,4,0,0,186,183,1,0,0,0,186,184,1,0,0,0,187,190, |
| 1,0,0,0,188,186,1,0,0,0,188,189,1,0,0,0,189,191,1,0,0,0,190,188,1,0,0, |
| 0,191,193,7,5,0,0,192,172,1,0,0,0,192,182,1,0,0,0,193,64,1,0,0,0,194,195, |
| 7,7,0,0,195,196,1,0,0,0,196,197,6,32,0,0,197,66,1,0,0,0,198,202,7,8,0, |
| 0,199,201,3,69,34,0,200,199,1,0,0,0,201,204,1,0,0,0,202,200,1,0,0,0,202, |
| 203,1,0,0,0,203,207,1,0,0,0,204,202,1,0,0,0,205,207,5,48,0,0,206,198,1, |
| 0,0,0,206,205,1,0,0,0,207,68,1,0,0,0,208,209,7,9,0,0,209,70,1,0,0,0,210, |
| 211,5,48,0,0,211,212,7,10,0,0,212,213,3,73,36,0,213,72,1,0,0,0,214,216, |
| 3,75,37,0,215,214,1,0,0,0,216,217,1,0,0,0,217,215,1,0,0,0,217,218,1,0, |
| 0,0,218,74,1,0,0,0,219,220,7,11,0,0,220,76,1,0,0,0,13,0,153,160,163,169, |
| 176,178,186,188,192,202,206,217,1,6,0,0 |
| }; |
| |
| public static readonly ATN _ATN = |
| new ATNDeserializer().Deserialize(_serializedATN); |
| |
| |
| } |
| } // namespace org.apache.plc4net.tools.codegen.grammar |