Back to index

enigmail  1.4.3
Public Member Functions | Public Attributes
ply.yacc.YaccProduction Class Reference

List of all members.

Public Member Functions

def __init__
def __getitem__
def __setitem__
def __getslice__
def __len__
def lineno
def set_lineno
def linespan
def lexpos
def lexspan
def error

Public Attributes

 slice
 stack
 lexer
 parser

Detailed Description

Definition at line 191 of file yacc.py.


Constructor & Destructor Documentation

def ply.yacc.YaccProduction.__init__ (   self,
  s,
  stack = None 
)

Definition at line 192 of file yacc.py.

00192 
00193     def __init__(self,s,stack=None):
00194         self.slice = s
00195         self.stack = stack
00196         self.lexer = None
        self.parser= None

Member Function Documentation

def ply.yacc.YaccProduction.__getitem__ (   self,
  n 
)

Definition at line 197 of file yacc.py.

00197 
00198     def __getitem__(self,n):
00199         if n >= 0: return self.slice[n].value
00200         else: return self.stack[n].value

def ply.yacc.YaccProduction.__getslice__ (   self,
  i,
  j 
)

Definition at line 204 of file yacc.py.

00204 
00205     def __getslice__(self,i,j):
00206         return [s.value for s in self.slice[i:j]]

Definition at line 207 of file yacc.py.

00207 
00208     def __len__(self):
00209         return len(self.slice)

def ply.yacc.YaccProduction.__setitem__ (   self,
  n,
  v 
)

Definition at line 201 of file yacc.py.

00201 
00202     def __setitem__(self,n,v):
00203         self.slice[n].value = v

Definition at line 229 of file yacc.py.

00229 
00230     def error(self):
00231        raise SyntaxError
00232 
00233 
00234 # -----------------------------------------------------------------------------
00235 #                               == LRParser ==
00236 #
00237 # The LR Parsing engine.
00238 # -----------------------------------------------------------------------------

def ply.yacc.YaccProduction.lexpos (   self,
  n 
)

Definition at line 221 of file yacc.py.

00221 
00222     def lexpos(self,n):
00223         return getattr(self.slice[n],"lexpos",0)

Here is the caller graph for this function:

def ply.yacc.YaccProduction.lexspan (   self,
  n 
)

Definition at line 224 of file yacc.py.

00224 
00225     def lexspan(self,n):
00226         startpos = getattr(self.slice[n],"lexpos",0)
00227         endpos = getattr(self.slice[n],"endlexpos",startpos)
00228         return startpos,endpos

def ply.yacc.YaccProduction.lineno (   self,
  n 
)

Definition at line 210 of file yacc.py.

00210 
00211     def lineno(self,n):
00212         return getattr(self.slice[n],"lineno",0)

Here is the caller graph for this function:

def ply.yacc.YaccProduction.linespan (   self,
  n 
)

Definition at line 216 of file yacc.py.

00216 
00217     def linespan(self,n):
00218         startline = getattr(self.slice[n],"lineno",0)
00219         endline = getattr(self.slice[n],"endlineno",startline)
00220         return startline,endline

def ply.yacc.YaccProduction.set_lineno (   self,
  n,
  lineno 
)

Definition at line 213 of file yacc.py.

00213 
00214     def set_lineno(self,n,lineno):
00215         self.slice[n].lineno = lineno


Member Data Documentation

Definition at line 195 of file yacc.py.

Definition at line 196 of file yacc.py.

Definition at line 193 of file yacc.py.

Definition at line 194 of file yacc.py.


The documentation for this class was generated from the following file: