Home | History | Annotate | Download | only in ply

Lines Matching refs:prodname

1390     def add_production(self,prodname,syms,func=None,file='',line=0):
1392 if prodname in self.Terminals:
1393 raise GrammarError("%s:%d: Illegal rule name '%s'. Already defined as a token" % (file,line,prodname))
1394 if prodname == 'error':
1395 raise GrammarError("%s:%d: Illegal rule name '%s'. error is a reserved word" % (file,line,prodname))
1396 if not _is_identifier.match(prodname):
1397 raise GrammarError("%s:%d: Illegal rule name '%s'" % (file,line,prodname))
1405 raise GrammarError("%s:%d: Literal token %s in rule '%s' may only be a single character" % (file,line,s, prodname))
1413 raise GrammarError("%s:%d: Illegal name '%s' in rule '%s'" % (file,line,s, prodname))
1434 map = "%s -> %s" % (prodname,syms)
1442 if not prodname in self.Nonterminals:
1443 self.Nonterminals[prodname] = [ ]
1455 p = Production(pnumber,prodname,syms,prodprec,func,file,line)
1461 self.Prodnames[prodname].append(p)
1463 self.Prodnames[prodname] = [ p ]
2737 prodname = lastp
2740 prodname = p[0]
2741 lastp = prodname
2747 grammar.append((file,dline,prodname,syms))
3120 file, line, prodname, syms = gram
3122 grammar.add_production(prodname,syms,funcname,file,line)