Ejemplo n.º 1
0
class Token(LexerToken):
    Def = WithText()
    LPar = WithText()
    RPar = WithText()
    Comma = WithText()
    Identifier = WithSymbol()
    Comment = WithTrivia()
Ejemplo n.º 2
0
class Token(LexerToken):
    Identifier = WithSymbol()
    All = WithSymbol()

    # Ada Keywords
    Abstract = WithSymbol()
    At = WithSymbol()
    Case = WithSymbol()
    End = WithSymbol()
    For = WithSymbol()
    Is = WithSymbol()
    Limited = WithSymbol()
    Null = WithSymbol()
    Others = WithSymbol()
    Package = WithSymbol()
    Renames = WithSymbol()
    Type = WithSymbol()
    Use = WithSymbol()
    When = WithSymbol()
    With = WithSymbol()

    # GPR Keywords
    Project = WithSymbol()
    Extends = WithSymbol()

    # Punctuation
    ParOpen = WithSymbol()
    ParClose = WithSymbol()
    Semicolon = WithSymbol()
    Colon = WithSymbol()
    Comma = WithSymbol()
    Dot = WithSymbol()

    Amp = WithSymbol()
    Tick = WithSymbol()
    Pipe = WithSymbol()
    Assign = WithSymbol()
    Arrow = WithSymbol()

    # Literals
    String = WithText()
    Number = WithText()

    # Hidden framework dependencies???
    Label = WithText()
    Char = WithSymbol()

    Comment = WithTrivia()
    Whitespace = WithTrivia()

    Alphanumericals = TokenFamily(Identifier, All, Abstract, At, Case, End,
                                  For, Is, Limited, Null, Others, Package,
                                  Renames, Type, Use, When, With, Project,
                                  Extends, String, Number, Label, Char)
Ejemplo n.º 3
0
class Token(LexerToken):
    Example = WithText()
    Null = WithText()

    Comma = WithText()
    LPar = WithText()
    RPar = WithText()
    LBrace = WithText()
    RBrace = WithText()
    Plus = WithText()

    Number = WithText()
    Identifier = WithSymbol()
Ejemplo n.º 4
0
class Token(LexerToken):
    Ident = WithSymbol()

    Colon = WithText()
    Arrow = WithText()
    Equal = WithText()
    ParOpen = WithText()
    ParClose = WithText()
    Backslash = WithText()
    Dot = WithText()

    Comment = WithTrivia()
    Whitespace = WithTrivia()
    Newlines = WithText()
Ejemplo n.º 5
0
class BaseToken(LexerToken):
    Number = WithText()
    Identifier = WithSymbol()
Ejemplo n.º 6
0
class Token(LexerToken):
    Def = WithText()
    Var = WithText()
    Error = WithText()
    Example = WithText()
    Null = WithText()

    Comma = WithText()
    Dot = WithText()
    Semicolon = WithText()
    LPar = WithText()
    RPar = WithText()
    LBrace = WithText()
    RBrace = WithText()
    Equal = WithText()
    Plus = WithText()
    Minus = WithText()
    LessThan = WithText()

    Number = WithText()
    Identifier = WithSymbol()
    String = WithText()

    Comment = WithTrivia()
    Whitespace = WithTrivia()

    Alphanumericals = TokenFamily(Def, Error, Example, Null, Number,
                                  Identifier)
    Punctuation = TokenFamily(Comma, Dot, Semicolon, LPar, RPar, LBrace,
                              RBrace, Equal, Plus)
    Comments = TokenFamily(Comment)
Ejemplo n.º 7
0
class BaseToken(LexerToken):
    Example = WithText()
    Whitespace = Ignore()
Ejemplo n.º 8
0
class Token(LexerToken):
    Def = WithText()
    Error = WithText()
    Example = WithText()
    Null = WithText()

    Comma = WithText()
    Dot = WithText()
    LPar = WithText()
    RPar = WithText()
    LBrace = WithText()
    RBrace = WithText()
    Equal = WithText()
    Plus = WithText()

    Number = WithText()
    Identifier = WithSymbol()
