/******************************************************************
 * File: ps20_parser.cpp
 *
 * This file was automatically generated by CppCC Version 0.0.5
 * DO NOT EDIT MANUALLY
 ******************************************************************/



#include "ps20_parser.hpp"

void ps20::ps20_parser::main ()
     throw (ScanException, ParseException)
{
  while (__la_0_(1000000000)) {
    instruction();
    consumeToken(ps20_token::EOL);
    while ((scanner.la()->id == ps20_token::EOL)) {
      consumeToken(ps20_token::EOL);
    }
    {newInstruction();}

  }
  try {
    if ((scanner.la()->id == ps20_token::PS_2_0) || (scanner.la()->id == ps20_token::DCL) || (scanner.la()->id == ps20_token::DCL_2D) || (scanner.la()->id == ps20_token::DCL_CUBE) || (scanner.la()->id == ps20_token::DCL_VOLUME) || (scanner.la()->id == ps20_token::DEF) || (scanner.la()->id == ps20_token::ABS) || (scanner.la()->id == ps20_token::ADD) || (scanner.la()->id == ps20_token::CMP) || (scanner.la()->id == ps20_token::CRS) || (scanner.la()->id == ps20_token::DP2ADD) || (scanner.la()->id == ps20_token::DP3) || (scanner.la()->id == ps20_token::DP4) || (scanner.la()->id == ps20_token::EXP) || (scanner.la()->id == ps20_token::FRC) || (scanner.la()->id == ps20_token::LOG) || (scanner.la()->id == ps20_token::LRP) || (scanner.la()->id == ps20_token::M3X2) || (scanner.la()->id == ps20_token::M3X3) || (scanner.la()->id == ps20_token::M3X4) || (scanner.la()->id == ps20_token::M4X3) || (scanner.la()->id == ps20_token::M4X4) || (scanner.la()->id == ps20_token::MAD) || (scanner.la()->id == ps20_token::MAX) || (scanner.la()->id == ps20_token::MIN) || (scanner.la()->id == ps20_token::MOV) || (scanner.la()->id == ps20_token::MUL) || (scanner.la()->id == ps20_token::NOP) || (scanner.la()->id == ps20_token::NRM) || (scanner.la()->id == ps20_token::POW) || (scanner.la()->id == ps20_token::RCP) || (scanner.la()->id == ps20_token::RSQ) || (scanner.la()->id == ps20_token::SINCOS) || (scanner.la()->id == ps20_token::SUB) || (scanner.la()->id == ps20_token::TEXKILL) || (scanner.la()->id == ps20_token::TEXLD) || (scanner.la()->id == ps20_token::TEXLDB) || (scanner.la()->id == ps20_token::TEXLDP)) {
      instruction();
    } else { 
       /* lambda */
    }
  } catch (ScanException&)
 {throw swShader::Error("Syntax error");;

  } catch (ParseException&)
 {throw swShader::Error("Parsing error");;

  } catch (swShader::Error &error)
 {throw error;;

  } catch (...)
 {throw swShader::INTERNAL_ERROR;;

  }
}


void ps20::ps20_parser::instruction ()
     throw (ScanException, ParseException)
{
			m = swShader::Instruction::INVALID;
			x = swShader::Instruction::_NONE;
			d = swShader::voidOperand;
			s0 = swShader::voidOperand;
			s1 = swShader::voidOperand;
			s2 = swShader::voidOperand;
			s3 = swShader::voidOperand;
		;

  try {
    if ((scanner.la()->id == ps20_token::ABS)) {
      absInstruction();
    } else { 
      if ((scanner.la()->id == ps20_token::ADD)) {
        addInstruction();
      } else { 
        if ((scanner.la()->id == ps20_token::CMP)) {
          cmpInstruction();
        } else { 
          if ((scanner.la()->id == ps20_token::CRS)) {
            crsInstruction();
          } else { 
            if ((scanner.la()->id == ps20_token::DCL)) {
              dclInstruction();
            } else { 
              if ((scanner.la()->id == ps20_token::DCL_2D)) {
                dcl_2dInstruction();
              } else { 
                if ((scanner.la()->id == ps20_token::DCL_CUBE)) {
                  dcl_cubeInstruction();
                } else { 
                  if ((scanner.la()->id == ps20_token::DCL_VOLUME)) {
                    dcl_volumeInstruction();
                  } else { 
                    if ((scanner.la()->id == ps20_token::DEF)) {
                      defInstruction();
                    } else { 
                      if ((scanner.la()->id == ps20_token::DP2ADD)) {
                        dp2addInstruction();
                      } else { 
                        if ((scanner.la()->id == ps20_token::DP3)) {
                          dp3Instruction();
                        } else { 
                          if ((scanner.la()->id == ps20_token::DP4)) {
                            dp4Instruction();
                          } else { 
                            if ((scanner.la()->id == ps20_token::EXP)) {
                              expInstruction();
                            } else { 
                              if ((scanner.la()->id == ps20_token::FRC)) {
                                frcInstruction();
                              } else { 
                                if ((scanner.la()->id == ps20_token::LOG)) {
                                  logInstruction();
                                } else { 
                                  if ((scanner.la()->id == ps20_token::LRP)) {
                                    lrpInstruction();
                                  } else { 
                                    if ((scanner.la()->id == ps20_token::M3X2)) {
                                      m3x2Instruction();
                                    } else { 
                                      if ((scanner.la()->id == ps20_token::M3X3)) {
                                        m3x3Instruction();
                                      } else { 
                                        if ((scanner.la()->id == ps20_token::M3X4)) {
                                          m3x4Instruction();
                                        } else { 
                                          if ((scanner.la()->id == ps20_token::M4X3)) {
                                            m4x3Instruction();
                                          } else { 
                                            if ((scanner.la()->id == ps20_token::M4X4)) {
                                              m4x4Instruction();
                                            } else { 
                                              if ((scanner.la()->id == ps20_token::MAD)) {
                                                madInstruction();
                                              } else { 
                                                if ((scanner.la()->id == ps20_token::MAX)) {
                                                  maxInstruction();
                                                } else { 
                                                  if ((scanner.la()->id == ps20_token::MIN)) {
                                                    minInstruction();
                                                  } else { 
                                                    if ((scanner.la()->id == ps20_token::MOV)) {
                                                      movInstruction();
                                                    } else { 
                                                      if ((scanner.la()->id == ps20_token::MUL)) {
                                                        mulInstruction();
                                                      } else { 
                                                        if ((scanner.la()->id == ps20_token::NOP)) {
                                                          nopInstruction();
                                                        } else { 
                                                          if ((scanner.la()->id == ps20_token::NRM)) {
                                                            nrmInstruction();
                                                          } else { 
                                                            if ((scanner.la()->id == ps20_token::POW)) {
                                                              powInstruction();
                                                            } else { 
                                                              if ((scanner.la()->id == ps20_token::PS_2_0)) {
                                                                psInstruction();
                                                              } else { 
                                                                if ((scanner.la()->id == ps20_token::RCP)) {
                                                                  rcpInstruction();
                                                                } else { 
                                                                  if ((scanner.la()->id == ps20_token::RSQ)) {
                                                                    rsqInstruction();
                                                                  } else { 
                                                                    if ((scanner.la()->id == ps20_token::SINCOS)) {
                                                                      sincosInstruction();
                                                                    } else { 
                                                                      if ((scanner.la()->id == ps20_token::SUB)) {
                                                                        subInstruction();
                                                                      } else { 
                                                                        if ((scanner.la()->id == ps20_token::TEXKILL)) {
                                                                          texkillInstruction();
                                                                        } else { 
                                                                          if ((scanner.la()->id == ps20_token::TEXLD)) {
                                                                            texldInstruction();
                                                                          } else { 
                                                                            if ((scanner.la()->id == ps20_token::TEXLDB)) {
                                                                              texldbInstruction();
                                                                            } else { 
                                                                              texldpInstruction();
                                                                            }
                                                                          }
                                                                        }
                                                                      }
                                                                    }
                                                                  }
                                                                }
                                                              }
                                                            }
                                                          }
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  } catch (ParseException&)
 {throw swShader::Error("Expected an instruction");;

  }
  {
			setMnemonic(m);
			setModifier(x);
			setDestination(d);
			setSource0(s0);
			setSource1(s1);
			setSource2(s2);
			setSource3(s3);
		}

}


void ps20::ps20_parser::psInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::PS_2_0);
  {m = swShader::Instruction::PS_2_0;}

}


void ps20::ps20_parser::dclInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::DCL);
  {m = swShader::Instruction::DCL;}

  dest();
}


void ps20::ps20_parser::dcl_2dInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::DCL_2D);
  {m = swShader::Instruction::DCL_2D;}

  sn();
}


void ps20::ps20_parser::dcl_cubeInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::DCL_CUBE);
  {m = swShader::Instruction::DCL_CUBE;}

  sn();
}


void ps20::ps20_parser::dcl_volumeInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::DCL_VOLUME);
  {m = swShader::Instruction::DCL_VOLUME;}

  sn();
}


void ps20::ps20_parser::defInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::DEF);
  {m = swShader::Instruction::DEF;}

  cn();
  consumeToken(ps20_token::COMMA);
  fValue1();
  consumeToken(ps20_token::COMMA);
  fValue2();
  consumeToken(ps20_token::COMMA);
  fValue3();
  consumeToken(ps20_token::COMMA);
  fValue4();
}


void ps20::ps20_parser::absInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::ABS);
  {m = swShader::Instruction::ABS;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src();
}


void ps20::ps20_parser::addInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::ADD);
  {m = swShader::Instruction::ADD;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
}


void ps20::ps20_parser::cmpInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::CMP);
  {m = swShader::Instruction::CMP;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
  consumeToken(ps20_token::COMMA);
  src2();
}


void ps20::ps20_parser::crsInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::CRS);
  {m = swShader::Instruction::CRS;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
}


void ps20::ps20_parser::dp2addInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::DP2ADD);
  {m = swShader::Instruction::DP2ADD;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
  consumeToken(ps20_token::COMMA);
  src2();
}


void ps20::ps20_parser::dp3Instruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::DP3);
  {m = swShader::Instruction::DP3;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
}


void ps20::ps20_parser::dp4Instruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::DP4);
  {m = swShader::Instruction::DP4;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
}


void ps20::ps20_parser::expInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::EXP);
  {m = swShader::Instruction::EXP;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src();
}


void ps20::ps20_parser::frcInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::FRC);
  {m = swShader::Instruction::FRC;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src();
}


void ps20::ps20_parser::logInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::LOG);
  {m = swShader::Instruction::LOG;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src();
}


void ps20::ps20_parser::lrpInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::LRP);
  {m = swShader::Instruction::LRP;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
  consumeToken(ps20_token::COMMA);
  src2();
}


void ps20::ps20_parser::m3x2Instruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::M3X2);
  {m = swShader::Instruction::M3X2;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
}


void ps20::ps20_parser::m3x3Instruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::M3X3);
  {m = swShader::Instruction::M3X3;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
}


void ps20::ps20_parser::m3x4Instruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::M3X4);
  {m = swShader::Instruction::M3X4;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
}


void ps20::ps20_parser::m4x3Instruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::M4X3);
  {m = swShader::Instruction::M4X3;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
}


