Lines Matching refs:alt

61 	public void setTokenPrec(GrammarAST t, int alt) {
63 tokenToPrec.put(ttype, alt);
77 if ( altAssociativity.get(alt)!=null && altAssociativity.get(alt)!=assoc ) {
78 ErrorManager.error(ErrorManager.MSG_ALL_OPS_NEED_SAME_ASSOC, alt);
80 altAssociativity.put(alt, assoc);
82 //System.out.println("op " + alt + ": " + t.getText()+", assoc="+assoc);
86 public void binaryAlt(GrammarAST altTree, GrammarAST rewriteTree, int alt) {
94 int nextPrec = nextPrecedence(alt);
102 altText += "{}"; // add empty alt to prevent pred hoisting
107 binaryAlts.put(alt, altText + (rewriteText != null ? " " + rewriteText : ""));
108 //System.out.println("binaryAlt " + alt + ": " + altText + ", rewrite=" + rewriteText);
113 public void ternaryAlt(GrammarAST altTree, GrammarAST rewriteTree, int alt) {
120 int nextPrec = nextPrecedence(alt);
128 altText += "{}"; // add empty alt to prevent pred hoisting
133 ternaryAlts.put(alt, altText + (rewriteText != null ? " " + rewriteText : ""));
134 //System.out.println("ternaryAlt " + alt + ": " + altText + ", rewrite=" + rewriteText);
138 public void prefixAlt(GrammarAST altTree, GrammarAST rewriteTree, int alt) {
144 int nextPrec = precedence(alt);
152 altText += "{}"; // add empty alt to prevent pred hoisting
160 //System.out.println("prefixAlt " + alt + ": " + altText + ", rewrite=" + rewriteText);
164 public void suffixAlt(GrammarAST altTree, GrammarAST rewriteTree, int alt) {
175 suffixAlts.put(alt, altText + (rewriteText != null ? " " + rewriteText : ""));
176 // System.out.println("suffixAlt " + alt + ": " + altText + ", rewrite=" + rewriteText);
180 public void otherAlt(GrammarAST altTree, GrammarAST rewriteTree, int alt) {
189 //System.out.println("otherAlt " + alt + ": " + altText + ", rewrite=" + rewriteText);
225 for (int alt : opPrecRuleAlts.keySet()) {
226 String altText = opPrecRuleAlts.get(alt);
230 predST.add("opPrec", precedence(alt));
233 altST.add("alt", altText);
310 public int precedence(int alt) {
311 return numAlts-alt+1;
314 public int nextPrecedence(int alt) {
315 int p = precedence(alt);
316 if ( altAssociativity.get(alt)==ASSOC.left ) p++;