Ejemplo n.º 1
0
def start_one(rule):
    rule | star(ID)
Ejemplo n.º 2
0
def start_four(rule):
    rule | star(four_sub)
Ejemplo n.º 3
0
def section(rule):
    rule | (head, star(_or(define, NEWLINE)))
    rule.astAttrs = {'head':head, 'body':[define]}
Ejemplo n.º 4
0
def value(rule):
    rule | (ID, star('-', _or(INT, ID)))
    rule.dont_ignore = True
Ejemplo n.º 5
0
def start(rule):
    rule | star(_or(section, NEWLINE))
    rule.astAttrs = {'sections':[section]}
Ejemplo n.º 6
0
def value(rule):
    rule | (star(_or(*not_newline)), _or(EOF, (NEWLINE, [INDENT, star(star(_or(*not_newline)), _or(NEWLINE, EOF)), _or(DEDENT, EOF)])))
    rule.astAttrs = {'text':list(not_newline)+[NEWLINE]}
Ejemplo n.º 7
0
def at(rule):
    rule | (no_ignore("@", ID), _or(STRING, SSTRING, star(_not(_or(";", "}")))), ";")
    rule | star(_not(_or(";", "}")))
Ejemplo n.º 8
0
def start(rule):
    rule | (RESERVED, star(ID, RESERVED))
Ejemplo n.º 9
0
def at(rule):
    rule | (no_ignore('@', ID), _or(STRING, SSTRING, star(_not(_or(';','}')))), ';')
    rule | star(_not(_or(';','}')))