void ps20::ps20_parser::m4x4Instruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::M4X4);
  {m = swShader::Instruction::M4X4;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
}


void ps20::ps20_parser::madInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::MAD);
  {m = swShader::Instruction::MAD;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
  consumeToken(ps20_token::COMMA);
  src2();
}


void ps20::ps20_parser::maxInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::MAX);
  {m = swShader::Instruction::MAX;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
}


void ps20::ps20_parser::minInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::MIN);
  {m = swShader::Instruction::MIN;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
}


void ps20::ps20_parser::movInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::MOV);
  {m = swShader::Instruction::MOV;}

  instructionModifier();
  if ((scanner.la()->id == ps20_token::R)) {
    dst();
  } else { 
    outputRegister();
  }
  consumeToken(ps20_token::COMMA);
  src();
}


void ps20::ps20_parser::mulInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::MUL);
  {m = swShader::Instruction::MUL;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
}


void ps20::ps20_parser::nopInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::NOP);
  {m = swShader::Instruction::NOP;}

}


void ps20::ps20_parser::nrmInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::NRM);
  {m = swShader::Instruction::NRM;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src();
}


void ps20::ps20_parser::powInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::POW);
  {m = swShader::Instruction::POW;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
}


void ps20::ps20_parser::rcpInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::RCP);
  {m = swShader::Instruction::RCP;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src();
}


void ps20::ps20_parser::rsqInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::RSQ);
  {m = swShader::Instruction::RSQ;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src();
}


void ps20::ps20_parser::sincosInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::SINCOS);
  {m = swShader::Instruction::SINCOS;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
  consumeToken(ps20_token::COMMA);
  src2();
}


void ps20::ps20_parser::subInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::SUB);
  {m = swShader::Instruction::SUB;}

  instructionModifier();
  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
}


void ps20::ps20_parser::texkillInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::TEXKILL);
  {m = swShader::Instruction::TEXKILL;}

  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
}


void ps20::ps20_parser::texldInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::TEXLD);
  {m = swShader::Instruction::TEXLD;}

  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
}


void ps20::ps20_parser::texldbInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::TEXLDB);
  {m = swShader::Instruction::TEXLDB;}

  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
}


void ps20::ps20_parser::texldpInstruction ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::TEXLDP);
  {m = swShader::Instruction::TEXLDP;}

  dst();
  consumeToken(ps20_token::COMMA);
  src0();
  consumeToken(ps20_token::COMMA);
  src1();
}


void ps20::ps20_parser::instructionModifier ()
     throw (ScanException, ParseException)
{
			x = swShader::Instruction::_NONE;
		;

  if ((scanner.la()->id == ps20_token::_SAT) || (scanner.la()->id == ps20_token::_PP)) {
    if ((scanner.la()->id == ps20_token::_SAT)) {
      consumeToken(ps20_token::_SAT);
      {x = swShader::Instruction::_SAT;}

    } else { 
      consumeToken(ps20_token::_PP);
      {x = swShader::Instruction::_PP;}

    }
  } else { 
     /* lambda */
  }
}