Ejemplo n.º 9
0
class Token(LexerToken):
    Identifier = WithSymbol()
    KindName = WithSymbol()
    String = WithText()
    Integer = WithText()

    Let = WithSymbol()
    SelectTok = WithSymbol()
    FromTok = WithSymbol()
    When = WithSymbol()
    Match = WithSymbol()
    Val = WithSymbol()
    Fun = WithSymbol()
    Selector = WithSymbol()
    Match = WithSymbol()
    Rec = WithSymbol()
    For = WithSymbol()
    Skip = WithSymbol()
    Is = WithSymbol()
    In = WithSymbol()
    TrueLit = WithSymbol()
    FalseLit = WithSymbol()
    If = WithSymbol()
    Then = WithSymbol()
    Else = WithSymbol()
    Not = WithSymbol()
    Null = WithSymbol()
    Import = WithSymbol()

    Dot = WithText()
    QuestionDot = WithText()
    QuestionBrack = WithText()
    Question = WithText()
    Coma = WithText()
    SemiCol = WithText()
    Colon = WithText()
    UnderScore = WithText()
    Eq = WithText()
    EqEq = WithText()
    Neq = WithText()
    ExclExcl = WithText()
    Lt = WithText()
    LEq = WithText()
    Gt = WithText()
    GEq = WithText()
    And = WithText()
    Or = WithText()
    Plus = WithText()
    Minus = WithText()
    Mul = WithText()
    Div = WithText()
    Amp = WithText()
    LPar = WithText()
    RPar = WithText()
    LBrack = WithText()
    RBrack = WithText()
    LCurl = WithText()
    RCurl = WithText()
    At = WithText()
    Pipe = WithText()
    LArrow = WithText()
    BigRArrow = WithText()
    Box = WithText()
    SubBlockLiteral = WithText()

    Comment = WithTrivia()
    Whitespace = WithTrivia()
Ejemplo n.º 10
0
class Token(LexerToken):
    Identifier = WithSymbol()
    String = WithText()

    # Operators
    ExclMark = WithText()
    Colon = WithText()
    IntMark = WithText()
    Div = WithText()
    Comma = WithText()
    Times = WithText()
    Plus = WithText()
    Pipe = WithText()
    LeftArrow = WithText()
    Dot = WithText()
    Comb = WithText()
    At = WithText()
    LPar = WithText()
    RPar = WithText()
    LBrace = WithText()
    RBrace = WithText()
    LBrack = WithText()
    RBrack = WithText()
    ListPlus = WithText()
    ListStar = WithText()
    Equal = WithText()

    # Keywords
    GrammarKw = WithText()
    OrKw = WithText()
    ClassKw = WithText()
    FunKw = WithText()
    PublicKw = WithText()
    PrivateKw = WithText()
    NullKw = WithText()
Ejemplo n.º 11
0
class Token(LexerToken):
    Identifier = WithSymbol()

    # Operators
    ExclMark = WithText()
    Colon = WithText()
    Semicolon = WithText()
    IntMark = WithText()
    Div = WithText()
    Comma = WithText()
    Times = WithText()
    Plus = WithText()
    Amp = WithText()
    Minus = WithText()
    Pipe = WithText()
    LeftArrow = WithText()
    RightArrow = WithText()
    FatRightArrow = WithText()
    Dot = WithText()
    Comb = WithText()
    At = WithText()
    LPar = WithText()
    RPar = WithText()
    LBrace = WithText()
    RBrace = WithText()
    LBrack = WithText()
    RBrack = WithText()
    Equal = WithText()
    GTE = WithText()
    LTE = WithText()
    GT = WithText()
    LT = WithText()
    Percent = WithText()

    # Keywords
    LexerKw = WithText()
    GrammarKw = WithText()
    OrKw = WithText()
    NotKw = WithText()
    ClassKw = WithText()
    StructKw = WithText()
    FunKw = WithText()
    PublicKw = WithText()
    PrivateKw = WithText()
    NullKw = WithText()
    IsKw = WithText()
    ValKw = WithText()
    IfKw = WithText()
    ThenKw = WithText()
    ElifKw = WithText()
    ElseKw = WithText()
    AndKw = WithText()
    OrKw = WithText()
    BindKw = WithText()
    MatchKw = WithText()
    CaseKw = WithText()
    RaiseKw = WithText()
    TryKw = WithText()
    EnumKw = WithText()
    GenericKw = WithText()
    DiscardKw = WithText()
    ImportKw = WithText()
    ImplementsKw = WithText()
    TraitKw = WithText()

    # Trivia
    Comment = WithTrivia()

    # Literals
    String = WithText()
    PString = WithText()
    Char = WithText()
    DocComment = WithText()
    Number = WithText()
    BigNumber = WithText()
