Lines Matching full:production
287 … prod = self.productions # Local reference to production list (to avoid lookup on self.)
288 pslice = YaccProduction(None) # Production object passed to grammar rules
321 pslice.stack = symstack # Put in the production
377 # reduce a symbol on the stack, emit a production
382 # Get production function
384 sym.type = pname # Production name
602 … prod = self.productions # Local reference to production list (to avoid lookup on self.)
603 pslice = YaccProduction(None) # Production object passed to grammar rules
632 pslice.stack = symstack # Put in the production
674 # reduce a symbol on the stack, emit a production
679 # Get production function
681 sym.type = pname # Production name
874 … prod = self.productions # Local reference to production list (to avoid lookup on self.)
875 pslice = YaccProduction(None) # Production object passed to grammar rules
904 pslice.stack = symstack # Put in the production
946 # reduce a symbol on the stack, emit a production
951 # Get production function
953 sym.type = pname # Production name
1129 # class Production:
1131 # This class stores the raw information about a single production or grammar rule.
1138 # name - Name of the production. For example 'expr'
1140 # prec - Production precedence level
1141 # number - Production number.
1143 # file - File where production function is defined
1144 # lineno - Line number where production function is defined
1148 # len - Length of the production (number of symbols on right hand side)
1149 # usyms - Set of unique symbols found in the production
1152 class Production(object): class
1166 self.len = len(self.prod) # Length of the production
1168 # Create a list of unique production symbols used in the production
1174 # List of all LR items for the production
1188 return "Production("+str(self)+")"
1199 # Return the nth lr_item from the production (or None if at the end)
1216 # Bind the production function name to a callable
1221 # This class serves as a minimal standin for Production objects when
1239 # Bind the production function name to a callable
1248 # This class represents a specific stage of parsing a production rule. For
1256 # name - Name of the production. For example 'expr'
1258 # number - Production number.
1264 # len - Length of the production (number of symbols on right hand side)
1376 # Given an action function, this function assembles a production rule and
1379 # The production rule is supplied as a list of symbols. For example,
1380 # a rule such as 'expr : expr PLUS term' has a production name of 'expr' and
1386 # A variety of error checks are performed to make sure production symbols
1440 # From this point on, everything is valid. Create a new Production instance
1445 # Add the production number to Terminals and Nonterminals
1454 # Create a production and add it to the list of productions
1455 p = Production(pnumber,prodname,syms,prodprec,func,file,line)
1469 # Sets the starting symbol and creates the augmented grammar. Production
1478 self.Productions[0] = Production(0,"S'",[start])
1539 # Production p terminates iff all of its rhs symbols terminate.
1543 # so production p does not terminate.
1549 # so production p terminates.
1581 # and prod is the production where the symbol was used.
1739 # Here is the production set
1743 # Okay. We got a non-terminal in a production
1768 # is built for each production. For example:
1869 # Bind all production function names to callable objects in pdict
1955 self.lr_productions = grammar.Productions # Copy of grammar Production array
2090 # an empty production.
2187 # For example, starting with a production "N : . A B C", we run it forward
2224 # Okay, we have a name match. We now follow the production all the way
2237 # production derives empty
2251 # When we get here, j is the final state, now we have to locate the production
2256 # This look is comparing a production ". A B C" with "A B C ."
2369 actionp = { } # Action production array (temporary)
2384 # Loop over each production in I
2403 # We are at the end of a production. Reduce!
2643 # Write production table
2720 # This takes a raw grammar rule string and parses it into production data