void ps20::ps20_parser::dst ()
     throw (ScanException, ParseException)
{
  try {
    temporaryRegister();
    writeMask();
  } catch (ParseException&)
 {throw swShader::Error("Expected a temporary register r#");;

  }
  {d = t;}

}


void ps20::ps20_parser::dest ()
     throw (ScanException, ParseException)
{
  try {
    if ((scanner.la()->id == ps20_token::V)) {
      colorRegister();
    } else { 
      inputTextureCoordinateRegister();
    }
  } catch (ParseException&)
 {throw swShader::Error("Expected a register v# or t#");;

  }
  {d = t;}

}


void ps20::ps20_parser::sn ()
     throw (ScanException, ParseException)
{
  try {
    samplerRegister();
  } catch (ParseException&)
 {throw swShader::Error("Expected a sampler register s#");;

  }
  {d = t;}

}


void ps20::ps20_parser::cn ()
     throw (ScanException, ParseException)
{
  try {
    constantFloatRegister();
  } catch (ParseException&)
 {throw swShader::Error("Expected a constant float register c#");;

  }
  {d = t;}

}


void ps20::ps20_parser::fValue1 ()
     throw (ScanException, ParseException)
{
  try {
    if ((scanner.la()->id == ps20_token::REAL)) {
      consumeToken(ps20_token::REAL);
    } else { 
      consumeToken(ps20_token::INTEGER);
    }
  } catch (ParseException&)
 {throw swShader::Error("Expected a floating-point literal");;

  }
  {s0.value = (float)strtod(token->image().c_str(), 0);}

}


void ps20::ps20_parser::fValue2 ()
     throw (ScanException, ParseException)
{
  try {
    if ((scanner.la()->id == ps20_token::REAL)) {
      consumeToken(ps20_token::REAL);
    } else { 
      consumeToken(ps20_token::INTEGER);
    }
  } catch (ParseException&)
 {throw swShader::Error("Expected a floating-point literal");;

  }
  {s1.value = (float)strtod(token->image().c_str(), 0);}

}


void ps20::ps20_parser::fValue3 ()
     throw (ScanException, ParseException)
{
  try {
    if ((scanner.la()->id == ps20_token::REAL)) {
      consumeToken(ps20_token::REAL);
    } else { 
      consumeToken(ps20_token::INTEGER);
    }
  } catch (ParseException&)
 {throw swShader::Error("Expected a floating-point literal");;

  }
  {s2.value = (float)strtod(token->image().c_str(), 0);}

}


void ps20::ps20_parser::fValue4 ()
     throw (ScanException, ParseException)
{
  try {
    if ((scanner.la()->id == ps20_token::REAL)) {
      consumeToken(ps20_token::REAL);
    } else { 
      consumeToken(ps20_token::INTEGER);
    }
  } catch (ParseException&)
 {throw swShader::Error("Expected a floating-point literal");;

  }
  {s3.value = (float)strtod(token->image().c_str(), 0);}

}


void ps20::ps20_parser::src ()
     throw (ScanException, ParseException)
{
  sourceModifier();
  inputRegister();
  sourceSwizzle();
  {s0 = t;}

}


void ps20::ps20_parser::src0 ()
     throw (ScanException, ParseException)
{
  sourceModifier();
  inputRegister();
  sourceSwizzle();
  {s0 = t;}

}


void ps20::ps20_parser::src1 ()
     throw (ScanException, ParseException)
{
  sourceModifier();
  inputRegister();
  sourceSwizzle();
  {s1 = t;}

}


void ps20::ps20_parser::src2 ()
     throw (ScanException, ParseException)
{
  sourceModifier();
  inputRegister();
  sourceSwizzle();
  {s2 = t;}

}


void ps20::ps20_parser::outputRegister ()
     throw (ScanException, ParseException)
{
  if ((scanner.la()->id == ps20_token::O_C)) {
    outputColorRegister();
  } else { 
    outputDepthRegister();
  }
  {d = t;}

}


void ps20::ps20_parser::inputRegister ()
     throw (ScanException, ParseException)
{
  if ((scanner.la()->id == ps20_token::V)) {
    colorRegister();
  } else { 
    if ((scanner.la()->id == ps20_token::C)) {
      constantFloatRegister();
    } else { 
      if ((scanner.la()->id == ps20_token::T)) {
        inputTextureCoordinateRegister();
      } else { 
        if ((scanner.la()->id == ps20_token::S)) {
          samplerRegister();
        } else { 
          temporaryRegister();
        }
      }
    }
  }
}


void ps20::ps20_parser::sourceModifier ()
     throw (ScanException, ParseException)
{t.mod = swShader::Operand::SourceModifier::NONE;;

  if ((scanner.la()->id == ps20_token::MINUS)) {
    consumeToken(ps20_token::MINUS);
    {t.mod = swShader::Operand::SourceModifier::NEGATE;}

  } else { 
     /* lambda */
  }
}


void ps20::ps20_parser::writeMask ()
     throw (ScanException, ParseException)
{
			// Mask all components
			t.sel.x = swShader::Operand::X;
			t.sel.y = swShader::Operand::Y;
			t.sel.z = swShader::Operand::Z;
			t.sel.w = swShader::Operand::W;
		;

  if (__la_1_(1000000000)) {
    consumeToken(ps20_token::DOT);
    {
				// Mask all components
				t.sel.x = swShader::Operand::M;
				t.sel.y = swShader::Operand::M;
				t.sel.z = swShader::Operand::M;
				t.sel.w = swShader::Operand::M;
			}

    if ((scanner.la()->id == ps20_token::X)) {
      consumeToken(ps20_token::X);
      {t.sel.x = swShader::Operand::X;}

      if ((scanner.la()->id == ps20_token::Y)) {
        consumeToken(ps20_token::Y);
        {t.sel.y = swShader::Operand::Y;}

      } else { 
         /* lambda */
      }
      if ((scanner.la()->id == ps20_token::Z)) {
        consumeToken(ps20_token::Z);
        {t.sel.z = swShader::Operand::Z;}

      } else { 
         /* lambda */
      }
      if ((scanner.la()->id == ps20_token::W)) {
        consumeToken(ps20_token::W);
        {t.sel.w = swShader::Operand::W;}

      } else { 
         /* lambda */
      }
    } else { 
      if ((scanner.la()->id == ps20_token::Y)) {
        consumeToken(ps20_token::Y);
        {t.sel.y = swShader::Operand::Y;}

        if ((scanner.la()->id == ps20_token::Z)) {
          consumeToken(ps20_token::Z);
          {t.sel.z = swShader::Operand::Z;}

        } else { 
           /* lambda */
        }
        if ((scanner.la()->id == ps20_token::W)) {
          consumeToken(ps20_token::W);
          {t.sel.w = swShader::Operand::W;}

        } else { 
           /* lambda */
        }
      } else { 
        if ((scanner.la()->id == ps20_token::Z)) {
          consumeToken(ps20_token::Z);
          {t.sel.z = swShader::Operand::Z;}

          if ((scanner.la()->id == ps20_token::W)) {
            consumeToken(ps20_token::W);
            {t.sel.w = swShader::Operand::W;}

          } else { 
             /* lambda */
          }
        } else { 
          consumeToken(ps20_token::W);
          {t.sel.w = swShader::Operand::W;}

        }
      }
    }
  } else { 
     /* lambda */
  }
}


