Lines Matching refs:symbols
78 error_count = 3 # Number of symbols that must be shifted to leave recovery mode
169 # This class is used to hold non-terminal grammar symbols during parsing.
284 lookaheadstack = [ ] # Stack of lookahead symbols
318 symstack = [ ] # Stack of grammar symbols
599 lookaheadstack = [ ] # Stack of lookahead symbols
629 symstack = [ ] # Stack of grammar symbols
871 lookaheadstack = [ ] # Stack of lookahead symbols
901 symstack = [ ] # Stack of grammar symbols
1139 # prod - A list of symbols on the right side ['expr','PLUS','term']
1148 # len - Length of the production (number of symbols on right hand side)
1149 # usyms - Set of unique symbols found in the production
1168 # Create a list of unique production symbols used in the production
1257 # prod - A list of symbols on the right side ['expr','.', 'PLUS','term']
1263 # lookaheads - LALR lookahead symbols for this item
1264 # len - Length of the production (number of symbols on right hand side)
1294 # Return the rightmost terminal from a list of symbols. Used in add_production()
1296 def rightmost_terminal(symbols, terminals):
1297 i = len(symbols) - 1
1299 if symbols[i] in terminals:
1300 return symbols[i]
1326 self.Terminals = { } # A dictionary mapping the names of terminal symbols to a
1337 self.First = { } # A dictionary of precomputed FIRST(x) symbols
1339 self.Follow = { } # A dictionary of precomputed FOLLOW(x) symbols
1379 # The production rule is supplied as a list of symbols. For example,
1381 # symbols ['expr','PLUS','term'].
1386 # A variety of error checks are performed to make sure production symbols
1485 # Find all of the nonterminal symbols that can't be reached from the starting
1491 # Mark all symbols that are reachable from a symbol s
1539 # Production p terminates iff all of its rhs symbols terminate.
1579 # Find all symbols that were used the grammar, but not defined as tokens or
1597 # a list of all symbols.
1642 # Compute the value of FIRST1(beta) where beta is a tuple of symbols.
1654 # Add all the non-<empty> symbols of First[x] to the result.
1666 # We don't have to consider any further symbols in beta.
1679 # Compute the value of FIRST1(X) for all symbols
1697 # Then propagate symbols until no change:
1715 # follow set is the set of all symbols that might follow a given
2044 # Loop over the items in C and each grammar symbols
2050 # Collect all of the symbols that could possibly be in the goto(I,X) sets
2312 # Attaches the lookahead symbols to grammar rules.
2697 # This function returns a dictionary containing all of the symbols defined within
2976 # Check for non-empty symbols
3128 # Set the grammar start symbols