Ejemplo n.º 12
0
class Token(LexerToken):
    Example = WithText()
    Comment = WithTrivia()
Ejemplo n.º 13
0
class Token(LexerToken):
    Identifier = WithSymbol()
    All = WithText()

    # Keywords
    Abort = WithText()
    Else = WithText()
    New = WithText()
    Return = WithText()
    Abs = WithText()
    Elsif = WithText()
    Not = WithText()
    Reverse = WithText()
    Abstract = WithText()
    End = WithText()
    Null = WithSymbol()
    Accept = WithText()
    Entry = WithText()
    Select = WithText()
    Access = WithText()
    Exception = WithText()
    Of = WithText()
    Separate = WithText()
    Aliased = WithText()
    Exit = WithText()
    Or = WithText()
    Some = WithText()
    Others = WithText()
    Subtype = WithText()
    And = WithText()
    For = WithText()
    Out = WithText()
    Array = WithText()
    Function = WithText()
    At = WithText()
    Tagged = WithText()
    Generic = WithText()
    Package = WithText()
    Task = WithText()
    Begin = WithText()
    Goto = WithText()
    Pragma = WithText()
    Terminate = WithText()
    Body = WithText()
    Private = WithText()
    Then = WithText()
    If = WithText()
    Procedure = WithText()
    Type = WithText()
    Case = WithText()
    In = WithText()
    Constant = WithText()
    Is = WithText()
    Raise = WithText()
    Use = WithText()
    Declare = WithText()
    Range = WithText()
    Delay = WithText()
    Until = WithText()
    Limited = WithText()
    Record = WithText()
    When = WithText()
    Delta = WithText()
    Loop = WithText()
    Rem = WithText()
    While = WithText()
    Digits = WithText()
    Renames = WithText()
    Do = WithText()
    Mod = WithText()
    Requeue = WithText()
    Xor = WithText()

    # Punctuation
    ParClose = WithText()
    ParOpen = WithText()
    Semicolon = WithText()
    Colon = WithText()
    Comma = WithText()
    Doubledot = WithText()
    Dot = WithText()
    Diamond = WithText()
    Lte = WithText()
    Gte = WithText()
    Arrow = WithText()
    Equal = WithText()
    Lt = WithText()
    Gt = WithText()
    Plus = WithText()
    Minus = WithText()
    Power = WithText()
    Mult = WithText()
    Amp = WithText()
    Notequal = WithText()
    Divide = WithText()
    Tick = WithText()
    Pipe = WithText()
    Assign = WithText()
    LabelStart = WithText()
    LabelEnd = WithText()
    Target = WithText()

    # String and char literals
    String = WithText()
    Char = WithSymbol()

    With = WithText()
    Decimal = WithText()
    Integer = WithText()

    # Trivia
    Comment = WithTrivia()
    PrepLine = WithTrivia()