void ps20::ps20_parser::sourceSwizzle ()
     throw (ScanException, ParseException)
{
			t.sel.x = swShader::Operand::Component::X;
			t.sel.y = swShader::Operand::Component::Y;
			t.sel.z = swShader::Operand::Component::Z;
			t.sel.w = swShader::Operand::Component::W;
		;

  if ((scanner.la()->id == ps20_token::DOT)) {
    consumeToken(ps20_token::DOT);
    if ((scanner.la()->id == ps20_token::X)) {
      consumeToken(ps20_token::X);
      {t.sel.x = swShader::Operand::X; t.sel.y = swShader::Operand::X; t.sel.z = swShader::Operand::X; t.sel.w = swShader::Operand::X;}

    } else { 
      if ((scanner.la()->id == ps20_token::Y)) {
        consumeToken(ps20_token::Y);
        {t.sel.x = swShader::Operand::Y; t.sel.y = swShader::Operand::Y; t.sel.z = swShader::Operand::Y; t.sel.w = swShader::Operand::Y;}

      } else { 
        if ((scanner.la()->id == ps20_token::Z)) {
          consumeToken(ps20_token::Z);
          {t.sel.x = swShader::Operand::Z; t.sel.y = swShader::Operand::Z; t.sel.z = swShader::Operand::Z; t.sel.w = swShader::Operand::Z;}

        } else { 
          consumeToken(ps20_token::W);
          {t.sel.x = swShader::Operand::W; t.sel.y = swShader::Operand::W; t.sel.z = swShader::Operand::W; t.sel.w = swShader::Operand::W;}

        }
      }
    }
    if (__la_2_(1000000000)) {
      if ((scanner.la()->id == ps20_token::X)) {
        consumeToken(ps20_token::X);
        {t.sel.y = swShader::Operand::X; t.sel.z = swShader::Operand::X; t.sel.w = swShader::Operand::X;}

      } else { 
        if ((scanner.la()->id == ps20_token::Y)) {
          consumeToken(ps20_token::Y);
          {t.sel.y = swShader::Operand::Y; t.sel.z = swShader::Operand::Y; t.sel.w = swShader::Operand::Y;}

        } else { 
          if ((scanner.la()->id == ps20_token::Z)) {
            consumeToken(ps20_token::Z);
            {t.sel.y = swShader::Operand::Z; t.sel.z = swShader::Operand::Z; t.sel.w = swShader::Operand::Z;}

          } else { 
            consumeToken(ps20_token::W);
            {t.sel.y = swShader::Operand::W; t.sel.z = swShader::Operand::W; t.sel.w = swShader::Operand::W;}

          }
        }
      }
    } else { 
       /* lambda */
    }
    if (__la_3_(1000000000)) {
      if ((scanner.la()->id == ps20_token::X)) {
        consumeToken(ps20_token::X);
        {t.sel.z = swShader::Operand::X; t.sel.w = swShader::Operand::X;}

      } else { 
        if ((scanner.la()->id == ps20_token::Y)) {
          consumeToken(ps20_token::Y);
          {t.sel.z = swShader::Operand::Y; t.sel.w = swShader::Operand::Y;}

        } else { 
          if ((scanner.la()->id == ps20_token::Z)) {
            consumeToken(ps20_token::Z);
            {t.sel.z = swShader::Operand::Z; t.sel.w = swShader::Operand::Z;}

          } else { 
            consumeToken(ps20_token::W);
            {t.sel.z = swShader::Operand::W; t.sel.w = swShader::Operand::W;}

          }
        }
      }
    } else { 
       /* lambda */
    }
    if ((scanner.la()->id == ps20_token::X) || (scanner.la()->id == ps20_token::Y) || (scanner.la()->id == ps20_token::Z) || (scanner.la()->id == ps20_token::W)) {
      if ((scanner.la()->id == ps20_token::X)) {
        consumeToken(ps20_token::X);
        {t.sel.w = swShader::Operand::X;}

      } else { 
        if ((scanner.la()->id == ps20_token::Y)) {
          consumeToken(ps20_token::Y);
          {t.sel.w = swShader::Operand::Y;}

        } else { 
          if ((scanner.la()->id == ps20_token::Z)) {
            consumeToken(ps20_token::Z);
            {t.sel.w = swShader::Operand::Z;}

          } else { 
            consumeToken(ps20_token::W);
            {t.sel.w = swShader::Operand::W;}

          }
        }
      }
    } else { 
       /* lambda */
    }
  } else { 
     /* lambda */
  }
}


void ps20::ps20_parser::colorRegister ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::V);
  {t.type = swShader::Operand::COLOR_REGISTER; t.index = token->integer;}

}


void ps20::ps20_parser::constantFloatRegister ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::C);
  {t.type = swShader::Operand::CONSTANT_FLOAT_REGISTER; t.index = token->integer;}

}


void ps20::ps20_parser::inputTextureCoordinateRegister ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::T);
  {t.type = swShader::Operand::INPUT_TEXTURE_COORDINATE_REGISTER; t.index = token->integer;}

  if (__la_4_(1000000000)) {
    writeMask();
  } else { 
     /* lambda */
  }
}


void ps20::ps20_parser::samplerRegister ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::S);
  {t.type = swShader::Operand::SAMPLER_REGISTER; t.index = token->integer;}

}


void ps20::ps20_parser::temporaryRegister ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::R);
  {t.type = swShader::Operand::TEMPORARY_REGISTER; t.index = token->integer;}

}


void ps20::ps20_parser::outputColorRegister ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::O_C);
  {t.type = swShader::Operand::OUTPUT_COLOR_REGISTER; t.index = token->integer;}

}


void ps20::ps20_parser::outputDepthRegister ()
     throw (ScanException, ParseException)
{
  consumeToken(ps20_token::O_DEPTH);
  {t.type = swShader::Operand::OUTPUT_DEPTH_REGISTER;}

}


