Esempio n. 1
0
class ComparisonArgumentExpression(Grammar):
    grammar = LIST_OF(AdditiveArgumentExpression,
                      sep=(ComparisonOperator, OPTIONAL(NewLines)))
Esempio n. 2
0
class CreateKeyspaceStatement(Grammar):
    grammar = (CK('create'), CK('keyspace'), Name, CK('with'), LIST_OF((OptionName, OP('='), OptionValue), sep=CK('and')))
Esempio n. 3
0
class SelectWhereClause(Grammar):
    grammar = OR(LIST_OF(Relation, sep=CK('and')), (Term, CK('in'), LPar, LIST_OF(Term), RPar))
Esempio n. 4
0
class UpdateStatement(Grammar):
    grammar = (CK('update'), Name, OPTIONAL(UsingClause), CK('set'), LIST_OF(Assignment), CK('where'), UpdateWhereClause)
Esempio n. 5
0
class BatchStatement(Grammar):
    grammar = (CK('begin'), CK('batch'), OPTIONAL(UsingClause), LIST_OF(BatchStatementMember, sep=';'), CK('apply'), CK('batch'))
Esempio n. 6
0
class ElseIfClauses(Grammar):
    grammar = LIST_OF(ElseIfClause, sep=OPTIONAL(WHITESPACE))
Esempio n. 7
0
class InsertStatement(Grammar):
    grammar = (CK('insert'), CK('into'), Name, LPar, LIST_OF(Term), RPar, CK('values'), LPar, LIST_OF(Term), RPar, OPTIONAL(UsingClause))
Esempio n. 8
0
class RangeExpression(Grammar):
    grammar = LIST_OF(ArrayLiteralExpression, sep=("..", OPTIONAL(NewLines)))
Esempio n. 9
0
class FormatExpression(Grammar):
    grammar = LIST_OF(RangeExpression,
                      sep=(OPTIONAL(WHITESPACE), FormatOperator,
                           OPTIONAL(WHITESPACE), OPTIONAL(NewLines)))
Esempio n. 10
0
class HashLiteralBody(Grammar):
    grammar = LIST_OF(HashEntry,
                      sep=(OPTIONAL(WHITESPACE),
                           OPTIONAL(HashLiteralBodyPrime),
                           OPTIONAL(WHITESPACE)))
Esempio n. 11
0
class ArrayLiteralExpression(Grammar):
    grammar = LIST_OF(UnaryExpression,
                      sep=(OPTIONAL(WHITESPACE), ",", OPTIONAL(WHITESPACE)))
Esempio n. 12
0
class ArgumentExpressionList(Grammar):
    grammar_whitespace_mode = "optional"
    grammar = LIST_OF(LogicalArgumentExpression,
                      sep=(OPTIONAL(NewLines), ",", OPTIONAL(WHITESPACE)))
Esempio n. 13
0
class LogicalArgumentExpression(Grammar):
    grammar = LIST_OF(BitwiseArgumentExpression,
                      sep=(OR(RE_LITERAL("-and"), RE_LITERAL("-or"),
                              RE_LITERAL("-xor")), OPTIONAL(NewLines)))
Esempio n. 14
0
class BitwiseArgumentExpression(Grammar):
    grammar = LIST_OF(ComparisonArgumentExpression,
                      sep=(OR(RE_LITERAL("-band"), RE_LITERAL("-bor"),
                              RE_LITERAL("-bxor")), OPTIONAL(NewLines)))
Esempio n. 15
0
class CommandElements(Grammar):
    grammar = LIST_OF(CommandElement, sep=OPTIONAL(WHITESPACE))
Esempio n. 16
0
class MultiplicativeExpression(Grammar):
    grammar = LIST_OF(FormatExpression,
                      sep=((OPTIONAL(WHITESPACE), OR("*", "/", "%"),
                            OPTIONAL(WHITESPACE)), OPTIONAL(NewLines)))
Esempio n. 17
0
class DataCommandsList(Grammar):
    grammar = LIST_OF(DataCommand,
                      sep=(OPTIONAL(WHITESPACE), ",", OPTIONAL(WHITESPACE)))
Esempio n. 18
0
class AdditiveExpression(Grammar):
    grammar = LIST_OF(MultiplicativeExpression,
                      sep=(OPTIONAL(WHITESPACE), OR("+", Dash),
                           OPTIONAL(WHITESPACE), OPTIONAL(NewLines)))
Esempio n. 19
0
class UsingClause(Grammar):
    grammar = (CK('using'), LIST_OF(UsingOption, sep=CK('and')))
Esempio n. 20
0
class ComparisonExpression(Grammar):
    grammar = LIST_OF(AdditiveExpression,
                      sep=(OPTIONAL(WHITESPACE), ComparisonOperator,
                           OPTIONAL(WHITESPACE), OPTIONAL(NewLines)))
Esempio n. 21
0
class UpdateWhereClause(Grammar):
    grammar = OR((Term, OP('='), Term), (Term, CK('in'), LPar, LIST_OF(Term), RPar))
Esempio n. 22
0
class BitwiseExpression(Grammar):
    grammar = LIST_OF(ComparisonExpression,
                      sep=(OPTIONAL(WHITESPACE),
                           OR(RE_LITERAL("-band"), RE_LITERAL("-bor"),
                              RE_LITERAL("-bxor")), OPTIONAL(WHITESPACE),
                           OPTIONAL(NewLines)))
Esempio n. 23
0
class DeleteStatement(Grammar):
    grammar = (CK('delete'), OPTIONAL(LIST_OF(Term)), CK('from'), Name, OPTIONAL(CK('using'), LIST_OF(DeleteOption, sep=CK('and'))), CK('where'), UpdateWhereClause)
Esempio n. 24
0
class LogicalExpression(Grammar):
    grammar = LIST_OF(BitwiseExpression,
                      sep=(OPTIONAL(WHITESPACE),
                           OR(RE_LITERAL("-and"), RE_LITERAL("-or"),
                              RE_LITERAL("-xor")), OPTIONAL(WHITESPACE),
                           OPTIONAL(NewLines)))
Esempio n. 25
0
class OptionName(Grammar):
    grammar = LIST_OF(Identifier, sep=':')
Esempio n. 26
0
class AttributeArguments(Grammar):
    grammar = LIST_OF(AttributeArgument,
                      sep=(OPTIONAL(WHITESPACE), ",", OPTIONAL(WHITESPACE)))
Esempio n. 27
0
class CreateColumnFamilyStatement(Grammar):
    grammar = (
        CK('create'), CK('columnfamily'), Name, LPar, Term, StorageType, CK('primary'), CK('key'),
        ZERO_OR_MORE((OP(','), Term, StorageType)), RPar,
        OPTIONAL(CK('with'), LIST_OF((Identifier, OP('='), ColumFamilyOptionValue), sep=CK('and')))
    )
Esempio n. 28
0
class AttributeList(Grammar):
    grammar = LIST_OF(Attribute, sep=OPTIONAL(WHITESPACE))
Esempio n. 29
0
class WhatToSelect(Grammar):
    grammar = OR(
        (OPTIONAL(CK('first'), Integer, OPTIONAL(CK('reversed'))), ColumnRange),
        (FN('count'), LPar, CountTarget, RPar), LIST_OF(Term)
    )
Esempio n. 30
0
class AdditiveArgumentExpression(Grammar):
    grammar = LIST_OF(MultiplicativeArgumentExpression,
                      sep=(OR("+", Dash), OPTIONAL(NewLines)))