Ejemplo n.º 14
0
class Token(LexerToken):
    RshAssign = WithText()
    Is = WithText()
    Equals = WithText()
    Def = WithText()
    Lte = WithText()
    Raise = WithText()
    Mod = WithText()
    Yield = WithText()
    XorAssign = WithText()
    As = WithText()
    Lambda = WithText()
    Backtick = WithText()
    Try = WithText()
    Divide = WithText()
    Invert = WithText()
    Return = WithText()
    Assert = WithText()
    Xor = WithText()
    Break = WithText()
    Rbrack = WithText(end_ignore_layout=True)
    PowerAssign = WithText()
    Import = WithText()
    Exec = WithText()
    Comma = WithText()
    LPar = WithText(start_ignore_layout=True)
    Dot = WithText()
    Gte = WithText()
    FloordivAssign = WithText()
    Multiply = WithText()
    DivAssign = WithText()
    At = WithText()
    Assign = WithText()
    Floordiv = WithText()
    Notequal = WithText()
    MultAssign = WithText()
    ModAssign = WithText()
    Gt = WithText()
    Power = WithText()
    Amp = WithText()
    Not = WithText()
    Colon = WithText()
    Diamond = WithText()
    In = WithText()
    LCurl = WithText(start_ignore_layout=True)
    Class = WithText()
    OrAssign = WithText()
    Elif = WithText()
    And = WithText()
    Semicolon = WithText()
    AddAsign = WithText()
    Print = WithText()
    Lsh = WithText()
    Continue = WithText()
    While = WithText()
    Except = WithText()
    If = WithText()
    Else = WithText()
    Del = WithText()
    MinusAssign = WithText()
    Or = WithText()
    Minus = WithText()
    Lbrack = WithText(start_ignore_layout=True)
    AndAssign = WithText()
    RPar = WithText(end_ignore_layout=True)
    Global = WithText()
    For = WithText()
    From = WithText()
    Rsh = WithText()
    Finally = WithText()
    Pass = WithText()
    LshAssign = WithText()
    BinOr = WithText()
    Rcurl = WithText(end_ignore_layout=True)
    With = WithText()
    Plus = WithText()
    Lt = WithText()
    Number = WithText()
    String = WithText()
    Comment = WithTrivia()

    Identifier = WithSymbol()
Ejemplo n.º 15
0
class Token(LexerToken):  # type: ignore[misc]
    # Identifiers
    UnqualifiedIdentifier = WithSymbol()

    # Keywords
    Package = WithText()
    Is = WithText()
    If = WithText()
    End = WithText()
    Null = WithText()
    Type = WithText()
    Range = WithText()
    With = WithText()
    Mod = WithText()
    Message = WithText()
    Then = WithText()
    Sequence = WithText()
    Of = WithText()
    In = WithText()
    Not = WithText()
    New = WithText()
    For = WithText()
    When = WithText()
    Where = WithText()
    Use = WithText()
    All = WithText()
    Some = WithText()
    Generic = WithText()
    Session = WithText()
    Begin = WithText()
    Private = WithText()
    Return = WithText()
    Function = WithText()
    State = WithText()
    Transition = WithText()
    Goto = WithText()
    Exception = WithText()
    Renames = WithText()
    Channel = WithText()
    Readable = WithText()
    Writable = WithText()
    Desc = WithText()
    Append = WithText()
    Extend = WithText()
    Read = WithText()
    Write = WithText()
    Reset = WithText()
    HighOrderFirst = WithText()
    LowOrderFirst = WithText()

    # Aspect names
    First = WithText()
    Size = WithText()
    Last = WithText()
    ByteOrder = WithText()
    Checksum = WithText()
    ValidChecksum = WithText()
    HasData = WithText()
    Head = WithText()
    Opaque = WithText()
    Present = WithText()
    Valid = WithText()
    Initial = WithText()
    Final = WithText()

    # Symbols
    Dot = WithText()
    Comma = WithText()
    DoubleDot = WithText()
    Tick = WithText()
    Hash = WithText()
    Minus = WithText()
    Arrow = WithText()
    LPar = WithText()
    RPar = WithText()
    LBrack = WithText()
    RBrack = WithText()
    Exp = WithText()
    Mul = WithText()
    Div = WithText()
    Add = WithText()
    Sub = WithText()
    Eq = WithText()
    Neq = WithText()
    Leq = WithText()
    Lt = WithText()
    Le = WithText()
    Gt = WithText()
    Ge = WithText()
    And = WithText()
    Or = WithText()
    Ampersand = WithText()
    Semicolon = WithText()
    DoubleColon = WithText()
    Assignment = WithText()
    Colon = WithText()

    # Comment
    Comment = WithTrivia()

    # Numeric
    Numeral = WithText()

    # String
    StringLiteral = WithText()