bool ps20::ps20_parser::__la_main_ () throw (ScanException)
{
  while (__la_0_(1000000000)) {
    if (!__la_instruction_()) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
    if (!laConsumeToken(ps20_token::EOL)) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
    while ((scanner.la()->id == ps20_token::EOL)) {
      if (!laConsumeToken(ps20_token::EOL)) goto __lookahead_fail_;
      if (_la == 0) goto __lookahead_succeed_;
    }
  }
  if ((scanner.la()->id == ps20_token::PS_2_0) || (scanner.la()->id == ps20_token::DCL) || (scanner.la()->id == ps20_token::DCL_2D) || (scanner.la()->id == ps20_token::DCL_CUBE) || (scanner.la()->id == ps20_token::DCL_VOLUME) || (scanner.la()->id == ps20_token::DEF) || (scanner.la()->id == ps20_token::ABS) || (scanner.la()->id == ps20_token::ADD) || (scanner.la()->id == ps20_token::CMP) || (scanner.la()->id == ps20_token::CRS) || (scanner.la()->id == ps20_token::DP2ADD) || (scanner.la()->id == ps20_token::DP3) || (scanner.la()->id == ps20_token::DP4) || (scanner.la()->id == ps20_token::EXP) || (scanner.la()->id == ps20_token::FRC) || (scanner.la()->id == ps20_token::LOG) || (scanner.la()->id == ps20_token::LRP) || (scanner.la()->id == ps20_token::M3X2) || (scanner.la()->id == ps20_token::M3X3) || (scanner.la()->id == ps20_token::M3X4) || (scanner.la()->id == ps20_token::M4X3) || (scanner.la()->id == ps20_token::M4X4) || (scanner.la()->id == ps20_token::MAD) || (scanner.la()->id == ps20_token::MAX) || (scanner.la()->id == ps20_token::MIN) || (scanner.la()->id == ps20_token::MOV) || (scanner.la()->id == ps20_token::MUL) || (scanner.la()->id == ps20_token::NOP) || (scanner.la()->id == ps20_token::NRM) || (scanner.la()->id == ps20_token::POW) || (scanner.la()->id == ps20_token::RCP) || (scanner.la()->id == ps20_token::RSQ) || (scanner.la()->id == ps20_token::SINCOS) || (scanner.la()->id == ps20_token::SUB) || (scanner.la()->id == ps20_token::TEXKILL) || (scanner.la()->id == ps20_token::TEXLD) || (scanner.la()->id == ps20_token::TEXLDB) || (scanner.la()->id == ps20_token::TEXLDP)) {
    if (!__la_instruction_()) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  } else { 
     /* lambda */
  }
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_0_ (int depth) throw (ScanException)
{
  int _laSave = _la;
  _la = depth;
  scanner.setMarker();
  
  if (!__la_instruction_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::EOL)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  while ((scanner.la()->id == ps20_token::EOL)) {
    if (!laConsumeToken(ps20_token::EOL)) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  }
  goto __lookahead_succeed_;
  
__lookahead_fail_:
  _la = _laSave;
  scanner.rewindToMarker();
  return false;

__lookahead_succeed_:
  _la = _laSave;
  scanner.rewindToMarker();
  return true;
}


bool ps20::ps20_parser::__la_instruction_ () throw (ScanException)
{
  if ((scanner.la()->id == ps20_token::ABS)) {
    if (!__la_absInstruction_()) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  } else { 
    if ((scanner.la()->id == ps20_token::ADD)) {
      if (!__la_addInstruction_()) goto __lookahead_fail_;
      if (_la == 0) goto __lookahead_succeed_;
    } else { 
      if ((scanner.la()->id == ps20_token::CMP)) {
        if (!__la_cmpInstruction_()) goto __lookahead_fail_;
        if (_la == 0) goto __lookahead_succeed_;
      } else { 
        if ((scanner.la()->id == ps20_token::CRS)) {
          if (!__la_crsInstruction_()) goto __lookahead_fail_;
          if (_la == 0) goto __lookahead_succeed_;
        } else { 
          if ((scanner.la()->id == ps20_token::DCL)) {
            if (!__la_dclInstruction_()) goto __lookahead_fail_;
            if (_la == 0) goto __lookahead_succeed_;
          } else { 
            if ((scanner.la()->id == ps20_token::DCL_2D)) {
              if (!__la_dcl_2dInstruction_()) goto __lookahead_fail_;
              if (_la == 0) goto __lookahead_succeed_;
            } else { 
              if ((scanner.la()->id == ps20_token::DCL_CUBE)) {
                if (!__la_dcl_cubeInstruction_()) goto __lookahead_fail_;
                if (_la == 0) goto __lookahead_succeed_;
              } else { 
                if ((scanner.la()->id == ps20_token::DCL_VOLUME)) {
                  if (!__la_dcl_volumeInstruction_()) goto __lookahead_fail_;
                  if (_la == 0) goto __lookahead_succeed_;
                } else { 
                  if ((scanner.la()->id == ps20_token::DEF)) {
                    if (!__la_defInstruction_()) goto __lookahead_fail_;
                    if (_la == 0) goto __lookahead_succeed_;
                  } else { 
                    if ((scanner.la()->id == ps20_token::DP2ADD)) {
                      if (!__la_dp2addInstruction_()) goto __lookahead_fail_;
                      if (_la == 0) goto __lookahead_succeed_;
                    } else { 
                      if ((scanner.la()->id == ps20_token::DP3)) {
                        if (!__la_dp3Instruction_()) goto __lookahead_fail_;
                        if (_la == 0) goto __lookahead_succeed_;
                      } else { 
                        if ((scanner.la()->id == ps20_token::DP4)) {
                          if (!__la_dp4Instruction_()) goto __lookahead_fail_;
                          if (_la == 0) goto __lookahead_succeed_;
                        } else { 
                          if ((scanner.la()->id == ps20_token::EXP)) {
                            if (!__la_expInstruction_()) goto __lookahead_fail_;
                            if (_la == 0) goto __lookahead_succeed_;
                          } else { 
                            if ((scanner.la()->id == ps20_token::FRC)) {
                              if (!__la_frcInstruction_()) goto __lookahead_fail_;
                              if (_la == 0) goto __lookahead_succeed_;
                            } else { 
                              if ((scanner.la()->id == ps20_token::LOG)) {
                                if (!__la_logInstruction_()) goto __lookahead_fail_;
                                if (_la == 0) goto __lookahead_succeed_;
                              } else { 
                                if ((scanner.la()->id == ps20_token::LRP)) {
                                  if (!__la_lrpInstruction_()) goto __lookahead_fail_;
                                  if (_la == 0) goto __lookahead_succeed_;
                                } else { 
                                  if ((scanner.la()->id == ps20_token::M3X2)) {
                                    if (!__la_m3x2Instruction_()) goto __lookahead_fail_;
                                    if (_la == 0) goto __lookahead_succeed_;
                                  } else { 
                                    if ((scanner.la()->id == ps20_token::M3X3)) {
                                      if (!__la_m3x3Instruction_()) goto __lookahead_fail_;
                                      if (_la == 0) goto __lookahead_succeed_;
                                    } else { 
                                      if ((scanner.la()->id == ps20_token::M3X4)) {
                                        if (!__la_m3x4Instruction_()) goto __lookahead_fail_;
                                        if (_la == 0) goto __lookahead_succeed_;
                                      } else { 
                                        if ((scanner.la()->id == ps20_token::M4X3)) {
                                          if (!__la_m4x3Instruction_()) goto __lookahead_fail_;
                                          if (_la == 0) goto __lookahead_succeed_;
                                        } else { 
                                          if ((scanner.la()->id == ps20_token::M4X4)) {
                                            if (!__la_m4x4Instruction_()) goto __lookahead_fail_;
                                            if (_la == 0) goto __lookahead_succeed_;
                                          } else { 
                                            if ((scanner.la()->id == ps20_token::MAD)) {
                                              if (!__la_madInstruction_()) goto __lookahead_fail_;
                                              if (_la == 0) goto __lookahead_succeed_;
                                            } else { 
                                              if ((scanner.la()->id == ps20_token::MAX)) {
                                                if (!__la_maxInstruction_()) goto __lookahead_fail_;
                                                if (_la == 0) goto __lookahead_succeed_;
                                              } else { 
                                                if ((scanner.la()->id == ps20_token::MIN)) {
                                                  if (!__la_minInstruction_()) goto __lookahead_fail_;
                                                  if (_la == 0) goto __lookahead_succeed_;
                                                } else { 
                                                  if ((scanner.la()->id == ps20_token::MOV)) {
                                                    if (!__la_movInstruction_()) goto __lookahead_fail_;
                                                    if (_la == 0) goto __lookahead_succeed_;
                                                  } else { 
                                                    if ((scanner.la()->id == ps20_token::MUL)) {
                                                      if (!__la_mulInstruction_()) goto __lookahead_fail_;
                                                      if (_la == 0) goto __lookahead_succeed_;
                                                    } else { 
                                                      if ((scanner.la()->id == ps20_token::NOP)) {
                                                        if (!__la_nopInstruction_()) goto __lookahead_fail_;
                                                        if (_la == 0) goto __lookahead_succeed_;
                                                      } else { 
                                                        if ((scanner.la()->id == ps20_token::NRM)) {
                                                          if (!__la_nrmInstruction_()) goto __lookahead_fail_;
                                                          if (_la == 0) goto __lookahead_succeed_;
                                                        } else { 
                                                          if ((scanner.la()->id == ps20_token::POW)) {
                                                            if (!__la_powInstruction_()) goto __lookahead_fail_;
                                                            if (_la == 0) goto __lookahead_succeed_;
                                                          } else { 
                                                            if ((scanner.la()->id == ps20_token::PS_2_0)) {
                                                              if (!__la_psInstruction_()) goto __lookahead_fail_;
                                                              if (_la == 0) goto __lookahead_succeed_;
                                                            } else { 
                                                              if ((scanner.la()->id == ps20_token::RCP)) {
                                                                if (!__la_rcpInstruction_()) goto __lookahead_fail_;
                                                                if (_la == 0) goto __lookahead_succeed_;
                                                              } else { 
                                                                if ((scanner.la()->id == ps20_token::RSQ)) {
                                                                  if (!__la_rsqInstruction_()) goto __lookahead_fail_;
                                                                  if (_la == 0) goto __lookahead_succeed_;
                                                                } else { 
                                                                  if ((scanner.la()->id == ps20_token::SINCOS)) {
                                                                    if (!__la_sincosInstruction_()) goto __lookahead_fail_;
                                                                    if (_la == 0) goto __lookahead_succeed_;
                                                                  } else { 
                                                                    if ((scanner.la()->id == ps20_token::SUB)) {
                                                                      if (!__la_subInstruction_()) goto __lookahead_fail_;
                                                                      if (_la == 0) goto __lookahead_succeed_;
                                                                    } else { 
                                                                      if ((scanner.la()->id == ps20_token::TEXKILL)) {
                                                                        if (!__la_texkillInstruction_()) goto __lookahead_fail_;
                                                                        if (_la == 0) goto __lookahead_succeed_;
                                                                      } else { 
                                                                        if ((scanner.la()->id == ps20_token::TEXLD)) {
                                                                          if (!__la_texldInstruction_()) goto __lookahead_fail_;
                                                                          if (_la == 0) goto __lookahead_succeed_;
                                                                        } else { 
                                                                          if ((scanner.la()->id == ps20_token::TEXLDB)) {
                                                                            if (!__la_texldbInstruction_()) goto __lookahead_fail_;
                                                                            if (_la == 0) goto __lookahead_succeed_;
                                                                          } else { 
                                                                            if (!__la_texldpInstruction_()) goto __lookahead_fail_;
                                                                            if (_la == 0) goto __lookahead_succeed_;
                                                                          }
                                                                        }
                                                                      }
                                                                    }
                                                                  }
                                                                }
                                                              }
                                                            }
                                                          }
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_psInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::PS_2_0)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_dclInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::DCL)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dest_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_dcl_2dInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::DCL_2D)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_sn_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_dcl_cubeInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::DCL_CUBE)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_sn_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_dcl_volumeInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::DCL_VOLUME)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_sn_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_defInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::DEF)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_cn_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_fValue1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_fValue2_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_fValue3_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_fValue4_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_absInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::ABS)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_addInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::ADD)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_cmpInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::CMP)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src2_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_crsInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::CRS)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_dp2addInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::DP2ADD)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src2_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_dp3Instruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::DP3)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_dp4Instruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::DP4)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_expInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::EXP)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_frcInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::FRC)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_logInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::LOG)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_lrpInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::LRP)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src2_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_m3x2Instruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::M3X2)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_m3x3Instruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::M3X3)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_m3x4Instruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::M3X4)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_m4x3Instruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::M4X3)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_m4x4Instruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::M4X4)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_madInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::MAD)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src2_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_maxInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::MAX)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_minInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::MIN)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_movInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::MOV)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if ((scanner.la()->id == ps20_token::R)) {
    if (!__la_dst_()) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  } else { 
    if (!__la_outputRegister_()) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  }
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_mulInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::MUL)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_nopInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::NOP)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_nrmInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::NRM)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_powInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::POW)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_rcpInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::RCP)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_rsqInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::RSQ)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_sincosInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::SINCOS)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src2_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_subInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::SUB)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_instructionModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_texkillInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::TEXKILL)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_texldInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::TEXLD)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_texldbInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::TEXLDB)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_texldpInstruction_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::TEXLDP)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_dst_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src0_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!laConsumeToken(ps20_token::COMMA)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_src1_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_instructionModifier_ () throw (ScanException)
{
  if ((scanner.la()->id == ps20_token::_SAT) || (scanner.la()->id == ps20_token::_PP)) {
    if ((scanner.la()->id == ps20_token::_SAT)) {
      if (!laConsumeToken(ps20_token::_SAT)) goto __lookahead_fail_;
      if (_la == 0) goto __lookahead_succeed_;
    } else { 
      if (!laConsumeToken(ps20_token::_PP)) goto __lookahead_fail_;
      if (_la == 0) goto __lookahead_succeed_;
    }
  } else { 
     /* lambda */
  }
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_dst_ () throw (ScanException)
{
  if (!__la_temporaryRegister_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_writeMask_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_dest_ () throw (ScanException)
{
  if ((scanner.la()->id == ps20_token::V)) {
    if (!__la_colorRegister_()) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  } else { 
    if (!__la_inputTextureCoordinateRegister_()) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  }
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_sn_ () throw (ScanException)
{
  if (!__la_samplerRegister_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_cn_ () throw (ScanException)
{
  if (!__la_constantFloatRegister_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_fValue1_ () throw (ScanException)
{
  if ((scanner.la()->id == ps20_token::REAL)) {
    if (!laConsumeToken(ps20_token::REAL)) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  } else { 
    if (!laConsumeToken(ps20_token::INTEGER)) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  }
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_fValue2_ () throw (ScanException)
{
  if ((scanner.la()->id == ps20_token::REAL)) {
    if (!laConsumeToken(ps20_token::REAL)) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  } else { 
    if (!laConsumeToken(ps20_token::INTEGER)) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  }
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_fValue3_ () throw (ScanException)
{
  if ((scanner.la()->id == ps20_token::REAL)) {
    if (!laConsumeToken(ps20_token::REAL)) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  } else { 
    if (!laConsumeToken(ps20_token::INTEGER)) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  }
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_fValue4_ () throw (ScanException)
{
  if ((scanner.la()->id == ps20_token::REAL)) {
    if (!laConsumeToken(ps20_token::REAL)) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  } else { 
    if (!laConsumeToken(ps20_token::INTEGER)) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  }
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_src_ () throw (ScanException)
{
  if (!__la_sourceModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_inputRegister_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_sourceSwizzle_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_src0_ () throw (ScanException)
{
  if (!__la_sourceModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_inputRegister_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_sourceSwizzle_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_src1_ () throw (ScanException)
{
  if (!__la_sourceModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_inputRegister_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_sourceSwizzle_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_src2_ () throw (ScanException)
{
  if (!__la_sourceModifier_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_inputRegister_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (!__la_sourceSwizzle_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_outputRegister_ () throw (ScanException)
{
  if ((scanner.la()->id == ps20_token::O_C)) {
    if (!__la_outputColorRegister_()) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  } else { 
    if (!__la_outputDepthRegister_()) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  }
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_inputRegister_ () throw (ScanException)
{
  if ((scanner.la()->id == ps20_token::V)) {
    if (!__la_colorRegister_()) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  } else { 
    if ((scanner.la()->id == ps20_token::C)) {
      if (!__la_constantFloatRegister_()) goto __lookahead_fail_;
      if (_la == 0) goto __lookahead_succeed_;
    } else { 
      if ((scanner.la()->id == ps20_token::T)) {
        if (!__la_inputTextureCoordinateRegister_()) goto __lookahead_fail_;
        if (_la == 0) goto __lookahead_succeed_;
      } else { 
        if ((scanner.la()->id == ps20_token::S)) {
          if (!__la_samplerRegister_()) goto __lookahead_fail_;
          if (_la == 0) goto __lookahead_succeed_;
        } else { 
          if (!__la_temporaryRegister_()) goto __lookahead_fail_;
          if (_la == 0) goto __lookahead_succeed_;
        }
      }
    }
  }
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_sourceModifier_ () throw (ScanException)
{
  if ((scanner.la()->id == ps20_token::MINUS)) {
    if (!laConsumeToken(ps20_token::MINUS)) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  } else { 
     /* lambda */
  }
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_writeMask_ () throw (ScanException)
{
  if (__la_1_(1000000000)) {
    if (!laConsumeToken(ps20_token::DOT)) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
    if ((scanner.la()->id == ps20_token::X)) {
      if (!laConsumeToken(ps20_token::X)) goto __lookahead_fail_;
      if (_la == 0) goto __lookahead_succeed_;
      if ((scanner.la()->id == ps20_token::Y)) {
        if (!laConsumeToken(ps20_token::Y)) goto __lookahead_fail_;
        if (_la == 0) goto __lookahead_succeed_;
      } else { 
         /* lambda */
      }
      if ((scanner.la()->id == ps20_token::Z)) {
        if (!laConsumeToken(ps20_token::Z)) goto __lookahead_fail_;
        if (_la == 0) goto __lookahead_succeed_;
      } else { 
         /* lambda */
      }
      if ((scanner.la()->id == ps20_token::W)) {
        if (!laConsumeToken(ps20_token::W)) goto __lookahead_fail_;
        if (_la == 0) goto __lookahead_succeed_;
      } else { 
         /* lambda */
      }
    } else { 
      if ((scanner.la()->id == ps20_token::Y)) {
        if (!laConsumeToken(ps20_token::Y)) goto __lookahead_fail_;
        if (_la == 0) goto __lookahead_succeed_;
        if ((scanner.la()->id == ps20_token::Z)) {
          if (!laConsumeToken(ps20_token::Z)) goto __lookahead_fail_;
          if (_la == 0) goto __lookahead_succeed_;
        } else { 
           /* lambda */
        }
        if ((scanner.la()->id == ps20_token::W)) {
          if (!laConsumeToken(ps20_token::W)) goto __lookahead_fail_;
          if (_la == 0) goto __lookahead_succeed_;
        } else { 
           /* lambda */
        }
      } else { 
        if ((scanner.la()->id == ps20_token::Z)) {
          if (!laConsumeToken(ps20_token::Z)) goto __lookahead_fail_;
          if (_la == 0) goto __lookahead_succeed_;
          if ((scanner.la()->id == ps20_token::W)) {
            if (!laConsumeToken(ps20_token::W)) goto __lookahead_fail_;
            if (_la == 0) goto __lookahead_succeed_;
          } else { 
             /* lambda */
          }
        } else { 
          if (!laConsumeToken(ps20_token::W)) goto __lookahead_fail_;
          if (_la == 0) goto __lookahead_succeed_;
        }
      }
    }
  } else { 
     /* lambda */
  }
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_1_ (int depth) throw (ScanException)
{
  int _laSave = _la;
  _la = depth;
  scanner.setMarker();
  
  if (!laConsumeToken(ps20_token::DOT)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if ((scanner.la()->id == ps20_token::X)) {
    if (!laConsumeToken(ps20_token::X)) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
    if ((scanner.la()->id == ps20_token::Y)) {
      if (!laConsumeToken(ps20_token::Y)) goto __lookahead_fail_;
      if (_la == 0) goto __lookahead_succeed_;
    } else { 
       /* lambda */
    }
    if ((scanner.la()->id == ps20_token::Z)) {
      if (!laConsumeToken(ps20_token::Z)) goto __lookahead_fail_;
      if (_la == 0) goto __lookahead_succeed_;
    } else { 
       /* lambda */
    }
    if ((scanner.la()->id == ps20_token::W)) {
      if (!laConsumeToken(ps20_token::W)) goto __lookahead_fail_;
      if (_la == 0) goto __lookahead_succeed_;
    } else { 
       /* lambda */
    }
  } else { 
    if ((scanner.la()->id == ps20_token::Y)) {
      if (!laConsumeToken(ps20_token::Y)) goto __lookahead_fail_;
      if (_la == 0) goto __lookahead_succeed_;
      if ((scanner.la()->id == ps20_token::Z)) {
        if (!laConsumeToken(ps20_token::Z)) goto __lookahead_fail_;
        if (_la == 0) goto __lookahead_succeed_;
      } else { 
         /* lambda */
      }
      if ((scanner.la()->id == ps20_token::W)) {
        if (!laConsumeToken(ps20_token::W)) goto __lookahead_fail_;
        if (_la == 0) goto __lookahead_succeed_;
      } else { 
         /* lambda */
      }
    } else { 
      if ((scanner.la()->id == ps20_token::Z)) {
        if (!laConsumeToken(ps20_token::Z)) goto __lookahead_fail_;
        if (_la == 0) goto __lookahead_succeed_;
        if ((scanner.la()->id == ps20_token::W)) {
          if (!laConsumeToken(ps20_token::W)) goto __lookahead_fail_;
          if (_la == 0) goto __lookahead_succeed_;
        } else { 
           /* lambda */
        }
      } else { 
        if (!laConsumeToken(ps20_token::W)) goto __lookahead_fail_;
        if (_la == 0) goto __lookahead_succeed_;
      }
    }
  }
  goto __lookahead_succeed_;
  
__lookahead_fail_:
  _la = _laSave;
  scanner.rewindToMarker();
  return false;

__lookahead_succeed_:
  _la = _laSave;
  scanner.rewindToMarker();
  return true;
}


bool ps20::ps20_parser::__la_sourceSwizzle_ () throw (ScanException)
{
  if ((scanner.la()->id == ps20_token::DOT)) {
    if (!laConsumeToken(ps20_token::DOT)) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
    if ((scanner.la()->id == ps20_token::X)) {
      if (!laConsumeToken(ps20_token::X)) goto __lookahead_fail_;
      if (_la == 0) goto __lookahead_succeed_;
    } else { 
      if ((scanner.la()->id == ps20_token::Y)) {
        if (!laConsumeToken(ps20_token::Y)) goto __lookahead_fail_;
        if (_la == 0) goto __lookahead_succeed_;
      } else { 
        if ((scanner.la()->id == ps20_token::Z)) {
          if (!laConsumeToken(ps20_token::Z)) goto __lookahead_fail_;
          if (_la == 0) goto __lookahead_succeed_;
        } else { 
          if (!laConsumeToken(ps20_token::W)) goto __lookahead_fail_;
          if (_la == 0) goto __lookahead_succeed_;
        }
      }
    }
    if (__la_2_(1000000000)) {
      if ((scanner.la()->id == ps20_token::X)) {
        if (!laConsumeToken(ps20_token::X)) goto __lookahead_fail_;
        if (_la == 0) goto __lookahead_succeed_;
      } else { 
        if ((scanner.la()->id == ps20_token::Y)) {
          if (!laConsumeToken(ps20_token::Y)) goto __lookahead_fail_;
          if (_la == 0) goto __lookahead_succeed_;
        } else { 
          if ((scanner.la()->id == ps20_token::Z)) {
            if (!laConsumeToken(ps20_token::Z)) goto __lookahead_fail_;
            if (_la == 0) goto __lookahead_succeed_;
          } else { 
            if (!laConsumeToken(ps20_token::W)) goto __lookahead_fail_;
            if (_la == 0) goto __lookahead_succeed_;
          }
        }
      }
    } else { 
       /* lambda */
    }
    if (__la_3_(1000000000)) {
      if ((scanner.la()->id == ps20_token::X)) {
        if (!laConsumeToken(ps20_token::X)) goto __lookahead_fail_;
        if (_la == 0) goto __lookahead_succeed_;
      } else { 
        if ((scanner.la()->id == ps20_token::Y)) {
          if (!laConsumeToken(ps20_token::Y)) goto __lookahead_fail_;
          if (_la == 0) goto __lookahead_succeed_;
        } else { 
          if ((scanner.la()->id == ps20_token::Z)) {
            if (!laConsumeToken(ps20_token::Z)) goto __lookahead_fail_;
            if (_la == 0) goto __lookahead_succeed_;
          } else { 
            if (!laConsumeToken(ps20_token::W)) goto __lookahead_fail_;
            if (_la == 0) goto __lookahead_succeed_;
          }
        }
      }
    } else { 
       /* lambda */
    }
    if ((scanner.la()->id == ps20_token::X) || (scanner.la()->id == ps20_token::Y) || (scanner.la()->id == ps20_token::Z) || (scanner.la()->id == ps20_token::W)) {
      if ((scanner.la()->id == ps20_token::X)) {
        if (!laConsumeToken(ps20_token::X)) goto __lookahead_fail_;
        if (_la == 0) goto __lookahead_succeed_;
      } else { 
        if ((scanner.la()->id == ps20_token::Y)) {
          if (!laConsumeToken(ps20_token::Y)) goto __lookahead_fail_;
          if (_la == 0) goto __lookahead_succeed_;
        } else { 
          if ((scanner.la()->id == ps20_token::Z)) {
            if (!laConsumeToken(ps20_token::Z)) goto __lookahead_fail_;
            if (_la == 0) goto __lookahead_succeed_;
          } else { 
            if (!laConsumeToken(ps20_token::W)) goto __lookahead_fail_;
            if (_la == 0) goto __lookahead_succeed_;
          }
        }
      }
    } else { 
       /* lambda */
    }
  } else { 
     /* lambda */
  }
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_2_ (int depth) throw (ScanException)
{
  int _laSave = _la;
  _la = depth;
  scanner.setMarker();
  
  if ((scanner.la()->id == ps20_token::X)) {
    if (!laConsumeToken(ps20_token::X)) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  } else { 
    if ((scanner.la()->id == ps20_token::Y)) {
      if (!laConsumeToken(ps20_token::Y)) goto __lookahead_fail_;
      if (_la == 0) goto __lookahead_succeed_;
    } else { 
      if ((scanner.la()->id == ps20_token::Z)) {
        if (!laConsumeToken(ps20_token::Z)) goto __lookahead_fail_;
        if (_la == 0) goto __lookahead_succeed_;
      } else { 
        if (!laConsumeToken(ps20_token::W)) goto __lookahead_fail_;
        if (_la == 0) goto __lookahead_succeed_;
      }
    }
  }
  goto __lookahead_succeed_;
  
__lookahead_fail_:
  _la = _laSave;
  scanner.rewindToMarker();
  return false;

__lookahead_succeed_:
  _la = _laSave;
  scanner.rewindToMarker();
  return true;
}


bool ps20::ps20_parser::__la_3_ (int depth) throw (ScanException)
{
  int _laSave = _la;
  _la = depth;
  scanner.setMarker();
  
  if ((scanner.la()->id == ps20_token::X)) {
    if (!laConsumeToken(ps20_token::X)) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  } else { 
    if ((scanner.la()->id == ps20_token::Y)) {
      if (!laConsumeToken(ps20_token::Y)) goto __lookahead_fail_;
      if (_la == 0) goto __lookahead_succeed_;
    } else { 
      if ((scanner.la()->id == ps20_token::Z)) {
        if (!laConsumeToken(ps20_token::Z)) goto __lookahead_fail_;
        if (_la == 0) goto __lookahead_succeed_;
      } else { 
        if (!laConsumeToken(ps20_token::W)) goto __lookahead_fail_;
        if (_la == 0) goto __lookahead_succeed_;
      }
    }
  }
  goto __lookahead_succeed_;
  
__lookahead_fail_:
  _la = _laSave;
  scanner.rewindToMarker();
  return false;

__lookahead_succeed_:
  _la = _laSave;
  scanner.rewindToMarker();
  return true;
}


bool ps20::ps20_parser::__la_colorRegister_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::V)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_constantFloatRegister_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::C)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_inputTextureCoordinateRegister_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::T)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  if (__la_4_(1000000000)) {
    if (!__la_writeMask_()) goto __lookahead_fail_;
    if (_la == 0) goto __lookahead_succeed_;
  } else { 
     /* lambda */
  }
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_4_ (int depth) throw (ScanException)
{
  int _laSave = _la;
  _la = depth;
  scanner.setMarker();
  
  if (!__la_writeMask_()) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  goto __lookahead_succeed_;
  
__lookahead_fail_:
  _la = _laSave;
  scanner.rewindToMarker();
  return false;

__lookahead_succeed_:
  _la = _laSave;
  scanner.rewindToMarker();
  return true;
}


bool ps20::ps20_parser::__la_samplerRegister_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::S)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_temporaryRegister_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::R)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_outputColorRegister_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::O_C)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}


bool ps20::ps20_parser::__la_outputDepthRegister_ () throw (ScanException)
{
  if (!laConsumeToken(ps20_token::O_DEPTH)) goto __lookahead_fail_;
  if (_la == 0) goto __lookahead_succeed_;
  
  __lookahead_succeed_:
    return true;
    
  __lookahead_fail_:
    return false;
}





/* End of file. */
