示例#1
0
 def n_uplet():
     return '(', subterm, ap.OneOrMore(',', subterm), ')'
示例#2
0
 def comment_shell_block():
     return arpeggio.OneOrMore(
         (GrammarBasic.comment_shell, GrammarBasic.newline))
示例#3
0
 def selection_body():  return ap.Optional(number), '{', ap.OneOrMore(expression), '}', ap.Optional(number), ':-', body
 def selection():  return [selection_body, selection_nobody]
示例#4
0
    def program():      return ap.OneOrMore([text, multiline_comment, comment, asp_code, rule_end])

    return program
示例#5
0
 def selection():
     return ap.Optional(number), '{', ap.OneOrMore(
         expression), '}', ap.Optional(number)
示例#6
0
 def program():    return ap.OneOrMore(instruction, '.')
 return program
示例#7
0
 def program():
     return ap.OneOrMore([meta, constraint, multirule, rule, head], '.')
示例#8
0
 def multirule():
     return (namedterm, ap.OneOrMore(';', namedterm)), ':-', body
示例#9
0
def oneLineTag():
    return (beginOneLineTag, ar.OneOrMore(tag, sep=separator),
            ar.Optional(':', textUntilNewLine))
示例#10
0
def tagSelected():
    return (beginTag, ar.OneOrMore(tag, sep=separator), ar.Optional(':', text),
            [endTag, ar.EOF])
示例#11
0
def tagOptions():
    return ar.OneOrMore(space, keyWords, space, sep=",", skipw=True)