Ejemplo n.º 16
0
class Token(LexerToken):
    Identifier = WithSymbol()
    All = WithText()

    # Keywords
    Abort = WithText()
    Else = WithText()
    New = WithText()
    Return = WithText()
    Abs = WithText()
    Elsif = WithText()
    Not = WithText()
    Reverse = WithText()
    End = WithText()
    Null = WithSymbol()
    Accept = WithText()
    Entry = WithText()
    Select = WithText()
    Access = WithText()
    Exception = WithText()
    Of = WithText()
    Separate = WithText()
    Exit = WithText()
    Or = WithText()
    Others = WithText()
    Subtype = WithText()
    And = WithText()
    For = WithText()
    Out = WithText()
    Array = WithText()
    Function = WithText()
    At = WithText()
    Generic = WithText()
    Package = WithText()
    Task = WithText()
    Begin = WithText()
    Goto = WithText()
    Pragma = WithText()
    Terminate = WithText()
    Body = WithText()
    Private = WithText()
    Then = WithText()
    If = WithText()
    Procedure = WithText()
    Type = WithText()
    Case = WithText()
    In = WithText()
    Constant = WithText()
    Is = WithText()
    Raise = WithText()
    Use = WithText()
    Declare = WithText()
    Range = WithText()
    Delay = WithText()
    Limited = WithText()
    Record = WithText()
    When = WithText()
    Delta = WithText()
    Loop = WithText()
    Rem = WithText()
    While = WithText()
    Digits = WithText()
    Renames = WithText()
    Do = WithText()
    Mod = WithText()
    Xor = WithText()

    # Punctuation
    ParClose = WithText()
    ParOpen = WithText()
    Semicolon = WithText()
    Colon = WithText()
    Comma = WithText()
    Doubledot = WithText()
    Dot = WithText()
    Diamond = WithText()
    Lte = WithText()
    Gte = WithText()
    Arrow = WithText()
    Equal = WithText()
    Lt = WithText()
    Gt = WithText()
    Plus = WithText()
    Minus = WithText()
    Power = WithText()
    Mult = WithText()
    Amp = WithText()
    Notequal = WithText()
    Divide = WithText()
    Tick = WithText()
    Pipe = WithText()
    Assign = WithText()
    LabelStart = WithText()
    LabelEnd = WithText()
    Target = WithText()

    # String and char literals
    String = WithText()
    Char = WithSymbol()

    With = WithText()
    Decimal = WithText()
    Integer = WithText()

    # Trivia
    Comment = WithTrivia()
    PrepLine = WithTrivia()
    Whitespace = WithTrivia()

    Alphanumericals = TokenFamily(
        Identifier, All, Abort, Else, New, Return, Abs, Elsif, Not, Reverse,
        End, Null, Accept, Entry, Select, Access, Exception, Of, Separate,
        Exit, Or, Others, Subtype, And, For, Out, Array, Function, At, Generic,
        Package, Task, Begin, Goto, Pragma, Terminate, Body, Private, Then, If,
        Procedure, Type, Case, In, Constant, Is, Raise, Use, Declare, Range,
        Delay, Limited, Record, When, Delta, Loop, Rem, While, Digits, Renames,
        Do, Mod, Xor, With, Decimal, Integer)
Ejemplo n.º 17
0
class Token(LexerToken):

    # Keywords
    Config = WithText()
    Menuconfig = WithText()
    Choice = WithText()
    Endchoice = WithText()
    Comment = WithText()
    Menu = WithText()
    Endmenu = WithText()
    If = WithText()
    Endif = WithText()
    Source = WithText()
    Mainmenu = WithText()

    Depends = WithText()
    On = WithText()
    Help = WithText()
    Prompt = WithText()
    Default = WithText()
    Select = WithText()
    Imply = WithText()
    Range = WithText()
    Visible = WithText()

    Option = WithText()
    OptDefConfigList = WithText()
    OptModules = WithText()
    OptEnv = WithText()
    OptAllNoConfY = WithText()

    # The help text is terminated by an empty line
    EmptyLine = WithText()

    String = WithText()

    # Types
    Tristate = WithText()
    Bool = WithText()
    DefTristate = WithText()
    DefBool = WithText()
    Int = WithText()
    Hex = WithText()
    StringType = WithText()

    Identifier = WithSymbol()
    Number = WithSymbol()
    HexNumber = WithSymbol()
    Yes = WithSymbol()
    No = WithSymbol()
    Module = WithSymbol()

    LPar = WithText()
    RPar = WithText()
    Equal = WithText()
    Different = WithText()
    Not = WithText()
    Or = WithText()
    And = WithText()