# -*- Mode: Python -*-
import sys
import Parsing
T = Parsing.Token
NT = Parsing.Nonterm
class t_IDENT (T):
"%token IDENT [p1]"
class t_rparen (T):
"%token rparen [p1]"
class t_STRING (T):
"%token STRING [p1]"
class t_NEWLINE (T):
"%token NEWLINE [p1]"
class t_lbracket (T):
"%token lbracket [p1]"
class t_colon (T):
"%token colon [p1]"
class t_vbar (T):
"%token vbar [p1]"
class t_lparen (T):
"%token lparen [p1]"
class t_plus (T):
"%token plus [p1]"
class t_rbracket (T):
"%token rbracket [p1]"
class t_splat (T):
"%token splat [p1]"
class p1 (Parsing.Precedence):
"%right p1"
class element (NT):
"%nonterm"
def r_0 (self, *args):
"%reduce group [p1]"
def r_1 (self, *args):
"%reduce IDENT [p1]"
def r_2 (self, *args):
"%reduce STRING [p1]"
class items (NT):
"%nonterm"
def r_0 (self, *args):
"%reduce items item [p1]"
def r_1 (self, *args):
"%reduce item [p1]"
class group (NT):
"%nonterm"
def r_0 (self, *args):
"%reduce lparen alts rparen [p1]"
class rule (NT):
"%nonterm"
def r_0 (self, *args):
"%reduce IDENT colon alts NEWLINE [p1]"
def r_1 (self, *args):
"%reduce NEWLINE [p1]"
class item (NT):
"%nonterm"
def r_0 (self, *args):
"%reduce optional [p1]"
def r_1 (self, *args):
"%reduce kleene [p1]"
class rules (NT):
"%start"
def r_0 (self, *args):
"%reduce rules rule [p1]"
def r_1 (self, *args):
"%reduce rule [p1]"
class optional (NT):
"%nonterm"
def r_0 (self, *args):
"%reduce lbracket alts rbracket [p1]"
class kleene (NT):
"%nonterm"
def r_0 (self, *args):
"%reduce element [p1]"
def r_1 (self, *args):
"%reduce element splat [p1]"
def r_2 (self, *args):
"%reduce element plus [p1]"
class alts2 (NT):
"%nonterm"
def r_0 (self, *args):
"%reduce alts2 vbar items [p1]"
def r_1 (self, *args):
"%reduce [p1]"
class alts (NT):
"%nonterm"
def r_0 (self, *args):
"%reduce items alts2 [p1]"
spec = Parsing.Spec (sys.modules[__name__], skinny=False, logFile="meta1.log", verbose=True)