Beispiel #1
0
class LanguageOfZpoolStatuses(Grammar):
    grammar = (REPEAT(ZpoolStatus, OPTIONAL(WORD('\n'))), )
Beispiel #2
0
class ConfigDiskStatusText(Grammar):
    grammar = (REPEAT(
        SpaceSeperator,
        WORD(string.ascii_letters + string.punctuation + string.digits)), )
Beispiel #3
0
class ConfigSpareState(Grammar):
    grammar = (
        OR('AVAIL', 'INUSE'),
        SpaceSeperator,
        OPTIONAL(REPEAT(SpaceSeperator, WORD(string.ascii_letters))),
    )
Beispiel #4
0
class TypeCharacters(Grammar):
    grammar = WORD("A-Za-z\u005F")
Beispiel #5
0
class ConfigPoolName(Grammar):
    grammar = (WORD(string.ascii_letters + string.digits))
Beispiel #6
0
class PositiveInteger (Integer):
  grammar = (WORD('0-9'))
Beispiel #7
0
class Integer(Grammar):
    grammar = OR(L('0'), (OPTIONAL(L('-')), WORD('1-9', '0-9')))
Beispiel #8
0
class Label(Grammar):
    grammar = (G(b'_("', WORD(b'^"'), b'")') | G(b"_('", WORD(b"^'"), b"')")
               | Variable)
Beispiel #9
0
class FieldWord(Grammar):
    grammar = (WORD(string.ascii_letters + string.digits + string.punctuation))
Beispiel #10
0
class FirstParameterCharacter(Grammar):
    grammar = OR(
        WORD("A-Za-z", max=1),
        # The underscore character and question mark
        "\u005F",
        "?")
Beispiel #11
0
class Variable(Grammar):
    grammar = (G(b'"', WORD(b'^"'), b'"') | G(b"'", WORD(b"^'"), b"'")
               | WORD(b"a-zA-Z_", b"a-zA-Z0-9_."))
Beispiel #12
0
class HexadecimalDigit(Grammar):
    grammar = WORD('0-9a-fA-F', max=1)
Beispiel #13
0
class DecimalDigits(Grammar):
    grammar = WORD('0-9')
Beispiel #14
0
class VariableCharacters(Grammar):
    grammar = WORD("A-Za-z0-9?\u005F")
Beispiel #15
0
class SpaceSeperator(Grammar):
    grammar_greedy = True
    grammar = (WORD(' '), )
Beispiel #16
0
class ConfigCounters(Grammar):
    grammar = (WORD(string.digits), SpaceSeperator, WORD(string.digits),
               SpaceSeperator, WORD(string.digits))
Beispiel #17
0
class Integer (Terminal):
  grammar = (OPTIONAL('-'), WORD('0-9'))

  def grammar_elem_init(self, sessiondata):
    self.value = int(self.string)
Beispiel #18
0
class ConfigVDevName(Grammar):
    grammar = (OR('raidz1', 'raidz2', 'raidz3', 'mirror',
                  'spare'), '-', WORD(string.digits))
Beispiel #19
0
class Identifier(Grammar):
    grammar = WORD('a-zA-Z', 'a-zA-Z0-9_')
Beispiel #20
0
class ConfigDiskName(Grammar):
    grammar = (WORD(string.ascii_letters + string.digits + "/"))
Beispiel #21
0
class Float(Grammar):
    grammar = (OPTIONAL(L('-')), WORD('1-9', '0-9'), L('.'), WORD('0-9'))
Beispiel #22
0
class TypeCharacter(Grammar):
    grammar = OR(
        WORD("A-Za-z", max=1),
        WORD("\u005F"),
    )