<reponame>CIDARLAB/stl_metrics<filename>symmetricDistance/resources/manuscript/stl/stlLexer.py<gh_stars>0
# Generated from /home/cristi/Dropbox/work/workspace_linux_precision5520/python-stl/stl/stl.g4 by ANTLR 4.7.1
# encoding: utf-8
from __future__ import print_function
from antlr4 import *
from io import StringIO
import sys


'''
 Copyright (C) 2015-2018 <NAME> <<EMAIL>>,
                         <NAME> <<EMAIL>>,
                         <NAME> <<EMAIL>>
 Hybrid and Networked Systems (HyNeSs) Group, BU Robotics Lab, Boston University
 Cross Disciplinary Integration for Design Automation Research (CIDAR Lab), Boston University
 See license.txt file for license information.
'''


def serializedATN():
    with StringIO() as buf:
        buf.write(u"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2")
        buf.write(u"$\u00d3\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4")
        buf.write(u"\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")
        buf.write(u"\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22")
        buf.write(u"\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4")
        buf.write(u"\30\t\30\4\31\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35")
        buf.write(u"\t\35\4\36\t\36\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\3")
        buf.write(u"\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\3")
        buf.write(u"\b\3\t\3\t\3\n\3\n\3\n\3\13\3\13\3\13\3\f\3\f\3\f\3\r")
        buf.write(u"\3\r\3\r\3\16\3\16\3\17\3\17\3\17\3\20\3\20\3\21\3\21")
        buf.write(u"\3\21\3\21\3\21\3\21\3\22\3\22\3\22\3\22\3\22\3\23\3")
        buf.write(u"\23\3\23\3\23\3\24\3\24\3\24\3\24\3\24\3\25\3\25\3\25")
        buf.write(u"\3\25\3\25\3\26\3\26\3\26\3\26\3\26\3\27\3\27\3\30\3")
        buf.write(u"\30\3\31\3\31\3\32\3\32\3\33\3\33\3\34\3\34\3\34\3\35")
        buf.write(u"\3\35\3\36\3\36\3\36\3\37\3\37\3 \3 \3 \3 \3 \3 \3 \3")
        buf.write(u" \3 \5 \u00a6\n \3!\5!\u00a9\n!\3!\7!\u00ac\n!\f!\16")
        buf.write(u"!\u00af\13!\3\"\5\"\u00b2\n\"\3\"\7\"\u00b5\n\"\f\"\16")
        buf.write(u"\"\u00b8\13\"\3\"\5\"\u00bb\n\"\3\"\6\"\u00be\n\"\r\"")
        buf.write(u"\16\"\u00bf\3\"\3\"\3\"\5\"\u00c5\n\"\3\"\7\"\u00c8\n")
        buf.write(u"\"\f\"\16\"\u00cb\13\"\3#\6#\u00ce\n#\r#\16#\u00cf\3")
        buf.write(u"#\3#\2\2$\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25")
        buf.write(u"\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26")
        buf.write(u"+\27-\30/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C")
        buf.write(u"#E$\3\2\6\4\2C\\c|\6\2\62;C\\aac|\3\2\62;\5\2\13\f\17")
        buf.write(u"\17\"\"\2\u00dc\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2")
        buf.write(u"\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")
        buf.write(u"\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31")
        buf.write(u"\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3")
        buf.write(u"\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2")
        buf.write(u"+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2")
        buf.write(u"\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2")
        buf.write(u"\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2")
        buf.write(u"\2\3G\3\2\2\2\5I\3\2\2\2\7K\3\2\2\2\tM\3\2\2\2\13O\3")
        buf.write(u"\2\2\2\rQ\3\2\2\2\17S\3\2\2\2\21U\3\2\2\2\23W\3\2\2\2")
        buf.write(u"\25Z\3\2\2\2\27]\3\2\2\2\31`\3\2\2\2\33c\3\2\2\2\35e")
        buf.write(u"\3\2\2\2\37h\3\2\2\2!j\3\2\2\2#p\3\2\2\2%u\3\2\2\2\'")
        buf.write(u"y\3\2\2\2)~\3\2\2\2+\u0083\3\2\2\2-\u0088\3\2\2\2/\u008a")
        buf.write(u"\3\2\2\2\61\u008c\3\2\2\2\63\u008e\3\2\2\2\65\u0090\3")
        buf.write(u"\2\2\2\67\u0092\3\2\2\29\u0095\3\2\2\2;\u0097\3\2\2\2")
        buf.write(u"=\u009a\3\2\2\2?\u00a5\3\2\2\2A\u00a8\3\2\2\2C\u00b1")
        buf.write(u"\3\2\2\2E\u00cd\3\2\2\2GH\7*\2\2H\4\3\2\2\2IJ\7+\2\2")
        buf.write(u"J\6\3\2\2\2KL\7#\2\2L\b\3\2\2\2MN\7H\2\2N\n\3\2\2\2O")
        buf.write(u"P\7]\2\2P\f\3\2\2\2QR\7.\2\2R\16\3\2\2\2ST\7_\2\2T\20")
        buf.write(u"\3\2\2\2UV\7I\2\2V\22\3\2\2\2WX\7?\2\2XY\7@\2\2Y\24\3")
        buf.write(u"\2\2\2Z[\7(\2\2[\\\7(\2\2\\\26\3\2\2\2]^\7~\2\2^_\7~")
        buf.write(u"\2\2_\30\3\2\2\2`a\7@\2\2ab\7@\2\2b\32\3\2\2\2cd\7W\2")
        buf.write(u"\2d\34\3\2\2\2ef\7/\2\2fg\7*\2\2g\36\3\2\2\2hi\7`\2\2")
        buf.write(u"i \3\2\2\2jk\7u\2\2kl\7s\2\2lm\7t\2\2mn\7v\2\2no\7*\2")
        buf.write(u"\2o\"\3\2\2\2pq\7n\2\2qr\7q\2\2rs\7i\2\2st\7*\2\2t$\3")
        buf.write(u"\2\2\2uv\7n\2\2vw\7p\2\2wx\7*\2\2x&\3\2\2\2yz\7c\2\2")
        buf.write(u"z{\7d\2\2{|\7u\2\2|}\7*\2\2}(\3\2\2\2~\177\7f\2\2\177")
        buf.write(u"\u0080\7g\2\2\u0080\u0081\7t\2\2\u0081\u0082\7*\2\2\u0082")
        buf.write(u"*\3\2\2\2\u0083\u0084\7k\2\2\u0084\u0085\7p\2\2\u0085")
        buf.write(u"\u0086\7v\2\2\u0086\u0087\7*\2\2\u0087,\3\2\2\2\u0088")
        buf.write(u"\u0089\7,\2\2\u0089.\3\2\2\2\u008a\u008b\7\61\2\2\u008b")
        buf.write(u"\60\3\2\2\2\u008c\u008d\7-\2\2\u008d\62\3\2\2\2\u008e")
        buf.write(u"\u008f\7/\2\2\u008f\64\3\2\2\2\u0090\u0091\7>\2\2\u0091")
        buf.write(u"\66\3\2\2\2\u0092\u0093\7>\2\2\u0093\u0094\7?\2\2\u0094")
        buf.write(u"8\3\2\2\2\u0095\u0096\7?\2\2\u0096:\3\2\2\2\u0097\u0098")
        buf.write(u"\7@\2\2\u0098\u0099\7?\2\2\u0099<\3\2\2\2\u009a\u009b")
        buf.write(u"\7@\2\2\u009b>\3\2\2\2\u009c\u009d\7v\2\2\u009d\u009e")
        buf.write(u"\7t\2\2\u009e\u009f\7w\2\2\u009f\u00a6\7g\2\2\u00a0\u00a1")
        buf.write(u"\7h\2\2\u00a1\u00a2\7c\2\2\u00a2\u00a3\7n\2\2\u00a3\u00a4")
        buf.write(u"\7u\2\2\u00a4\u00a6\7g\2\2\u00a5\u009c\3\2\2\2\u00a5")
        buf.write(u"\u00a0\3\2\2\2\u00a6@\3\2\2\2\u00a7\u00a9\t\2\2\2\u00a8")
        buf.write(u"\u00a7\3\2\2\2\u00a9\u00ad\3\2\2\2\u00aa\u00ac\t\3\2")
        buf.write(u"\2\u00ab\u00aa\3\2\2\2\u00ac\u00af\3\2\2\2\u00ad\u00ab")
        buf.write(u"\3\2\2\2\u00ad\u00ae\3\2\2\2\u00aeB\3\2\2\2\u00af\u00ad")
        buf.write(u"\3\2\2\2\u00b0\u00b2\7/\2\2\u00b1\u00b0\3\2\2\2\u00b1")
        buf.write(u"\u00b2\3\2\2\2\u00b2\u00b6\3\2\2\2\u00b3\u00b5\t\4\2")
        buf.write(u"\2\u00b4\u00b3\3\2\2\2\u00b5\u00b8\3\2\2\2\u00b6\u00b4")
        buf.write(u"\3\2\2\2\u00b6\u00b7\3\2\2\2\u00b7\u00ba\3\2\2\2\u00b8")
        buf.write(u"\u00b6\3\2\2\2\u00b9\u00bb\7\60\2\2\u00ba\u00b9\3\2\2")
        buf.write(u"\2\u00ba\u00bb\3\2\2\2\u00bb\u00bd\3\2\2\2\u00bc\u00be")
        buf.write(u"\t\4\2\2\u00bd\u00bc\3\2\2\2\u00be\u00bf\3\2\2\2\u00bf")
        buf.write(u"\u00bd\3\2\2\2\u00bf\u00c0\3\2\2\2\u00c0\u00c4\3\2\2")
        buf.write(u"\2\u00c1\u00c5\7G\2\2\u00c2\u00c3\7G\2\2\u00c3\u00c5")
        buf.write(u"\7/\2\2\u00c4\u00c1\3\2\2\2\u00c4\u00c2\3\2\2\2\u00c4")
        buf.write(u"\u00c5\3\2\2\2\u00c5\u00c9\3\2\2\2\u00c6\u00c8\t\4\2")
        buf.write(u"\2\u00c7\u00c6\3\2\2\2\u00c8\u00cb\3\2\2\2\u00c9\u00c7")
        buf.write(u"\3\2\2\2\u00c9\u00ca\3\2\2\2\u00caD\3\2\2\2\u00cb\u00c9")
        buf.write(u"\3\2\2\2\u00cc\u00ce\t\5\2\2\u00cd\u00cc\3\2\2\2\u00ce")
        buf.write(u"\u00cf\3\2\2\2\u00cf\u00cd\3\2\2\2\u00cf\u00d0\3\2\2")
        buf.write(u"\2\u00d0\u00d1\3\2\2\2\u00d1\u00d2\b#\2\2\u00d2F\3\2")
        buf.write(u"\2\2\16\2\u00a5\u00a8\u00ab\u00ad\u00b1\u00b6\u00ba\u00bf")
        buf.write(u"\u00c4\u00c9\u00cf\3\3#\2")
        return buf.getvalue()


class stlLexer(Lexer):

    atn = ATNDeserializer().deserialize(serializedATN())

    decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ]

    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
    T__27 = 28
    T__28 = 29
    T__29 = 30
    BOOLEAN = 31
    VARIABLE = 32
    RATIONAL = 33
    WS = 34

    channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ]

    modeNames = [ u"DEFAULT_MODE" ]

    literalNames = [ u"<INVALID>",
            u"'('", u"')'", u"'!'", u"'F'", u"'['", u"','", u"']'", u"'G'", 
            u"'=>'", u"'&&'", u"'||'", u"'>>'", u"'U'", u"'-('", u"'^'", 
            u"'sqrt('", u"'log('", u"'ln('", u"'abs('", u"'der('", u"'int('", 
            u"'*'", u"'/'", u"'+'", u"'-'", u"'<'", u"'<='", u"'='", u"'>='", 
            u"'>'" ]

    symbolicNames = [ u"<INVALID>",
            u"BOOLEAN", u"VARIABLE", u"RATIONAL", u"WS" ]

    ruleNames = [ u"T__0", u"T__1", u"T__2", u"T__3", u"T__4", u"T__5", 
                  u"T__6", u"T__7", u"T__8", u"T__9", u"T__10", u"T__11", 
                  u"T__12", u"T__13", u"T__14", u"T__15", u"T__16", u"T__17", 
                  u"T__18", u"T__19", u"T__20", u"T__21", u"T__22", u"T__23", 
                  u"T__24", u"T__25", u"T__26", u"T__27", u"T__28", u"T__29", 
                  u"BOOLEAN", u"VARIABLE", u"RATIONAL", u"WS" ]

    grammarFileName = u"stl.g4"

    def __init__(self, input=None, output=sys.stdout):
        super(stlLexer, self).__init__(input, output=output)
        self.checkVersion("4.7.1")
        self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
        self._actions = None
        self._predicates = None


    def action(self, localctx, ruleIndex, actionIndex):
        if self._actions is None:
            actions = dict()
            actions[33] = self.WS_action 
            self._actions = actions
        action = self._actions.get(ruleIndex, None)
        if action is not None:
            action(localctx, actionIndex)
        else:
            raise Exception("No registered action for:" + str(ruleIndex))

    def WS_action(self, localctx , actionIndex):
        if actionIndex == 0:
             self.skip(); 
     


