Commit c189b2afe2fb1ba6ae887bf0ea636003e3cc2e9b
1 parent
29ce46252f
Exists in
master
switch sort of working
Showing 6 changed files with 451 additions and 189 deletions Inline Diff
ast_stmt.cc
View file @
c189b2a
/* File: ast_stmt.cc | 1 | 1 | /* File: ast_stmt.cc | |
* ----------------- | 2 | 2 | * ----------------- | |
* Implementation of statement node classes. | 3 | 3 | * Implementation of statement node classes. | |
*/ | 4 | 4 | */ | |
#include "ast_stmt.h" | 5 | 5 | #include "ast_stmt.h" | |
#include "ast_type.h" | 6 | 6 | #include "ast_type.h" | |
#include "ast_decl.h" | 7 | 7 | #include "ast_decl.h" | |
#include "ast_expr.h" | 8 | 8 | #include "ast_expr.h" | |
#include "symtable.h" | 9 | 9 | #include "symtable.h" | |
10 | 10 | |||
#include "irgen.h" | 11 | 11 | #include "irgen.h" | |
#include "llvm/Bitcode/ReaderWriter.h" | 12 | 12 | #include "llvm/Bitcode/ReaderWriter.h" | |
#include "llvm/Support/raw_ostream.h" | 13 | 13 | #include "llvm/Support/raw_ostream.h" | |
14 | 14 | |||
15 | 15 | |||
Program::Program(List<Decl*> *d) { | 16 | 16 | Program::Program(List<Decl*> *d) { | |
Assert(d != NULL); | 17 | 17 | Assert(d != NULL); | |
(decls=d)->SetParentAll(this); | 18 | 18 | (decls=d)->SetParentAll(this); | |
} | 19 | 19 | } | |
20 | 20 | |||
void Program::PrintChildren(int indentLevel) { | 21 | 21 | void Program::PrintChildren(int indentLevel) { | |
decls->PrintAll(indentLevel+1); | 22 | 22 | decls->PrintAll(indentLevel+1); | |
printf("\n"); | 23 | 23 | printf("\n"); | |
} | 24 | 24 | } | |
//pls work | 25 | 25 | //pls work | |
llvm::Value* Program::Emit() { | 26 | 26 | llvm::Value* Program::Emit() { | |
llvm::Module *module = irgen.GetOrCreateModule("program"); | 27 | 27 | llvm::Module *module = irgen.GetOrCreateModule("program"); | |
pushScope(); | 28 | 28 | pushScope(); | |
for (int i = 0; i < decls->NumElements(); i++){ | 29 | 29 | for (int i = 0; i < decls->NumElements(); i++){ | |
decls->Nth(i)->Emit(); | 30 | 30 | decls->Nth(i)->Emit(); | |
} | 31 | 31 | } | |
popScope(); | 32 | 32 | popScope(); | |
33 | 33 | |||
module->dump(); | 34 | 34 | module->dump(); | |
llvm::WriteBitcodeToFile(module, llvm::outs()); | 35 | 35 | llvm::WriteBitcodeToFile(module, llvm::outs()); | |
return NULL; | 36 | 36 | return NULL; | |
} | 37 | 37 | } | |
38 | 38 | |||
StmtBlock::StmtBlock(List<VarDecl*> *d, List<Stmt*> *s) { | 39 | 39 | StmtBlock::StmtBlock(List<VarDecl*> *d, List<Stmt*> *s) { | |
Assert(d != NULL && s != NULL); | 40 | 40 | Assert(d != NULL && s != NULL); | |
(decls=d)->SetParentAll(this); | 41 | 41 | (decls=d)->SetParentAll(this); | |
(stmts=s)->SetParentAll(this); | 42 | 42 | (stmts=s)->SetParentAll(this); | |
} | 43 | 43 | } | |
44 | 44 | |||
void StmtBlock::PrintChildren(int indentLevel) { | 45 | 45 | void StmtBlock::PrintChildren(int indentLevel) { | |
decls->PrintAll(indentLevel+1); | 46 | 46 | decls->PrintAll(indentLevel+1); | |
stmts->PrintAll(indentLevel+1); | 47 | 47 | stmts->PrintAll(indentLevel+1); | |
} | 48 | 48 | } | |
49 | 49 | |||
DeclStmt::DeclStmt(Decl *d) { | 50 | 50 | DeclStmt::DeclStmt(Decl *d) { | |
Assert(d != NULL); | 51 | 51 | Assert(d != NULL); | |
(decl=d)->SetParent(this); | 52 | 52 | (decl=d)->SetParent(this); | |
} | 53 | 53 | } | |
54 | 54 | |||
void DeclStmt::PrintChildren(int indentLevel) { | 55 | 55 | void DeclStmt::PrintChildren(int indentLevel) { | |
decl->Print(indentLevel+1); | 56 | 56 | decl->Print(indentLevel+1); | |
} | 57 | 57 | } | |
58 | 58 | |||
ConditionalStmt::ConditionalStmt(Expr *t, Stmt *b) { | 59 | 59 | ConditionalStmt::ConditionalStmt(Expr *t, Stmt *b) { | |
Assert(t != NULL && b != NULL); | 60 | 60 | Assert(t != NULL && b != NULL); | |
(test=t)->SetParent(this); | 61 | 61 | (test=t)->SetParent(this); | |
(body=b)->SetParent(this); | 62 | 62 | (body=b)->SetParent(this); | |
} | 63 | 63 | } | |
64 | 64 | |||
ForStmt::ForStmt(Expr *i, Expr *t, Expr *s, Stmt *b): LoopStmt(t, b) { | 65 | 65 | ForStmt::ForStmt(Expr *i, Expr *t, Expr *s, Stmt *b): LoopStmt(t, b) { | |
Assert(i != NULL && t != NULL && b != NULL); | 66 | 66 | Assert(i != NULL && t != NULL && b != NULL); | |
(init=i)->SetParent(this); | 67 | 67 | (init=i)->SetParent(this); | |
step = s; | 68 | 68 | step = s; | |
if ( s ) | 69 | 69 | if ( s ) | |
(step=s)->SetParent(this); | 70 | 70 | (step=s)->SetParent(this); | |
} | 71 | 71 | } | |
72 | 72 | |||
void ForStmt::PrintChildren(int indentLevel) { | 73 | 73 | void ForStmt::PrintChildren(int indentLevel) { | |
init->Print(indentLevel+1, "(init) "); | 74 | 74 | init->Print(indentLevel+1, "(init) "); | |
test->Print(indentLevel+1, "(test) "); | 75 | 75 | test->Print(indentLevel+1, "(test) "); | |
if ( step ) | 76 | 76 | if ( step ) | |
step->Print(indentLevel+1, "(step) "); | 77 | 77 | step->Print(indentLevel+1, "(step) "); | |
body->Print(indentLevel+1, "(body) "); | 78 | 78 | body->Print(indentLevel+1, "(body) "); | |
} | 79 | 79 | } | |
80 | 80 | |||
void WhileStmt::PrintChildren(int indentLevel) { | 81 | 81 | void WhileStmt::PrintChildren(int indentLevel) { | |
test->Print(indentLevel+1, "(test) "); | 82 | 82 | test->Print(indentLevel+1, "(test) "); | |
body->Print(indentLevel+1, "(body) "); | 83 | 83 | body->Print(indentLevel+1, "(body) "); | |
} | 84 | 84 | } | |
85 | 85 | |||
IfStmt::IfStmt(Expr *t, Stmt *tb, Stmt *eb): ConditionalStmt(t, tb) { | 86 | 86 | IfStmt::IfStmt(Expr *t, Stmt *tb, Stmt *eb): ConditionalStmt(t, tb) { | |
Assert(t != NULL && tb != NULL); // else can be NULL | 87 | 87 | Assert(t != NULL && tb != NULL); // else can be NULL | |
elseBody = eb; | 88 | 88 | elseBody = eb; | |
if (elseBody) elseBody->SetParent(this); | 89 | 89 | if (elseBody) elseBody->SetParent(this); | |
} | 90 | 90 | } | |
91 | 91 | |||
void IfStmt::PrintChildren(int indentLevel) { | 92 | 92 | void IfStmt::PrintChildren(int indentLevel) { | |
if (test) test->Print(indentLevel+1, "(test) "); | 93 | 93 | if (test) test->Print(indentLevel+1, "(test) "); | |
if (body) body->Print(indentLevel+1, "(then) "); | 94 | 94 | if (body) body->Print(indentLevel+1, "(then) "); | |
if (elseBody) elseBody->Print(indentLevel+1, "(else) "); | 95 | 95 | if (elseBody) elseBody->Print(indentLevel+1, "(else) "); | |
} | 96 | 96 | } | |
97 | 97 | |||
98 | 98 | |||
ReturnStmt::ReturnStmt(yyltype loc, Expr *e) : Stmt(loc) { | 99 | 99 | ReturnStmt::ReturnStmt(yyltype loc, Expr *e) : Stmt(loc) { | |
expr = e; | 100 | 100 | expr = e; | |
if (e != NULL) expr->SetParent(this); | 101 | 101 | if (e != NULL) expr->SetParent(this); | |
} | 102 | 102 | } | |
103 | 103 | |||
void ReturnStmt::PrintChildren(int indentLevel) { | 104 | 104 | void ReturnStmt::PrintChildren(int indentLevel) { | |
if ( expr ) | 105 | 105 | if ( expr ) | |
expr->Print(indentLevel+1); | 106 | 106 | expr->Print(indentLevel+1); | |
} | 107 | 107 | } | |
108 | 108 | |||
SwitchLabel::SwitchLabel(Expr *l, Stmt *s) { | 109 | 109 | SwitchLabel::SwitchLabel(Expr *l, Stmt *s) { | |
Assert(l != NULL && s != NULL); | 110 | 110 | Assert(l != NULL && s != NULL); | |
(label=l)->SetParent(this); | 111 | 111 | (label=l)->SetParent(this); | |
(stmt=s)->SetParent(this); | 112 | 112 | (stmt=s)->SetParent(this); | |
} | 113 | 113 | } | |
114 | 114 | |||
SwitchLabel::SwitchLabel(Stmt *s) { | 115 | 115 | SwitchLabel::SwitchLabel(Stmt *s) { | |
Assert(s != NULL); | 116 | 116 | Assert(s != NULL); | |
label = NULL; | 117 | 117 | label = NULL; | |
(stmt=s)->SetParent(this); | 118 | 118 | (stmt=s)->SetParent(this); | |
} | 119 | 119 | } | |
120 | 120 | |||
void SwitchLabel::PrintChildren(int indentLevel) { | 121 | 121 | void SwitchLabel::PrintChildren(int indentLevel) { | |
if (label) label->Print(indentLevel+1); | 122 | 122 | if (label) label->Print(indentLevel+1); | |
if (stmt) stmt->Print(indentLevel+1); | 123 | 123 | if (stmt) stmt->Print(indentLevel+1); | |
} | 124 | 124 | } | |
125 | 125 | |||
SwitchStmt::SwitchStmt(Expr *e, List<Stmt *> *c, Default *d) { | 126 | 126 | SwitchStmt::SwitchStmt(Expr *e, List<Stmt *> *c, Default *d) { | |
Assert(e != NULL && c != NULL && c->NumElements() != 0 ); | 127 | 127 | Assert(e != NULL && c != NULL && c->NumElements() != 0 ); | |
(expr=e)->SetParent(this); | 128 | 128 | (expr=e)->SetParent(this); | |
(cases=c)->SetParentAll(this); | 129 | 129 | (cases=c)->SetParentAll(this); | |
def = d; | 130 | 130 | def = d; | |
if (def) def->SetParent(this); | 131 | 131 | if (def) def->SetParent(this); | |
} | 132 | 132 | } | |
133 | 133 | |||
void SwitchStmt::PrintChildren(int indentLevel) { | 134 | 134 | void SwitchStmt::PrintChildren(int indentLevel) { | |
if (expr) expr->Print(indentLevel+1); | 135 | 135 | if (expr) expr->Print(indentLevel+1); | |
if (cases) cases->PrintAll(indentLevel+1); | 136 | 136 | if (cases) cases->PrintAll(indentLevel+1); | |
if (def) def->Print(indentLevel+1); | 137 | 137 | if (def) def->Print(indentLevel+1); | |
} | 138 | 138 | } | |
//----------------------------------------------------------------------- | 139 | 139 | //----------------------------------------------------------------------- | |
//rest of the emits | 140 | 140 | //rest of the emits | |
//----------------------------------------------------------------------- | 141 | 141 | //----------------------------------------------------------------------- | |
llvm::Value * StmtBlock::Emit(){ | 142 | 142 | llvm::Value * StmtBlock::Emit(){ | |
pushScope(); | 143 | 143 | pushScope(); | |
for (int i = 0; i < decls->NumElements(); i++){ | 144 | 144 | for (int i = 0; i < decls->NumElements(); i++){ | |
decls->Nth(i)->Emit(); | 145 | 145 | decls->Nth(i)->Emit(); | |
} | 146 | 146 | } | |
for (int i = 0; i < stmts->NumElements(); i++){ | 147 | 147 | for (int i = 0; i < stmts->NumElements(); i++){ | |
stmts->Nth(i)->Emit(); | 148 | 148 | stmts->Nth(i)->Emit(); | |
} | 149 | 149 | } | |
150 | 150 | |||
popScope(); | 151 | 151 | popScope(); | |
return NULL; | 152 | 152 | return NULL; | |
} | 153 | 153 | } | |
154 | 154 | |||
llvm::Value * DeclStmt::Emit(){ | 155 | 155 | llvm::Value * DeclStmt::Emit(){ | |
llvm::Value * val; | 156 | 156 | llvm::Value * val; | |
if (VarDecl * vd = dynamic_cast<VarDecl*>(this->decl)){ | 157 | 157 | if (VarDecl * vd = dynamic_cast<VarDecl*>(this->decl)){ | |
val = vd->Emit(); | 158 | 158 | val = vd->Emit(); | |
} | 159 | 159 | } | |
else if (FnDecl * fd = dynamic_cast<FnDecl*>(this->decl)){ | 160 | 160 | else if (FnDecl * fd = dynamic_cast<FnDecl*>(this->decl)){ | |
val = fd->Emit(); | 161 | 161 | val = fd->Emit(); | |
} | 162 | 162 | } | |
else{ | 163 | 163 | else{ | |
val = NULL; | 164 | 164 | val = NULL; | |
} | 165 | 165 | } | |
return val; | 166 | 166 | return val; | |
} | 167 | 167 | } | |
168 | 168 | |||
llvm::Value * ConditionalStmt::Emit(){ | 169 | 169 | llvm::Value * ConditionalStmt::Emit(){ | |
return NULL; | 170 | 170 | return NULL; | |
} | 171 | 171 | } | |
172 | 172 | |||
llvm::Value * ForStmt::Emit() | 173 | 173 | llvm::Value * ForStmt::Emit() | |
{ | 174 | 174 | { | |
pushScope(); | 175 | 175 | pushScope(); | |
llvm::LLVMContext * context = irgen.GetContext(); | 176 | 176 | llvm::LLVMContext * context = irgen.GetContext(); | |
llvm::Function * f = irgen.GetFunction(); | 177 | 177 | llvm::Function * f = irgen.GetFunction(); | |
llvm::BasicBlock * headBlock = llvm::BasicBlock::Create(*context, "headBlock", f); | 178 | 178 | llvm::BasicBlock * headBlock = llvm::BasicBlock::Create(*context, "headBlock", f); | |
llvm::BasicBlock * footBlock = llvm::BasicBlock::Create(*context, "footBlock", f); | 179 | 179 | llvm::BasicBlock * footBlock = llvm::BasicBlock::Create(*context, "footBlock", f); | |
llvm::BasicBlock * stepBlock = llvm::BasicBlock::Create(*context, "stepBlock", f); | 180 | 180 | llvm::BasicBlock * stepBlock = llvm::BasicBlock::Create(*context, "stepBlock", f); | |
llvm::BasicBlock * bodyBlock = llvm::BasicBlock::Create(*context, "bodyBlock", f); | 181 | 181 | llvm::BasicBlock * bodyBlock = llvm::BasicBlock::Create(*context, "bodyBlock", f); | |
llvm::Value * cond; | 182 | 182 | llvm::Value * cond; | |
183 | 183 | |||
// init and branch to head | 184 | 184 | // init and branch to head | |
init->Emit(); | 185 | 185 | init->Emit(); | |
186 | 186 | |||
llvm::BranchInst::Create(headBlock, irgen.GetBasicBlock()); // given in the slides | 187 | 187 | llvm::BranchInst::Create(headBlock, irgen.GetBasicBlock()); // given in the slides | |
188 | 188 | |||
// head | 189 | 189 | // head | |
irgen.SetBasicBlock(headBlock); | 190 | 190 | irgen.SetBasicBlock(headBlock); | |
cond = test->Emit(); | 191 | 191 | cond = test->Emit(); | |
if(!irgen.GetBasicBlock()->getTerminator()) | 192 | 192 | if(!irgen.GetBasicBlock()->getTerminator()) | |
{ | 193 | 193 | { | |
llvm::BranchInst::Create(bodyBlock, footBlock, cond, irgen.GetBasicBlock()); // given in the slides | 194 | 194 | llvm::BranchInst::Create(bodyBlock, footBlock, cond, irgen.GetBasicBlock()); // given in the slides | |
} | 195 | 195 | } | |
// body | 196 | 196 | // body | |
irgen.SetBasicBlock(bodyBlock); | 197 | 197 | irgen.SetBasicBlock(bodyBlock); | |
body->Emit(); | 198 | 198 | body->Emit(); | |
if(!irgen.GetBasicBlock()->getTerminator()) | 199 | 199 | if(!irgen.GetBasicBlock()->getTerminator()) | |
{ | 200 | 200 | { | |
llvm::BranchInst::Create(stepBlock, irgen.GetBasicBlock()); // given in the slides | 201 | 201 | llvm::BranchInst::Create(stepBlock, irgen.GetBasicBlock()); // given in the slides | |
} | 202 | 202 | } | |
// step | 203 | 203 | // step | |
irgen.SetBasicBlock(stepBlock); | 204 | 204 | irgen.SetBasicBlock(stepBlock); | |
step->Emit(); | 205 | 205 | step->Emit(); | |
if(!irgen.GetBasicBlock()->getTerminator()) | 206 | 206 | if(!irgen.GetBasicBlock()->getTerminator()) | |
{ | 207 | 207 | { | |
llvm::BranchInst::Create(headBlock, irgen.GetBasicBlock()); // given in the slides | 208 | 208 | llvm::BranchInst::Create(headBlock, irgen.GetBasicBlock()); // given in the slides | |
} | 209 | 209 | } | |
irgen.SetBasicBlock(footBlock); | 210 | 210 | irgen.SetBasicBlock(footBlock); | |
popScope(); | 211 | 211 | popScope(); | |
return NULL; | 212 | 212 | return NULL; | |
} | 213 | 213 | } | |
214 | 214 | |||
//while statement | 215 | 215 | //while statement | |
llvm::Value * WhileStmt::Emit(){ | 216 | 216 | llvm::Value * WhileStmt::Emit(){ | |
pushScope(); | 217 | 217 | pushScope(); | |
llvm::LLVMContext * context = irgen.GetContext(); | 218 | 218 | llvm::LLVMContext * context = irgen.GetContext(); | |
llvm::Function * f = irgen.GetFunction(); | 219 | 219 | llvm::Function * f = irgen.GetFunction(); | |
llvm::Value * cond; | 220 | 220 | llvm::Value * cond; | |
221 | 221 | |||
llvm::BasicBlock * headBlock = llvm::BasicBlock::Create(*context, "headBlock", f); | 222 | 222 | llvm::BasicBlock * headBlock = llvm::BasicBlock::Create(*context, "headBlock", f); | |
llvm::BasicBlock * footBlock = llvm::BasicBlock::Create(*context, "footBlock", f); | 223 | 223 | llvm::BasicBlock * footBlock = llvm::BasicBlock::Create(*context, "footBlock", f); | |
llvm::BasicBlock * bodyBlock = llvm::BasicBlock::Create(*context, "bodyBlock", f); | 224 | 224 | llvm::BasicBlock * bodyBlock = llvm::BasicBlock::Create(*context, "bodyBlock", f); | |
llvm::BranchInst::Create(headBlock, irgen.GetBasicBlock()); | 225 | 225 | llvm::BranchInst::Create(headBlock, irgen.GetBasicBlock()); | |
226 | 226 | |||
irgen.SetBasicBlock(headBlock); | 227 | 227 | irgen.SetBasicBlock(headBlock); | |
cond = test->Emit(); | 228 | 228 | cond = test->Emit(); | |
if(!irgen.GetBasicBlock()->getTerminator()) | 229 | 229 | if(!irgen.GetBasicBlock()->getTerminator()) | |
{ | 230 | 230 | { | |
llvm::BranchInst::Create(bodyBlock, footBlock, cond, irgen.GetBasicBlock()); // given in the slides | 231 | 231 | llvm::BranchInst::Create(bodyBlock, footBlock, cond, irgen.GetBasicBlock()); // given in the slides | |
} | 232 | 232 | } | |
233 | 233 | |||
irgen.SetBasicBlock(bodyBlock); | 234 | 234 | irgen.SetBasicBlock(bodyBlock); | |
body->Emit(); | 235 | 235 | body->Emit(); | |
if(!irgen.GetBasicBlock()->getTerminator()) | 236 | 236 | if(!irgen.GetBasicBlock()->getTerminator()) | |
{ | 237 | 237 | { | |
llvm::BranchInst::Create(headBlock, irgen.GetBasicBlock()); // given in the slides | 238 | 238 | llvm::BranchInst::Create(headBlock, irgen.GetBasicBlock()); // given in the slides | |
} | 239 | 239 | } | |
240 | 240 | |||
irgen.SetBasicBlock(footBlock); | 241 | 241 | irgen.SetBasicBlock(footBlock); | |
popScope(); | 242 | 242 | popScope(); | |
return NULL; | 243 | 243 | return NULL; | |
} | 244 | 244 | } | |
245 | 245 | |||
246 | 246 | |||
//if statement | 247 | 247 | //if statement | |
llvm::Value * IfStmt::Emit(){ | 248 | 248 | llvm::Value * IfStmt::Emit(){ | |
llvm::LLVMContext * context = irgen.GetContext(); | 249 | 249 | llvm::LLVMContext * context = irgen.GetContext(); | |
llvm::Function * func = irgen.GetFunction(); | 250 | 250 | llvm::Function * func = irgen.GetFunction(); | |
llvm::BasicBlock * elseBlock = NULL; | 251 | 251 | llvm::BasicBlock * elseBlock = NULL; | |
llvm::BasicBlock * thenBlock = llvm::BasicBlock::Create(*context, "thenBlock", func); | 252 | 252 | llvm::BasicBlock * thenBlock = llvm::BasicBlock::Create(*context, "thenBlock", func); | |
llvm::BasicBlock * footBlock = llvm::BasicBlock::Create(*context, "footBlock", func); | 253 | 253 | llvm::BasicBlock * footBlock = llvm::BasicBlock::Create(*context, "footBlock", func); | |
llvm::Value * val; | 254 | 254 | llvm::Value * val; | |
llvm::Value * condition = test->Emit(); | 255 | 255 | llvm::Value * condition = test->Emit(); | |
if(elseBody) | 256 | 256 | if(elseBody) | |
{ | 257 | 257 | { | |
elseBlock = llvm::BasicBlock::Create(*context, "elseBlock", func); | 258 | 258 | elseBlock = llvm::BasicBlock::Create(*context, "elseBlock", func); | |
} | 259 | 259 | } | |
260 | 260 | |||
val = llvm::BranchInst::Create(thenBlock, elseBody ? elseBlock : footBlock, condition, irgen.GetBasicBlock()); | 261 | 261 | val = llvm::BranchInst::Create(thenBlock, elseBody ? elseBlock : footBlock, condition, irgen.GetBasicBlock()); | |
pushScope(); | 262 | 262 | pushScope(); | |
irgen.SetBasicBlock(thenBlock); | 263 | 263 | irgen.SetBasicBlock(thenBlock); | |
body->Emit(); | 264 | 264 | body->Emit(); | |
265 | 265 | |||
if(!irgen.GetBasicBlock()->getTerminator()) | 266 | 266 | if(!irgen.GetBasicBlock()->getTerminator()) | |
{ | 267 | 267 | { | |
val = llvm::BranchInst::Create(footBlock, irgen.GetBasicBlock()); | 268 | 268 | val = llvm::BranchInst::Create(footBlock, irgen.GetBasicBlock()); | |
} | 269 | 269 | } | |
popScope(); | 270 | 270 | popScope(); | |
271 | 271 | |||
if(elseBody) | 272 | 272 | if(elseBody) | |
{ | 273 | 273 | { | |
pushScope(); | 274 | 274 | pushScope(); | |
irgen.SetBasicBlock(elseBlock); | 275 | 275 | irgen.SetBasicBlock(elseBlock); | |
elseBody->Emit(); | 276 | 276 | elseBody->Emit(); | |
277 | 277 | |||
if(!irgen.GetBasicBlock()->getTerminator()) | 278 | 278 | if(!irgen.GetBasicBlock()->getTerminator()) | |
{ | 279 | 279 | { | |
val = llvm::BranchInst::Create(footBlock, irgen.GetBasicBlock()); | 280 | 280 | val = llvm::BranchInst::Create(footBlock, irgen.GetBasicBlock()); | |
} | 281 | 281 | } | |
popScope(); | 282 | 282 | popScope(); | |
} | 283 | 283 | } | |
irgen.SetBasicBlock(footBlock); | 284 | 284 | irgen.SetBasicBlock(footBlock); | |
return val; | 285 | 285 | return val; | |
} | 286 | 286 | } | |
287 | 287 | |||
llvm::Value * BreakStmt::Emit(){ | 288 | 288 | llvm::Value * BreakStmt::Emit(){ | |
//goes to footer | 289 | 289 | //goes to footer | |
llvm::Value * val; | 290 | 290 | llvm::Value * val; | |
llvm::LLVMContext * context = irgen.GetContext(); | 291 | 291 | llvm::LLVMContext * context = irgen.GetContext(); | |
llvm::Function * func = irgen.GetFunction(); | 292 | 292 | llvm::Function * func = irgen.GetFunction(); | |
llvm::BasicBlock * breakBlock = llvm::BasicBlock::Create(*context, "breakBlock", func); | 293 | 293 | llvm::BasicBlock * breakBlock = llvm::BasicBlock::Create(*context, "breakBlock", func); | |
val=llvm::BranchInst::Create (breakBlock, irgen.GetFooterBlock()); | 294 | 294 | val=llvm::BranchInst::Create (breakBlock, irgen.GetFooterBlock()); | |
return val; | 295 | 295 | return val; | |
} | 296 | 296 | } | |
297 | 297 | |||
llvm::Value * ContinueStmt::Emit(){ | 298 | 298 | llvm::Value * ContinueStmt::Emit(){ | |
llvm::Value * val; | 299 | 299 | llvm::Value * val; | |
llvm::LLVMContext * context = irgen.GetContext(); | 300 | 300 | llvm::LLVMContext * context = irgen.GetContext(); | |
llvm::Function * func = irgen.GetFunction(); | 301 | 301 | llvm::Function * func = irgen.GetFunction(); | |
llvm::BasicBlock * contBlock = llvm::BasicBlock::Create(*context, "contBlock", func); | 302 | 302 | llvm::BasicBlock * contBlock = llvm::BasicBlock::Create(*context, "contBlock", func); | |
val=llvm::BranchInst::Create (contBlock, irgen.GetHeaderBlock()); | 303 | 303 | val=llvm::BranchInst::Create (contBlock, irgen.GetHeaderBlock()); | |
return val; | 304 | 304 | return val; | |
} | 305 | 305 | } | |
306 | 306 | |||
//Not sure | 307 | 307 | //Not sure | |
llvm::Value * ReturnStmt::Emit(){ | 308 | 308 | llvm::Value * ReturnStmt::Emit(){ | |
llvm::Value * val; | 309 | 309 | llvm::Value * val; | |
llvm::LLVMContext * context = irgen.GetContext(); | 310 | 310 | llvm::LLVMContext * context = irgen.GetContext(); | |
if (expr){ | 311 | 311 | if (expr){ | |
llvm::Value * retVal = expr->Emit(); | 312 | 312 | llvm::Value * retVal = expr->Emit(); | |
retVal = llvm::ReturnInst::Create(*context, retVal, irgen.GetBasicBlock()); | 313 | 313 | retVal = llvm::ReturnInst::Create(*context, retVal, irgen.GetBasicBlock()); | |
return retVal; | 314 | 314 | return retVal; | |
} | 315 | 315 | } | |
val = llvm::ReturnInst::Create(*context, irgen.GetBasicBlock()); | 316 | 316 | val = llvm::ReturnInst::Create(*context, irgen.GetBasicBlock()); | |
return val; | 317 | 317 | return val; | |
} | 318 | 318 | } | |
//stack for both | 319 | 319 | //stack for both | |
320 | 320 | |||
321 | ||||
322 | // TODO : DEFAULT DOESN'T WORK RIGHT AND ONLY THE FIRST STATEMENT IN A BLOCK IS USED | |||
llvm::Value * SwitchStmt::Emit(){ | 321 | 323 | llvm::Value * SwitchStmt::Emit(){ | |
322 | 324 | |||
llvm::SwitchInst * val; | 323 | 325 | llvm::SwitchInst * val; | |
llvm::LLVMContext * context = irgen.GetContext(); | 324 | 326 | llvm::LLVMContext * context = irgen.GetContext(); | |
llvm::Function * func = irgen.GetFunction(); | 325 | 327 | llvm::Function * func = irgen.GetFunction(); | |
vector<llvm::BasicBlock *> blockArr; | 326 | 328 | vector<llvm::BasicBlock *> blockArr; |
parser.y
View file @
c189b2a
/* File: parser.y | 1 | 1 | /* File: parser.y | |
* -------------- | 2 | 2 | * -------------- | |
* Bison input file to generate the parser for the compiler. | 3 | 3 | * Bison input file to generate the parser for the compiler. | |
* | 4 | 4 | * | |
* pp2: your job is to write a parser that will construct the parse tree | 5 | 5 | * pp2: your job is to write a parser that will construct the parse tree | |
* and if no parse errors were found, print it. The parser should | 6 | 6 | * and if no parse errors were found, print it. The parser should | |
* accept the language as described in specification, and as augmented | 7 | 7 | * accept the language as described in specification, and as augmented | |
* in the pp2 handout. | 8 | 8 | * in the pp2 handout. | |
*/ | 9 | 9 | */ | |
10 | 10 | |||
%{ | 11 | 11 | %{ | |
12 | 12 | |||
/* Just like lex, the text within this first region delimited by %{ and %} | 13 | 13 | /* Just like lex, the text within this first region delimited by %{ and %} | |
* is assumed to be C/C++ code and will be copied verbatim to the y.tab.c | 14 | 14 | * is assumed to be C/C++ code and will be copied verbatim to the y.tab.c | |
* file ahead of the definitions of the yyparse() function. Add other header | 15 | 15 | * file ahead of the definitions of the yyparse() function. Add other header | |
* file inclusions or C++ variable declarations/prototypes that are needed | 16 | 16 | * file inclusions or C++ variable declarations/prototypes that are needed | |
* by your code here. | 17 | 17 | * by your code here. | |
*/ | 18 | 18 | */ | |
#include "scanner.h" // for yylex | 19 | 19 | #include "scanner.h" // for yylex | |
#include "parser.h" | 20 | 20 | #include "parser.h" | |
#include "errors.h" | 21 | 21 | #include "errors.h" | |
22 | 22 | |||
void yyerror(const char *msg); // standard error-handling routine | 23 | 23 | void yyerror(const char *msg); // standard error-handling routine | |
24 | 24 | |||
%} | 25 | 25 | %} | |
26 | 26 | |||
/* The section before the first %% is the Definitions section of the yacc | 27 | 27 | /* The section before the first %% is the Definitions section of the yacc | |
* input file. Here is where you declare tokens and types, add precedence | 28 | 28 | * input file. Here is where you declare tokens and types, add precedence | |
* and associativity options, and so on. | 29 | 29 | * and associativity options, and so on. | |
*/ | 30 | 30 | */ | |
31 | 31 | |||
/* yylval | 32 | 32 | /* yylval | |
* ------ | 33 | 33 | * ------ | |
* Here we define the type of the yylval global variable that is used by | 34 | 34 | * Here we define the type of the yylval global variable that is used by | |
* the scanner to store attibute information about the token just scanned | 35 | 35 | * the scanner to store attibute information about the token just scanned | |
* and thus communicate that information to the parser. | 36 | 36 | * and thus communicate that information to the parser. | |
* | 37 | 37 | * | |
* pp2: You will need to add new fields to this union as you add different | 38 | 38 | * pp2: You will need to add new fields to this union as you add different | |
* attributes to your non-terminal symbols. | 39 | 39 | * attributes to your non-terminal symbols. | |
*/ | 40 | 40 | */ | |
%union { | 41 | 41 | %union { | |
int integerConstant; | 42 | 42 | int integerConstant; | |
bool boolConstant; | 43 | 43 | bool boolConstant; | |
double floatConstant; | 44 | 44 | double floatConstant; | |
char identifier[MaxIdentLen+1]; // +1 for terminating null | 45 | 45 | char identifier[MaxIdentLen+1]; // +1 for terminating null | |
Decl *decl; | 46 | 46 | Decl *decl; | |
FnDecl *funcDecl; | 47 | 47 | FnDecl *funcDecl; | |
List<Decl*> *declList; | 48 | 48 | List<Decl*> *declList; | |
Type *typeDecl; | 49 | 49 | Type *typeDecl; | |
TypeQualifier *typeQualifier; | 50 | 50 | TypeQualifier *typeQualifier; | |
Expr *expression; | 51 | 51 | Expr *expression; | |
VarDecl *varDecl; | 52 | 52 | VarDecl *varDecl; | |
List<VarDecl *> *varDeclList; | 53 | 53 | List<VarDecl *> *varDeclList; | |
List<Stmt*> *stmtList; | 54 | 54 | List<Stmt*> *stmtList; | |
Stmt *stmt; | 55 | 55 | Stmt *stmt; | |
Operator *ops; | 56 | 56 | Operator *ops; | |
Identifier *funcId; | 57 | 57 | Identifier *funcId; | |
List<Expr*> *argList; | 58 | 58 | List<Expr*> *argList; | |
} | 59 | 59 | } | |
60 | 60 | |||
61 | 61 | |||
/* Tokens | 62 | 62 | /* Tokens | |
* ------ | 63 | 63 | * ------ | |
* Here we tell yacc about all the token types that we are using. | 64 | 64 | * Here we tell yacc about all the token types that we are using. | |
* Bison will assign unique numbers to these and export the #define | 65 | 65 | * Bison will assign unique numbers to these and export the #define | |
* in the generated y.tab.h header file. | 66 | 66 | * in the generated y.tab.h header file. | |
*/ | 67 | 67 | */ | |
%token T_Void T_Bool T_Int T_Float T_Uint | 68 | 68 | %token T_Void T_Bool T_Int T_Float T_Uint | |
%token T_Bvec2 T_Bvec3 T_Bvec4 T_Ivec2 T_Ivec3 T_Ivec4 | 69 | 69 | %token T_Bvec2 T_Bvec3 T_Bvec4 T_Ivec2 T_Ivec3 T_Ivec4 | |
%token T_Uvec2 T_Uvec3 T_Uvec4 T_Vec2 T_Vec3 T_Vec4 | 70 | 70 | %token T_Uvec2 T_Uvec3 T_Uvec4 T_Vec2 T_Vec3 T_Vec4 | |
%token T_Mat2 T_Mat3 T_Mat4 | 71 | 71 | %token T_Mat2 T_Mat3 T_Mat4 | |
%token T_While T_For T_If T_Else T_Return T_Break T_Continue T_Do | 72 | 72 | %token T_While T_For T_If T_Else T_Return T_Break T_Continue T_Do | |
%token T_Switch T_Case T_Default | 73 | 73 | %token T_Switch T_Case T_Default | |
%token T_In T_Out T_Const T_Uniform | 74 | 74 | %token T_In T_Out T_Const T_Uniform | |
%token T_LeftParen T_RightParen T_LeftBracket T_RightBracket T_LeftBrace T_RightBrace | 75 | 75 | %token T_LeftParen T_RightParen T_LeftBracket T_RightBracket T_LeftBrace T_RightBrace | |
%token T_Dot T_Comma T_Colon T_Semicolon T_Question | 76 | 76 | %token T_Dot T_Comma T_Colon T_Semicolon T_Question | |
77 | 77 | |||
%token <identifier> T_LessEqual T_GreaterEqual T_EQ T_NE | 78 | 78 | %token <identifier> T_LessEqual T_GreaterEqual T_EQ T_NE | |
%token <identifier> T_And T_Or | 79 | 79 | %token <identifier> T_And T_Or | |
%token <identifier> T_Plus T_Star | 80 | 80 | %token <identifier> T_Plus T_Star | |
%token <identifier> T_MulAssign T_DivAssign T_AddAssign T_SubAssign T_Equal | 81 | 81 | %token <identifier> T_MulAssign T_DivAssign T_AddAssign T_SubAssign T_Equal | |
%token <identifier> T_LeftAngle T_RightAngle T_Dash T_Slash | 82 | 82 | %token <identifier> T_LeftAngle T_RightAngle T_Dash T_Slash | |
%token <identifier> T_Inc T_Dec | 83 | 83 | %token <identifier> T_Inc T_Dec | |
%token <identifier> T_Identifier | 84 | 84 | %token <identifier> T_Identifier | |
%token <integerConstant> T_IntConstant | 85 | 85 | %token <integerConstant> T_IntConstant | |
%token <floatConstant> T_FloatConstant | 86 | 86 | %token <floatConstant> T_FloatConstant | |
%token <boolConstant> T_BoolConstant | 87 | 87 | %token <boolConstant> T_BoolConstant | |
%token <identifier> T_FieldSelection | 88 | 88 | %token <identifier> T_FieldSelection | |
89 | 89 | |||
%nonassoc LOWEST | 90 | 90 | %nonassoc LOWEST | |
%nonassoc LOWER_THAN_ELSE | 91 | 91 | %nonassoc LOWER_THAN_ELSE | |
%nonassoc T_Else | 92 | 92 | %nonassoc T_Else | |
%right T_Equal T_MulAssign T_DivAssign T_AddAssign T_SubAssign | 93 | 93 | %right T_Equal T_MulAssign T_DivAssign T_AddAssign T_SubAssign | |
%right T_Question T_Colon | 94 | 94 | %right T_Question T_Colon | |
%left T_EQ T_NE T_LeftAngle T_RightAngle T_And T_Or T_GreaterEqual | 95 | 95 | %left T_EQ T_NE T_LeftAngle T_RightAngle T_And T_Or T_GreaterEqual | |
%left T_Plus T_Dash T_Star T_Slash | 96 | 96 | %left T_Plus T_Dash T_Star T_Slash | |
97 | 97 | |||
/* Non-terminal types | 98 | 98 | /* Non-terminal types | |
* ------------------ | 99 | 99 | * ------------------ | |
* In order for yacc to assign/access the correct field of $$, $1, we | 100 | 100 | * In order for yacc to assign/access the correct field of $$, $1, we | |
* must to declare which field is appropriate for the non-terminal. | 101 | 101 | * must to declare which field is appropriate for the non-terminal. | |
* As an example, this first type declaration establishes that the DeclList | 102 | 102 | * As an example, this first type declaration establishes that the DeclList | |
* non-terminal uses the field named "declList" in the yylval union. This | 103 | 103 | * non-terminal uses the field named "declList" in the yylval union. This | |
* means that when we are setting $$ for a reduction for DeclList ore reading | 104 | 104 | * means that when we are setting $$ for a reduction for DeclList ore reading | |
* $n which corresponds to a DeclList nonterminal we are accessing the field | 105 | 105 | * $n which corresponds to a DeclList nonterminal we are accessing the field | |
* of the union named "declList" which is of type List<Decl*>. | 106 | 106 | * of the union named "declList" which is of type List<Decl*>. | |
* pp2: You'll need to add many of these of your own. | 107 | 107 | * pp2: You'll need to add many of these of your own. | |
*/ | 108 | 108 | */ | |
%type <declList> DeclList | 109 | 109 | %type <declList> DeclList | |
%type <decl> Decl | 110 | 110 | %type <decl> Decl | |
%type <decl> Declaration | 111 | 111 | %type <decl> Declaration | |
%type <funcDecl> FuncDecl | 112 | 112 | %type <funcDecl> FuncDecl | |
%type <typeDecl> TypeDecl | 113 | 113 | %type <typeDecl> TypeDecl | |
%type <typeQualifier> TypeQualify | 114 | 114 | %type <typeQualifier> TypeQualify | |
%type <expression> PrimaryExpr PostfixExpr UnaryExpr MultiExpr AdditionExpr RelationExpr Initializer FunctionCallExpr FunctionCallHeaderWithParameters FunctionCallHeaderNoParameters | 115 | 115 | %type <expression> PrimaryExpr PostfixExpr UnaryExpr MultiExpr AdditionExpr RelationExpr Initializer FunctionCallExpr FunctionCallHeaderWithParameters FunctionCallHeaderNoParameters | |
%type <expression> EqualityExpr LogicAndExpr LogicOrExpr Expression | 116 | 116 | %type <expression> EqualityExpr LogicAndExpr LogicOrExpr Expression | |
/*%type <floatConstant> Initializer*/ | 117 | 117 | /*%type <floatConstant> Initializer*/ | |
%type <varDecl> SingleDecl | 118 | 118 | %type <varDecl> SingleDecl | |
%type <varDeclList> ParameterList | 119 | 119 | %type <varDeclList> ParameterList | |
%type <stmt> Statement | 120 | 120 | %type <stmt> Statement | |
%type <stmtList> StatementList | 121 | 121 | %type <stmtList> StatementList | |
%type <stmt> SingleStatement SelectionStmt SwitchStmt CaseStmt JumpStmt WhileStmt ForStmt | 122 | 122 | %type <stmt> SingleStatement SelectionStmt SwitchStmt CaseStmt JumpStmt WhileStmt ForStmt | |
%type <stmt> CompoundStatement | 123 | 123 | %type <stmt> CompoundStatement | |
%type <ops> AssignOp | 124 | 124 | %type <ops> AssignOp | |
%type <funcId> FunctionIdentifier | 125 | 125 | %type <funcId> FunctionIdentifier | |
%type <argList> ArgumentList | 126 | 126 | %type <argList> ArgumentList | |
127 | 127 | |||
%% | 128 | 128 | %% | |
/* Rules | 129 | 129 | /* Rules | |
* ----- | 130 | 130 | * ----- | |
* All productions and actions should be placed between the start and stop | 131 | 131 | * All productions and actions should be placed between the start and stop | |
* %% markers which delimit the Rules section. | 132 | 132 | * %% markers which delimit the Rules section. | |
133 | 133 | |||
*/ | 134 | 134 | */ | |
Program : DeclList { | 135 | 135 | Program : DeclList { | |
@1; | 136 | 136 | @1; | |
/* pp2: The @1 is needed to convince | 137 | 137 | /* pp2: The @1 is needed to convince | |
* yacc to set up yylloc. You can remove | 138 | 138 | * yacc to set up yylloc. You can remove | |
* it once you have other uses of @n*/ | 139 | 139 | * it once you have other uses of @n*/ | |
Program *program = new Program($1); | 140 | 140 | Program *program = new Program($1); | |
// if no errors, advance to next phase | 141 | 141 | // if no errors, advance to next phase | |
if (ReportError::NumErrors() == 0) { | 142 | 142 | if (ReportError::NumErrors() == 0) { | |
if ( IsDebugOn("dumpAST") ) { | 143 | 143 | if ( IsDebugOn("dumpAST") ) { | |
program->Print(0); | 144 | 144 | program->Print(0); | |
} | 145 | 145 | } | |
program->Emit(); | 146 | 146 | program->Emit(); | |
} | 147 | 147 | } | |
} | 148 | 148 | } | |
; | 149 | 149 | ; | |
150 | 150 | |||
DeclList : DeclList Decl { ($$=$1)->Append($2); } | 151 | 151 | DeclList : DeclList Decl { ($$=$1)->Append($2); } | |
| Decl { ($$ = new List<Decl*>)->Append($1); } | 152 | 152 | | Decl { ($$ = new List<Decl*>)->Append($1); } | |
; | 153 | 153 | ; | |
154 | 154 | |||
/* combine external_declaration and function_definition into a single rule | 155 | 155 | /* combine external_declaration and function_definition into a single rule | |
* external_declaration: | 156 | 156 | * external_declaration: | |
* function_definition | 157 | 157 | * function_definition | |
* declaration | 158 | 158 | * declaration | |
* function_definition: | 159 | 159 | * function_definition: | |
* function_prototype compound_statement | 160 | 160 | * function_prototype compound_statement | |
*/ | 161 | 161 | */ | |
162 | 162 | |||
Decl : Declaration { $$ = $1; } | 163 | 163 | Decl : Declaration { $$ = $1; } | |
| FuncDecl CompoundStatement { $1->SetFunctionBody($2); $$ = $1; } | 164 | 164 | | FuncDecl CompoundStatement { $1->SetFunctionBody($2); $$ = $1; } | |
; | 165 | 165 | ; | |
166 | 166 | |||
/* combine declaration and init_decl_list into a single rule | 167 | 167 | /* combine declaration and init_decl_list into a single rule | |
* declaration: | 168 | 168 | * declaration: | |
* function_prototype SEMICOLON | 169 | 169 | * function_prototype SEMICOLON | |
* init_decl_list SEMICOLON | 170 | 170 | * init_decl_list SEMICOLON | |
* init_decl_list: | 171 | 171 | * init_decl_list: | |
* single_declaration | 172 | 172 | * single_declaration | |
*/ | 173 | 173 | */ | |
174 | 174 | |||
Declaration : FuncDecl T_Semicolon { $$ = $1; } | 175 | 175 | Declaration : FuncDecl T_Semicolon { $$ = $1; } | |
| SingleDecl T_Semicolon { $$ = $1; } | 176 | 176 | | SingleDecl T_Semicolon { $$ = $1; } | |
; | 177 | 177 | ; | |
178 | 178 | |||
FuncDecl : TypeDecl T_Identifier T_LeftParen T_RightParen | 179 | 179 | FuncDecl : TypeDecl T_Identifier T_LeftParen T_RightParen | |
{ | 180 | 180 | { | |
Identifier *id = new Identifier(yylloc, (const char *)$2); | 181 | 181 | Identifier *id = new Identifier(yylloc, (const char *)$2); | |
List<VarDecl *> *formals = new List<VarDecl *>; | 182 | 182 | List<VarDecl *> *formals = new List<VarDecl *>; | |
$$ = new FnDecl(id, $1, formals); | 183 | 183 | $$ = new FnDecl(id, $1, formals); | |
} | 184 | 184 | } | |
| TypeDecl T_Identifier T_LeftParen ParameterList T_RightParen | 185 | 185 | | TypeDecl T_Identifier T_LeftParen ParameterList T_RightParen | |
{ | 186 | 186 | { | |
Identifier *id = new Identifier(yylloc, (const char *)$2); | 187 | 187 | Identifier *id = new Identifier(yylloc, (const char *)$2); | |
$$ = new FnDecl(id, $1, $4); | 188 | 188 | $$ = new FnDecl(id, $1, $4); | |
} | 189 | 189 | } | |
; | 190 | 190 | ; | |
191 | 191 | |||
ParameterList : SingleDecl { ($$ = new List<VarDecl *>)->Append($1); } | 192 | 192 | ParameterList : SingleDecl { ($$ = new List<VarDecl *>)->Append($1); } | |
| ParameterList T_Comma SingleDecl { ($$ = $1)->Append($3); } | 193 | 193 | | ParameterList T_Comma SingleDecl { ($$ = $1)->Append($3); } | |
; | 194 | 194 | ; | |
195 | 195 | |||
SingleDecl : TypeDecl T_Identifier | 196 | 196 | SingleDecl : TypeDecl T_Identifier | |
{ | 197 | 197 | { | |
Identifier *id = new Identifier(yylloc, (const char *)$2); | 198 | 198 | Identifier *id = new Identifier(yylloc, (const char *)$2); | |
$$ = new VarDecl(id, $1); | 199 | 199 | $$ = new VarDecl(id, $1); | |
} | 200 | 200 | } | |
| TypeQualify TypeDecl T_Identifier | 201 | 201 | | TypeQualify TypeDecl T_Identifier | |
{ | 202 | 202 | { | |
Identifier *id = new Identifier(yylloc, (const char *)$3); | 203 | 203 | Identifier *id = new Identifier(yylloc, (const char *)$3); | |
$$ = new VarDecl(id, $2, $1); | 204 | 204 | $$ = new VarDecl(id, $2, $1); | |
} | 205 | 205 | } | |
| TypeDecl T_Identifier T_Equal Initializer | 206 | 206 | | TypeDecl T_Identifier T_Equal Initializer | |
{ | 207 | 207 | { | |
// incomplete: drop the initializer here | 208 | 208 | // incomplete: drop the initializer here | |
Identifier *id = new Identifier(yylloc, (const char *)$2); | 209 | 209 | Identifier *id = new Identifier(yylloc, (const char *)$2); | |
$$ = new VarDecl(id, $1, $4); | 210 | 210 | $$ = new VarDecl(id, $1, $4); | |
} | 211 | 211 | } | |
| TypeQualify TypeDecl T_Identifier T_Equal Initializer | 212 | 212 | | TypeQualify TypeDecl T_Identifier T_Equal Initializer | |
{ | 213 | 213 | { | |
Identifier *id = new Identifier(yylloc, (const char *)$3); | 214 | 214 | Identifier *id = new Identifier(yylloc, (const char *)$3); | |
$$ = new VarDecl(id, $2, $1, $5); | 215 | 215 | $$ = new VarDecl(id, $2, $1, $5); | |
} | 216 | 216 | } | |
| TypeDecl T_Identifier T_LeftBracket T_IntConstant T_RightBracket | 217 | 217 | | TypeDecl T_Identifier T_LeftBracket T_IntConstant T_RightBracket | |
{ | 218 | 218 | { | |
Identifier *id = new Identifier(@2, (const char *)$2); | 219 | 219 | Identifier *id = new Identifier(@2, (const char *)$2); | |
$$ = new VarDecl(id, new ArrayType(@1, $1, $4)); | 220 | 220 | $$ = new VarDecl(id, new ArrayType(@1, $1, $4)); | |
} | 221 | 221 | } | |
| TypeQualify TypeDecl T_Identifier T_LeftBracket T_IntConstant T_RightBracket | 222 | 222 | | TypeQualify TypeDecl T_Identifier T_LeftBracket T_IntConstant T_RightBracket | |
{ | 223 | 223 | { | |
Identifier *id = new Identifier(@3, $3); | 224 | 224 | Identifier *id = new Identifier(@3, $3); | |
$$ = new VarDecl(id, new ArrayType(@2, $2, $5), $1); | 225 | 225 | $$ = new VarDecl(id, new ArrayType(@2, $2, $5), $1); | |
} | 226 | 226 | } | |
227 | 227 | |||
; | 228 | 228 | ; | |
229 | 229 | |||
Initializer : Expression { $$ = $1; } | 230 | 230 | Initializer : Expression { $$ = $1; } | |
; | 231 | 231 | ; | |
232 | 232 | |||
TypeQualify : T_In {$$ = TypeQualifier::inTypeQualifier;} | 233 | 233 | TypeQualify : T_In {$$ = TypeQualifier::inTypeQualifier;} | |
| T_Out {$$ = TypeQualifier::outTypeQualifier;} | 234 | 234 | | T_Out {$$ = TypeQualifier::outTypeQualifier;} | |
| T_Const {$$ = TypeQualifier::constTypeQualifier;} | 235 | 235 | | T_Const {$$ = TypeQualifier::constTypeQualifier;} | |
| T_Uniform {$$ = TypeQualifier::uniformTypeQualifier;} | 236 | 236 | | T_Uniform {$$ = TypeQualifier::uniformTypeQualifier;} | |
; | 237 | 237 | ; | |
238 | 238 | |||
TypeDecl : T_Int { $$ = Type::intType; } | 239 | 239 | TypeDecl : T_Int { $$ = Type::intType; } | |
| T_Void { $$ = Type::voidType; } | 240 | 240 | | T_Void { $$ = Type::voidType; } | |
| T_Float { $$ = Type::floatType; } | 241 | 241 | | T_Float { $$ = Type::floatType; } | |
| T_Bool { $$ = Type::boolType; } | 242 | 242 | | T_Bool { $$ = Type::boolType; } | |
| T_Vec2 { $$ = Type::vec2Type; } | 243 | 243 | | T_Vec2 { $$ = Type::vec2Type; } | |
| T_Vec3 { $$ = Type::vec3Type; } | 244 | 244 | | T_Vec3 { $$ = Type::vec3Type; } | |
| T_Vec4 { $$ = Type::vec4Type; } | 245 | 245 | | T_Vec4 { $$ = Type::vec4Type; } | |
| T_Mat2 { $$ = Type::mat2Type; } | 246 | 246 | | T_Mat2 { $$ = Type::mat2Type; } | |
| T_Mat3 { $$ = Type::mat3Type; } | 247 | 247 | | T_Mat3 { $$ = Type::mat3Type; } | |
| T_Mat4 { $$ = Type::mat4Type; } | 248 | 248 | | T_Mat4 { $$ = Type::mat4Type; } | |
; | 249 | 249 | ; | |
250 | 250 | |||
CompoundStatement : T_LeftBrace T_RightBrace { $$ = new StmtBlock(new List<VarDecl*>, new List<Stmt *>); } | 251 | 251 | CompoundStatement : T_LeftBrace T_RightBrace { $$ = new StmtBlock(new List<VarDecl*>, new List<Stmt *>); } | |
| T_LeftBrace StatementList T_RightBrace { $$ = new StmtBlock(new List<VarDecl*>, $2); } | 252 | 252 | | T_LeftBrace StatementList T_RightBrace { $$ = new StmtBlock(new List<VarDecl*>, $2); } | |
; | 253 | 253 | ; | |
254 | 254 | |||
StatementList : Statement { ($$ = new List<Stmt*>)->Append($1); } | 255 | 255 | StatementList : Statement { ($$ = new List<Stmt*>)->Append($1); } | |
| StatementList Statement { ($$ = $1)->Append($2); } | 256 | 256 | | StatementList Statement { ($$ = $1)->Append($2); } | |
; | 257 | 257 | ; | |
258 | 258 | |||
Statement : CompoundStatement { $$ = $1; } | 259 | 259 | Statement : CompoundStatement { $$ = $1; } | |
| SingleStatement { $$ = $1; } | 260 | 260 | | SingleStatement { $$ = $1; } | |
; | 261 | 261 | ; | |
262 | 262 | |||
SingleStatement : T_Semicolon { $$ = new EmptyExpr(); } | 263 | 263 | SingleStatement : T_Semicolon { $$ = new EmptyExpr(); } | |
| SingleDecl T_Semicolon | 264 | 264 | | SingleDecl T_Semicolon | |
{ | 265 | 265 | { | |
$$ = new DeclStmt($1); | 266 | 266 | $$ = new DeclStmt($1); | |
} | 267 | 267 | } | |
| Expression T_Semicolon { $$ = $1; } | 268 | 268 | | Expression T_Semicolon { $$ = $1; } | |
| SelectionStmt { $$ = $1; } | 269 | 269 | | SelectionStmt { $$ = $1; } | |
| SwitchStmt { $$ = $1; } | 270 | 270 | | SwitchStmt { $$ = $1; } | |
| CaseStmt { $$ = $1; } | 271 | 271 | | CaseStmt { $$ = $1; } | |
| JumpStmt { $$ = $1; } | 272 | 272 | | JumpStmt { $$ = $1; } | |
| WhileStmt { $$ = $1; } | 273 | 273 | | WhileStmt { $$ = $1; } | |
| ForStmt { $$ = $1; } | 274 | 274 | | ForStmt { $$ = $1; } | |
; | 275 | 275 | ; | |
276 | 276 | |||
SelectionStmt : T_If T_LeftParen Expression T_RightParen Statement T_Else Statement | 277 | 277 | SelectionStmt : T_If T_LeftParen Expression T_RightParen Statement T_Else Statement | |
{ | 278 | 278 | { | |
$$ = new IfStmt($3, $5, $7); | 279 | 279 | $$ = new IfStmt($3, $5, $7); | |
} | 280 | 280 | } | |
| T_If T_LeftParen Expression T_RightParen Statement %prec LOWER_THAN_ELSE | 281 | 281 | | T_If T_LeftParen Expression T_RightParen Statement %prec LOWER_THAN_ELSE | |
{ | 282 | 282 | { | |
$$ = new IfStmt($3, $5, NULL); | 283 | 283 | $$ = new IfStmt($3, $5, NULL); | |
} | 284 | 284 | } | |
; | 285 | 285 | ; | |
286 | 286 | |||
SwitchStmt : T_Switch T_LeftParen Expression T_RightParen T_LeftBrace StatementList T_RightBrace | 287 | 287 | SwitchStmt : T_Switch T_LeftParen Expression T_RightParen T_LeftBrace StatementList T_RightBrace | |
{ | 288 | 288 | { | |
$$ = new SwitchStmt($3, $6, NULL); | 289 | 289 | $$ = new SwitchStmt($3, $6, NULL); | |
} | 290 | 290 | } | |
; | 291 | 291 | ; | |
CaseStmt : T_Case Expression T_Colon Statement { $$ = new Case($2, $4); } | 292 | 292 | CaseStmt : T_Case Expression T_Colon Statement { $$ = new Case($2, $4); } | |
| T_Default T_Colon Statement { $$ = new Default($3); } | 293 | 293 | | T_Default T_Colon Statement { $$ = new Default($3); } | |
; | 294 | 294 | ; | |
295 | 295 | |||
JumpStmt : T_Break T_Semicolon { $$ = new BreakStmt(yylloc); } | 296 | 296 | JumpStmt : T_Break T_Semicolon { $$ = new BreakStmt(yylloc); } | |
| T_Continue T_Semicolon { $$ = new ContinueStmt(yylloc); } | 297 | 297 | | T_Continue T_Semicolon { $$ = new ContinueStmt(yylloc); } | |
| T_Return T_Semicolon { $$ = new ReturnStmt(yylloc); } | 298 | 298 | | T_Return T_Semicolon { $$ = new ReturnStmt(yylloc); } | |
| T_Return Expression T_Semicolon { $$ = new ReturnStmt(yyloc, $2); } | 299 | 299 | | T_Return Expression T_Semicolon { $$ = new ReturnStmt(yyloc, $2); } | |
; | 300 | 300 | ; | |
301 | 301 | |||
WhileStmt : T_While T_LeftParen Expression T_RightParen Statement { $$ = new WhileStmt($3, $5); } | 302 | 302 | WhileStmt : T_While T_LeftParen Expression T_RightParen Statement { $$ = new WhileStmt($3, $5); } | |
; | 303 | 303 | ; | |
304 | 304 | |||
ForStmt : T_For T_LeftParen Expression T_Semicolon Expression T_Semicolon Expression T_RightParen Statement | 305 | 305 | ForStmt : T_For T_LeftParen Expression T_Semicolon Expression T_Semicolon Expression T_RightParen Statement | |
{ | 306 | 306 | { | |
$$ = new ForStmt($3, $5, $7, $9); | 307 | 307 | $$ = new ForStmt($3, $5, $7, $9); | |
} | 308 | 308 | } | |
; | 309 | 309 | ; | |
310 | 310 | |||
PrimaryExpr : T_Identifier { Identifier *id = new Identifier(yylloc, (const char*)$1); | 311 | 311 | PrimaryExpr : T_Identifier { Identifier *id = new Identifier(yylloc, (const char*)$1); | |
$$ = new VarExpr(yyloc, id); | 312 | 312 | $$ = new VarExpr(yyloc, id); | |
} | 313 | 313 | } | |
| T_IntConstant { $$ = new IntConstant(yylloc, $1); } | 314 | 314 | | T_IntConstant { $$ = new IntConstant(yylloc, $1); } | |
| T_FloatConstant { $$ = new FloatConstant(yylloc, $1); } | 315 | 315 | | T_FloatConstant { $$ = new FloatConstant(yylloc, $1); } | |
| T_BoolConstant { $$ = new BoolConstant(yylloc, $1); } | 316 | 316 | | T_BoolConstant { $$ = new BoolConstant(yylloc, $1); } | |
| T_LeftParen Expression T_RightParen { $$ = $2;} | 317 | 317 | | T_LeftParen Expression T_RightParen { $$ = $2;} | |
; | 318 | 318 | ; | |
319 | 319 | |||
FunctionCallExpr : FunctionCallHeaderWithParameters T_RightParen { $$ = $1; } | 320 | 320 | FunctionCallExpr : FunctionCallHeaderWithParameters T_RightParen { $$ = $1; } | |
| FunctionCallHeaderNoParameters T_RightParen { $$ = $1; } | 321 | 321 | | FunctionCallHeaderNoParameters T_RightParen { $$ = $1; } | |
; | 322 | 322 | ; | |
323 | 323 | |||
FunctionCallHeaderNoParameters : FunctionIdentifier T_LeftParen T_Void { $$ = new Call(@1, NULL, $1, new List<Expr*>); } | 324 | 324 | FunctionCallHeaderNoParameters : FunctionIdentifier T_LeftParen T_Void { $$ = new Call(@1, NULL, $1, new List<Expr*>); } | |
| FunctionIdentifier T_LeftParen { $$ = new Call(@1, NULL, $1, new List<Expr*>); } | 325 | 325 | | FunctionIdentifier T_LeftParen { $$ = new Call(@1, NULL, $1, new List<Expr*>); } | |
; | 326 | 326 | ; | |
327 | 327 | |||
FunctionCallHeaderWithParameters : FunctionIdentifier T_LeftParen ArgumentList { $$ = new Call(@1, NULL, $1, $3);} | 328 | 328 | FunctionCallHeaderWithParameters : FunctionIdentifier T_LeftParen ArgumentList { $$ = new Call(@1, NULL, $1, $3);} | |
; | 329 | 329 | ; | |
330 | 330 | |||
ArgumentList : Expression { ($$ = new List<Expr*>)->Append($1);} | 331 | 331 | ArgumentList : Expression { ($$ = new List<Expr*>)->Append($1);} | |
| ArgumentList T_Comma Expression { ($$ = $1)->Append($3);} | 332 | 332 | | ArgumentList T_Comma Expression { ($$ = $1)->Append($3);} | |
; | 333 | 333 | ; | |
334 | 334 | |||
FunctionIdentifier : T_Identifier { $$ = new Identifier(@1, $1); } | 335 | 335 | FunctionIdentifier : T_Identifier { $$ = new Identifier(@1, $1); } | |
; | 336 | 336 | ; | |
337 | 337 | |||
PostfixExpr : PrimaryExpr { $$ = $1; } | 338 | 338 | PostfixExpr : PrimaryExpr { $$ = $1; } | |
| PostfixExpr T_LeftBracket Expression T_RightBracket { $$ = new ArrayAccess(@1, $1, $3); } | 339 | 339 | | PostfixExpr T_LeftBracket Expression T_RightBracket { $$ = new ArrayAccess(@1, $1, $3); } | |
| FunctionCallExpr | 340 | 340 | | FunctionCallExpr | |
{ | 341 | 341 | { | |
} | 342 | 342 | } | |
| PostfixExpr T_Inc | 343 | 343 | | PostfixExpr T_Inc | |
{ | 344 | 344 | { | |
Operator *op = new Operator(yylloc, (const char *)$2); | 345 | 345 | Operator *op = new Operator(yylloc, (const char *)$2); | |
$$ = new PostfixExpr($1, op); | 346 | 346 | $$ = new PostfixExpr($1, op); | |
} | 347 | 347 | } | |
| PostfixExpr T_Dec | 348 | 348 | | PostfixExpr T_Dec | |
{ | 349 | 349 | { | |
Operator *op = new Operator(yylloc, (const char *)$2); | 350 | 350 | Operator *op = new Operator(yylloc, (const char *)$2); | |
$$ = new PostfixExpr($1, op); | 351 | 351 | $$ = new PostfixExpr($1, op); | |
} | 352 | 352 | } | |
| PostfixExpr T_Dot T_FieldSelection | 353 | 353 | | PostfixExpr T_Dot T_FieldSelection | |
{ | 354 | 354 | { | |
Identifier *id = new Identifier(yylloc, (const char *)$3); | 355 | 355 | Identifier *id = new Identifier(yylloc, (const char *)$3); | |
$$ = new FieldAccess($1, id); | 356 | 356 | $$ = new FieldAccess($1, id); | |
} | 357 | 357 | } | |
; | 358 | 358 | ; | |
359 | 359 | |||
UnaryExpr : PostfixExpr { $$ = $1; } | 360 | 360 | UnaryExpr : PostfixExpr { $$ = $1; } | |
| T_Inc UnaryExpr | 361 | 361 | | T_Inc UnaryExpr | |
{ | 362 | 362 | { | |
Operator *op = new Operator(yylloc, $1); | 363 | 363 | Operator *op = new Operator(yylloc, $1); | |
$$ = new ArithmeticExpr(op, $2); | 364 | 364 | $$ = new ArithmeticExpr(op, $2); | |
} | 365 | 365 | } | |
| T_Dec UnaryExpr | 366 | 366 | | T_Dec UnaryExpr | |
{ | 367 | 367 | { | |
Operator *op = new Operator(yylloc, $1); | 368 | 368 | Operator *op = new Operator(yylloc, $1); | |
$$ = new ArithmeticExpr(op, $2); | 369 | 369 | $$ = new ArithmeticExpr(op, $2); | |
} | 370 | 370 | } | |
| T_Plus UnaryExpr | 371 | 371 | | T_Plus UnaryExpr | |
{ | 372 | 372 | { | |
Operator *op = new Operator(yylloc, $1); | 373 | 373 | Operator *op = new Operator(yylloc, $1); | |
$$ = new ArithmeticExpr(op, $2); | 374 | 374 | $$ = new ArithmeticExpr(op, $2); | |
} | 375 | 375 | } | |
| T_Dash UnaryExpr | 376 | 376 | | T_Dash UnaryExpr | |
{ | 377 | 377 | { | |
Operator *op = new Operator(yylloc, $1); | 378 | 378 | Operator *op = new Operator(yylloc, $1); | |
$$ = new ArithmeticExpr(op, $2); | 379 | 379 | $$ = new ArithmeticExpr(op, $2); | |
} | 380 | 380 | } | |
; | 381 | 381 | ; | |
382 | 382 | |||
MultiExpr : UnaryExpr { $$ = $1; } | 383 | 383 | MultiExpr : UnaryExpr { $$ = $1; } | |
| MultiExpr T_Star UnaryExpr | 384 | 384 | | MultiExpr T_Star UnaryExpr | |
{ | 385 | 385 | { | |
Operator *op = new Operator(yylloc, $2); | 386 | 386 | Operator *op = new Operator(yylloc, $2); | |
$$ = new ArithmeticExpr($1, op, $3); | 387 | 387 | $$ = new ArithmeticExpr($1, op, $3); | |
} | 388 | 388 | } | |
| MultiExpr T_Slash UnaryExpr | 389 | 389 | | MultiExpr T_Slash UnaryExpr | |
{ | 390 | 390 | { | |
Operator *op = new Operator(yylloc, $2); | 391 | 391 | Operator *op = new Operator(yylloc, $2); | |
$$ = new ArithmeticExpr($1, op, $3); | 392 | 392 | $$ = new ArithmeticExpr($1, op, $3); | |
} | 393 | 393 | } | |
; | 394 | 394 | ; | |
395 | 395 | |||
AdditionExpr : MultiExpr { $$ = $1; } | 396 | 396 | AdditionExpr : MultiExpr { $$ = $1; } | |
| AdditionExpr T_Plus MultiExpr | 397 | 397 | | AdditionExpr T_Plus MultiExpr | |
{ | 398 | 398 | { | |
Operator *op = new Operator(yylloc, $2); | 399 | 399 | Operator *op = new Operator(yylloc, $2); | |
$$ = new ArithmeticExpr($1, op, $3); | 400 | 400 | $$ = new ArithmeticExpr($1, op, $3); | |
} | 401 | 401 | } | |
| AdditionExpr T_Dash MultiExpr | 402 | 402 | | AdditionExpr T_Dash MultiExpr | |
{ | 403 | 403 | { | |
Operator *op = new Operator(yylloc, $2); | 404 | 404 | Operator *op = new Operator(yylloc, $2); | |
$$ = new ArithmeticExpr($1, op, $3); | 405 | 405 | $$ = new ArithmeticExpr($1, op, $3); | |
} | 406 | 406 | } | |
; | 407 | 407 | ; | |
408 | 408 | |||
RelationExpr : AdditionExpr { $$ = $1; } | 409 | 409 | RelationExpr : AdditionExpr { $$ = $1; } | |
| RelationExpr T_LeftAngle AdditionExpr | 410 | 410 | | RelationExpr T_LeftAngle AdditionExpr | |
{ | 411 | 411 | { | |
Operator *op = new Operator(yylloc, $2); | 412 | 412 | Operator *op = new Operator(yylloc, $2); | |
$$ = new RelationalExpr($1, op, $3); | 413 | 413 | $$ = new RelationalExpr($1, op, $3); | |
} | 414 | 414 | } | |
| RelationExpr T_RightAngle AdditionExpr | 415 | 415 | | RelationExpr T_RightAngle AdditionExpr | |
{ | 416 | 416 | { | |
Operator *op = new Operator(yylloc, $2); | 417 | 417 | Operator *op = new Operator(yylloc, $2); | |
$$ = new RelationalExpr($1, op, $3); | 418 | 418 | $$ = new RelationalExpr($1, op, $3); | |
} | 419 | 419 | } | |
| RelationExpr T_GreaterEqual AdditionExpr | 420 | 420 | | RelationExpr T_GreaterEqual AdditionExpr | |
{ | 421 | 421 | { | |
Operator *op = new Operator(yylloc, $2); | 422 | 422 | Operator *op = new Operator(yylloc, $2); | |
$$ = new RelationalExpr($1, op, $3); | 423 | 423 | $$ = new RelationalExpr($1, op, $3); | |
} | 424 | 424 | } | |
| RelationExpr T_LessEqual AdditionExpr | 425 | 425 | | RelationExpr T_LessEqual AdditionExpr | |
{ | 426 | 426 | { | |
Operator *op = new Operator(yylloc, $2); | 427 | 427 | Operator *op = new Operator(yylloc, $2); | |
$$ = new RelationalExpr($1, op, $3); | 428 | 428 | $$ = new RelationalExpr($1, op, $3); | |
} | 429 | 429 | } | |
; | 430 | 430 | ; | |
431 | 431 | |||
EqualityExpr : RelationExpr { $$ = $1; } | 432 | 432 | EqualityExpr : RelationExpr { $$ = $1; } | |
| EqualityExpr T_EQ RelationExpr | 433 | 433 | | EqualityExpr T_EQ RelationExpr | |
{ | 434 | 434 | { | |
Operator *op = new Operator(yylloc, $2); | 435 | 435 | Operator *op = new Operator(yylloc, $2); | |
$$ = new ArithmeticExpr($1, op, $3); | 436 | 436 | $$ = new EqualityExpr($1, op, $3); | |
} | 437 | 437 | } | |
| EqualityExpr T_NE RelationExpr | 438 | 438 | | EqualityExpr T_NE RelationExpr | |
{ | 439 | 439 | { | |
Operator *op = new Operator(yylloc, $2); | 440 | 440 | Operator *op = new Operator(yylloc, $2); | |
$$ = new ArithmeticExpr($1, op, $3); | 441 | 441 | $$ = new EqualityExpr($1, op, $3); | |
} | 442 | 442 | } | |
; | 443 | 443 | ; | |
444 | 444 | |||
LogicAndExpr : EqualityExpr { $$ = $1; } | 445 | 445 | LogicAndExpr : EqualityExpr { $$ = $1; } | |
| LogicAndExpr T_And EqualityExpr | 446 | 446 | | LogicAndExpr T_And EqualityExpr | |
{ | 447 | 447 | { | |
Operator *op = new Operator(yylloc, $2); | 448 | 448 | Operator *op = new Operator(yylloc, $2); | |
$$ = new ArithmeticExpr($1, op, $3); | 449 | 449 | $$ = new LogicalExpr($1, op, $3); | |
} | 450 | 450 | } | |
; | 451 | 451 | ; | |
452 | 452 | |||
LogicOrExpr : LogicAndExpr { $$ = $1; } | 453 | 453 | LogicOrExpr : LogicAndExpr { $$ = $1; } | |
| LogicOrExpr T_Or LogicAndExpr | 454 | 454 | | LogicOrExpr T_Or LogicAndExpr | |
{ | 455 | 455 | { | |
Operator *op = new Operator(yylloc, $2); | 456 | 456 | Operator *op = new Operator(yylloc, $2); |
test.sh
View file @
c189b2a
#!/bin/bash | 1 | 1 | #!/bin/bash | |
2 | 2 | |||
set -bm | 3 | 3 | set -bm | |
trap 'if [[ $? -eq 139 ]]; then echo "segfault $testbasename!" >> $testbasename.out; fi' CHLD | 4 | 4 | trap 'if [[ $? -eq 139 ]]; then echo "segfault $testbasename!" >> $testbasename.out; fi' CHLD | |
5 | 5 | |||
if (! [ -d public_samples ]); then | 6 | 6 | if (! [ -d Checkpoint ]); then | |
echo "public_samples folder not found. Creating one for you" | 7 | 7 | echo "Checkpoint folder not found. Creating one for you" | |
echo "Copy all .glsl .dat and .out test file inside this folder" | 8 | 8 | echo "Copy all .glsl .dat and .out test file inside this folder" | |
mkdir public_samples | 9 | 9 | mkdir Checkpoint | |
exit 1 | 10 | 10 | exit 1 | |
fi | 11 | 11 | fi | |
12 | 12 | |||
echo "Compiling ..." | 13 | 13 | echo "Compiling ..." | |
make | 14 | 14 | make | |
15 | 15 | |||
echo "Compiling Done" | 16 | 16 | echo "Compiling Done" | |
17 | 17 | |||
if cd public_samples; then | 18 | 18 | if cd Checkpoint; then | |
cp ../glc ./ | 19 | 19 | cp ../glc ./ | |
chmod +x ./gli | 20 | 20 | chmod +x ./gli | |
21 | 21 | |||
if (! [ -f ../gli ]); then | 22 | 22 | if (! [ -f ../gli ]); then | |
echo "gli is not present" | 23 | 23 | echo "gli is not present" | |
exit 1 | 24 | 24 | exit 1 | |
fi | 25 | 25 | fi | |
cp ../gli ./ | 26 | 26 | cp ../gli ./ | |
chmod +x ./gli | 27 | 27 | chmod +x ./gli | |
else | 28 | 28 | else | |
echo "Could not change diretcory to samples ..Quiting " | 29 | 29 | echo "Could not change diretcory to samples ..Quiting " | |
exit 1 | 30 | 30 | exit 1 | |
fi | 31 | 31 | fi | |
32 | 32 | |||
if [ -f glc ]; then | 33 | 33 | if [ -f glc ]; then | |
for testname in $PWD/*.glsl | 34 | 34 | for testname in $PWD/*.glsl | |
do | 35 | 35 | do | |
testid=$(basename $testname) | 36 | 36 | testid=$(basename $testname) | |
testbasename=${testid%.glsl} | 37 | 37 | testbasename=${testid%.glsl} | |
38 | echo "testing $testbasename" | |||
rm -rf "$testbasename".ll | 38 | 39 | rm -rf "$testbasename".ll | |
rm -rf "$testbasename".bc | 39 | 40 | rm -rf "$testbasename".bc | |
./glc <$testname > $testbasename.bc | 40 | 41 | ./glc <$testname > $testbasename.bc | |
llvm-dis $testbasename.bc | 41 | 42 | llvm-dis $testbasename.bc | |
./gli $testbasename.bc > $testbasename.myout | 42 | 43 | ./gli $testbasename.bc > $testbasename.myout | |
done | 43 | 44 | done | |
44 | 45 | |||
for testname in $PWD/*.out | 45 | 46 | for testname in $PWD/*.out | |
do | 46 | 47 | do | |
testid=$(basename $testname) | 47 | 48 | testid=$(basename $testname) | |
testbasename=${testid%.out} | 48 | 49 | testbasename=${testid%.out} | |
if cmp -s "$testbasename.myout" "$testbasename.out" | 49 | 50 | if cmp -s "$testbasename.myout" "$testbasename.out" | |
then | 50 | 51 | then | |
echo "$testbasename Passed..Cleaning debug files for this test" | 51 | 52 | echo "$testbasename Passed..Cleaning debug files for this test" | |
rm $testbasename.ll | 52 | 53 | rm $testbasename.ll | |
rm $testbasename.bc | 53 | 54 | rm $testbasename.bc | |
else | 54 | 55 | else | |
echo "$testbasename Failed" | 55 | 56 | echo "$testbasename Failed" | |
fi | 56 | 57 | fi | |
done | 57 | 58 | done | |
rm -rf gli | 58 | 59 | rm -rf gli |
y.output
View file @
c189b2a
Terminals which are not used | 1 | 1 | Terminals unused in grammar | |
2 | 2 | |||
T_Uint | 3 | 3 | T_Uint | |
T_Bvec2 | 4 | 4 | T_Bvec2 | |
T_Bvec3 | 5 | 5 | T_Bvec3 | |
T_Bvec4 | 6 | 6 | T_Bvec4 | |
T_Ivec2 | 7 | 7 | T_Ivec2 | |
T_Ivec3 | 8 | 8 | T_Ivec3 | |
T_Ivec4 | 9 | 9 | T_Ivec4 | |
T_Uvec2 | 10 | 10 | T_Uvec2 | |
T_Uvec3 | 11 | 11 | T_Uvec3 | |
T_Uvec4 | 12 | 12 | T_Uvec4 | |
T_Do | 13 | 13 | T_Do | |
LOWEST | 14 | 14 | LOWEST | |
15 | 15 | |||
16 | 16 | |||
Grammar | 17 | 17 | Grammar | |
18 | 18 | |||
0 $accept: Program $end | 19 | 19 | 0 $accept: Program $end | |
20 | 20 | |||
1 Program: DeclList | 21 | 21 | 1 Program: DeclList | |
22 | 22 | |||
2 DeclList: DeclList Decl | 23 | 23 | 2 DeclList: DeclList Decl | |
3 | Decl | 24 | 24 | 3 | Decl | |
25 | 25 | |||
4 Decl: Declaration | 26 | 26 | 4 Decl: Declaration | |
5 | FuncDecl CompoundStatement | 27 | 27 | 5 | FuncDecl CompoundStatement | |
28 | 28 | |||
6 Declaration: FuncDecl T_Semicolon | 29 | 29 | 6 Declaration: FuncDecl T_Semicolon | |
7 | SingleDecl T_Semicolon | 30 | 30 | 7 | SingleDecl T_Semicolon | |
31 | 31 | |||
8 FuncDecl: TypeDecl T_Identifier T_LeftParen T_RightParen | 32 | 32 | 8 FuncDecl: TypeDecl T_Identifier T_LeftParen T_RightParen | |
9 | TypeDecl T_Identifier T_LeftParen ParameterList T_RightParen | 33 | 33 | 9 | TypeDecl T_Identifier T_LeftParen ParameterList T_RightParen | |
34 | 34 | |||
10 ParameterList: SingleDecl | 35 | 35 | 10 ParameterList: SingleDecl | |
11 | ParameterList T_Comma SingleDecl | 36 | 36 | 11 | ParameterList T_Comma SingleDecl | |
37 | 37 | |||
12 SingleDecl: TypeDecl T_Identifier | 38 | 38 | 12 SingleDecl: TypeDecl T_Identifier | |
13 | TypeQualify TypeDecl T_Identifier | 39 | 39 | 13 | TypeQualify TypeDecl T_Identifier | |
14 | TypeDecl T_Identifier T_Equal Initializer | 40 | 40 | 14 | TypeDecl T_Identifier T_Equal Initializer | |
15 | TypeQualify TypeDecl T_Identifier T_Equal Initializer | 41 | 41 | 15 | TypeQualify TypeDecl T_Identifier T_Equal Initializer | |
16 | TypeDecl T_Identifier T_LeftBracket T_IntConstant T_RightBracket | 42 | 42 | 16 | TypeDecl T_Identifier T_LeftBracket T_IntConstant T_RightBracket | |
17 | TypeQualify TypeDecl T_Identifier T_LeftBracket T_IntConstant T_RightBracket | 43 | 43 | 17 | TypeQualify TypeDecl T_Identifier T_LeftBracket T_IntConstant T_RightBracket | |
44 | 44 | |||
18 Initializer: Expression | 45 | 45 | 18 Initializer: Expression | |
46 | 46 | |||
19 TypeQualify: T_In | 47 | 47 | 19 TypeQualify: T_In | |
20 | T_Out | 48 | 48 | 20 | T_Out | |
21 | T_Const | 49 | 49 | 21 | T_Const | |
22 | T_Uniform | 50 | 50 | 22 | T_Uniform | |
51 | 51 | |||
23 TypeDecl: T_Int | 52 | 52 | 23 TypeDecl: T_Int | |
24 | T_Void | 53 | 53 | 24 | T_Void | |
25 | T_Float | 54 | 54 | 25 | T_Float | |
26 | T_Bool | 55 | 55 | 26 | T_Bool | |
27 | T_Vec2 | 56 | 56 | 27 | T_Vec2 | |
28 | T_Vec3 | 57 | 57 | 28 | T_Vec3 | |
29 | T_Vec4 | 58 | 58 | 29 | T_Vec4 | |
30 | T_Mat2 | 59 | 59 | 30 | T_Mat2 | |
31 | T_Mat3 | 60 | 60 | 31 | T_Mat3 | |
32 | T_Mat4 | 61 | 61 | 32 | T_Mat4 | |
62 | 62 | |||
33 CompoundStatement: T_LeftBrace T_RightBrace | 63 | 63 | 33 CompoundStatement: T_LeftBrace T_RightBrace | |
34 | T_LeftBrace StatementList T_RightBrace | 64 | 64 | 34 | T_LeftBrace StatementList T_RightBrace | |
65 | 65 | |||
35 StatementList: Statement | 66 | 66 | 35 StatementList: Statement | |
36 | StatementList Statement | 67 | 67 | 36 | StatementList Statement | |
68 | 68 | |||
37 Statement: CompoundStatement | 69 | 69 | 37 Statement: CompoundStatement | |
38 | SingleStatement | 70 | 70 | 38 | SingleStatement | |
71 | 71 | |||
39 SingleStatement: T_Semicolon | 72 | 72 | 39 SingleStatement: T_Semicolon | |
40 | SingleDecl T_Semicolon | 73 | 73 | 40 | SingleDecl T_Semicolon | |
41 | Expression T_Semicolon | 74 | 74 | 41 | Expression T_Semicolon | |
42 | SelectionStmt | 75 | 75 | 42 | SelectionStmt | |
43 | SwitchStmt | 76 | 76 | 43 | SwitchStmt | |
44 | CaseStmt | 77 | 77 | 44 | CaseStmt | |
45 | JumpStmt | 78 | 78 | 45 | JumpStmt | |
46 | WhileStmt | 79 | 79 | 46 | WhileStmt | |
47 | ForStmt | 80 | 80 | 47 | ForStmt | |
81 | 81 | |||
48 SelectionStmt: T_If T_LeftParen Expression T_RightParen Statement T_Else Statement | 82 | 82 | 48 SelectionStmt: T_If T_LeftParen Expression T_RightParen Statement T_Else Statement | |
49 | T_If T_LeftParen Expression T_RightParen Statement | 83 | 83 | 49 | T_If T_LeftParen Expression T_RightParen Statement | |
84 | 84 | |||
50 SwitchStmt: T_Switch T_LeftParen Expression T_RightParen T_LeftBrace StatementList T_RightBrace | 85 | 85 | 50 SwitchStmt: T_Switch T_LeftParen Expression T_RightParen T_LeftBrace StatementList T_RightBrace | |
86 | 86 | |||
51 CaseStmt: T_Case Expression T_Colon Statement | 87 | 87 | 51 CaseStmt: T_Case Expression T_Colon Statement | |
52 | T_Default T_Colon Statement | 88 | 88 | 52 | T_Default T_Colon Statement | |
89 | 89 | |||
53 JumpStmt: T_Break T_Semicolon | 90 | 90 | 53 JumpStmt: T_Break T_Semicolon | |
54 | T_Continue T_Semicolon | 91 | 91 | 54 | T_Continue T_Semicolon | |
55 | T_Return T_Semicolon | 92 | 92 | 55 | T_Return T_Semicolon | |
56 | T_Return Expression T_Semicolon | 93 | 93 | 56 | T_Return Expression T_Semicolon | |
94 | 94 | |||
57 WhileStmt: T_While T_LeftParen Expression T_RightParen Statement | 95 | 95 | 57 WhileStmt: T_While T_LeftParen Expression T_RightParen Statement | |
96 | 96 | |||
58 ForStmt: T_For T_LeftParen Expression T_Semicolon Expression T_Semicolon Expression T_RightParen Statement | 97 | 97 | 58 ForStmt: T_For T_LeftParen Expression T_Semicolon Expression T_Semicolon Expression T_RightParen Statement | |
98 | 98 | |||
59 PrimaryExpr: T_Identifier | 99 | 99 | 59 PrimaryExpr: T_Identifier | |
60 | T_IntConstant | 100 | 100 | 60 | T_IntConstant | |
61 | T_FloatConstant | 101 | 101 | 61 | T_FloatConstant | |
62 | T_BoolConstant | 102 | 102 | 62 | T_BoolConstant | |
63 | T_LeftParen Expression T_RightParen | 103 | 103 | 63 | T_LeftParen Expression T_RightParen | |
104 | 104 | |||
64 FunctionCallExpr: FunctionCallHeaderWithParameters T_RightParen | 105 | 105 | 64 FunctionCallExpr: FunctionCallHeaderWithParameters T_RightParen | |
65 | FunctionCallHeaderNoParameters T_RightParen | 106 | 106 | 65 | FunctionCallHeaderNoParameters T_RightParen | |
107 | 107 | |||
66 FunctionCallHeaderNoParameters: FunctionIdentifier T_LeftParen T_Void | 108 | 108 | 66 FunctionCallHeaderNoParameters: FunctionIdentifier T_LeftParen T_Void | |
67 | FunctionIdentifier T_LeftParen | 109 | 109 | 67 | FunctionIdentifier T_LeftParen | |
110 | 110 | |||
68 FunctionCallHeaderWithParameters: FunctionIdentifier T_LeftParen ArgumentList | 111 | 111 | 68 FunctionCallHeaderWithParameters: FunctionIdentifier T_LeftParen ArgumentList | |
112 | 112 | |||
69 ArgumentList: Expression | 113 | 113 | 69 ArgumentList: Expression | |
70 | ArgumentList T_Comma Expression | 114 | 114 | 70 | ArgumentList T_Comma Expression | |
115 | 115 | |||
71 FunctionIdentifier: T_Identifier | 116 | 116 | 71 FunctionIdentifier: T_Identifier | |
117 | 117 | |||
72 PostfixExpr: PrimaryExpr | 118 | 118 | 72 PostfixExpr: PrimaryExpr | |
73 | PostfixExpr T_LeftBracket Expression T_RightBracket | 119 | 119 | 73 | PostfixExpr T_LeftBracket Expression T_RightBracket | |
74 | FunctionCallExpr | 120 | 120 | 74 | FunctionCallExpr | |
75 | PostfixExpr T_Inc | 121 | 121 | 75 | PostfixExpr T_Inc | |
76 | PostfixExpr T_Dec | 122 | 122 | 76 | PostfixExpr T_Dec | |
77 | PostfixExpr T_Dot T_FieldSelection | 123 | 123 | 77 | PostfixExpr T_Dot T_FieldSelection | |
124 | 124 | |||
78 UnaryExpr: PostfixExpr | 125 | 125 | 78 UnaryExpr: PostfixExpr | |
79 | T_Inc UnaryExpr | 126 | 126 | 79 | T_Inc UnaryExpr | |
80 | T_Dec UnaryExpr | 127 | 127 | 80 | T_Dec UnaryExpr | |
81 | T_Plus UnaryExpr | 128 | 128 | 81 | T_Plus UnaryExpr | |
82 | T_Dash UnaryExpr | 129 | 129 | 82 | T_Dash UnaryExpr | |
130 | 130 | |||
83 MultiExpr: UnaryExpr | 131 | 131 | 83 MultiExpr: UnaryExpr | |
84 | MultiExpr T_Star UnaryExpr | 132 | 132 | 84 | MultiExpr T_Star UnaryExpr | |
85 | MultiExpr T_Slash UnaryExpr | 133 | 133 | 85 | MultiExpr T_Slash UnaryExpr | |
134 | 134 | |||
86 AdditionExpr: MultiExpr | 135 | 135 | 86 AdditionExpr: MultiExpr | |
87 | AdditionExpr T_Plus MultiExpr | 136 | 136 | 87 | AdditionExpr T_Plus MultiExpr | |
88 | AdditionExpr T_Dash MultiExpr | 137 | 137 | 88 | AdditionExpr T_Dash MultiExpr | |
138 | 138 | |||
89 RelationExpr: AdditionExpr | 139 | 139 | 89 RelationExpr: AdditionExpr | |
90 | RelationExpr T_LeftAngle AdditionExpr | 140 | 140 | 90 | RelationExpr T_LeftAngle AdditionExpr | |
91 | RelationExpr T_RightAngle AdditionExpr | 141 | 141 | 91 | RelationExpr T_RightAngle AdditionExpr | |
92 | RelationExpr T_GreaterEqual AdditionExpr | 142 | 142 | 92 | RelationExpr T_GreaterEqual AdditionExpr | |
93 | RelationExpr T_LessEqual AdditionExpr | 143 | 143 | 93 | RelationExpr T_LessEqual AdditionExpr | |
144 | 144 | |||
94 EqualityExpr: RelationExpr | 145 | 145 | 94 EqualityExpr: RelationExpr | |
95 | EqualityExpr T_EQ RelationExpr | 146 | 146 | 95 | EqualityExpr T_EQ RelationExpr | |
96 | EqualityExpr T_NE RelationExpr | 147 | 147 | 96 | EqualityExpr T_NE RelationExpr | |
148 | 148 | |||
97 LogicAndExpr: EqualityExpr | 149 | 149 | 97 LogicAndExpr: EqualityExpr | |
98 | LogicAndExpr T_And EqualityExpr | 150 | 150 | 98 | LogicAndExpr T_And EqualityExpr | |
151 | 151 | |||
99 LogicOrExpr: LogicAndExpr | 152 | 152 | 99 LogicOrExpr: LogicAndExpr | |
100 | LogicOrExpr T_Or LogicAndExpr | 153 | 153 | 100 | LogicOrExpr T_Or LogicAndExpr | |
154 | 154 | |||
101 Expression: LogicOrExpr | 155 | 155 | 101 Expression: LogicOrExpr | |
102 | LogicOrExpr T_Question LogicOrExpr T_Colon LogicOrExpr | 156 | 156 | 102 | LogicOrExpr T_Question LogicOrExpr T_Colon LogicOrExpr | |
103 | UnaryExpr AssignOp Expression | 157 | 157 | 103 | UnaryExpr AssignOp Expression | |
158 | 158 | |||
104 AssignOp: T_Equal | 159 | 159 | 104 AssignOp: T_Equal | |
105 | T_AddAssign | 160 | 160 | 105 | T_AddAssign | |
106 | T_SubAssign | 161 | 161 | 106 | T_SubAssign | |
107 | T_MulAssign | 162 | 162 | 107 | T_MulAssign | |
108 | T_DivAssign | 163 | 163 | 108 | T_DivAssign | |
164 | 164 | |||
165 | 165 | |||
Terminals, with rules where they appear | 166 | 166 | Terminals, with rules where they appear | |
167 | 167 | |||
$end (0) 0 | 168 | 168 | $end (0) 0 | |
error (256) | 169 | 169 | error (256) | |
T_Void (258) 24 66 | 170 | 170 | T_Void (258) 24 66 | |
T_Bool (259) 26 | 171 | 171 | T_Bool (259) 26 | |
T_Int (260) 23 | 172 | 172 | T_Int (260) 23 | |
T_Float (261) 25 | 173 | 173 | T_Float (261) 25 | |
T_Uint (262) | 174 | 174 | T_Uint (262) | |
T_Bvec2 (263) | 175 | 175 | T_Bvec2 (263) | |
T_Bvec3 (264) | 176 | 176 | T_Bvec3 (264) | |
T_Bvec4 (265) | 177 | 177 | T_Bvec4 (265) | |
T_Ivec2 (266) | 178 | 178 | T_Ivec2 (266) | |
T_Ivec3 (267) | 179 | 179 | T_Ivec3 (267) | |
T_Ivec4 (268) | 180 | 180 | T_Ivec4 (268) | |
T_Uvec2 (269) | 181 | 181 | T_Uvec2 (269) | |
T_Uvec3 (270) | 182 | 182 | T_Uvec3 (270) | |
T_Uvec4 (271) | 183 | 183 | T_Uvec4 (271) | |
T_Vec2 (272) 27 | 184 | 184 | T_Vec2 (272) 27 | |
T_Vec3 (273) 28 | 185 | 185 | T_Vec3 (273) 28 | |
T_Vec4 (274) 29 | 186 | 186 | T_Vec4 (274) 29 | |
T_Mat2 (275) 30 | 187 | 187 | T_Mat2 (275) 30 | |
T_Mat3 (276) 31 | 188 | 188 | T_Mat3 (276) 31 | |
T_Mat4 (277) 32 | 189 | 189 | T_Mat4 (277) 32 | |
T_While (278) 57 | 190 | 190 | T_While (278) 57 | |
T_For (279) 58 | 191 | 191 | T_For (279) 58 | |
T_If (280) 48 49 | 192 | 192 | T_If (280) 48 49 | |
T_Else (281) 48 | 193 | 193 | T_Else (281) 48 | |
T_Return (282) 55 56 | 194 | 194 | T_Return (282) 55 56 | |
T_Break (283) 53 | 195 | 195 | T_Break (283) 53 | |
T_Continue (284) 54 | 196 | 196 | T_Continue (284) 54 | |
T_Do (285) | 197 | 197 | T_Do (285) | |
T_Switch (286) 50 | 198 | 198 | T_Switch (286) 50 | |
T_Case (287) 51 | 199 | 199 | T_Case (287) 51 | |
T_Default (288) 52 | 200 | 200 | T_Default (288) 52 | |
T_In (289) 19 | 201 | 201 | T_In (289) 19 | |
T_Out (290) 20 | 202 | 202 | T_Out (290) 20 | |
T_Const (291) 21 | 203 | 203 | T_Const (291) 21 | |
T_Uniform (292) 22 | 204 | 204 | T_Uniform (292) 22 | |
T_LeftParen (293) 8 9 48 49 50 57 58 63 66 67 68 | 205 | 205 | T_LeftParen (293) 8 9 48 49 50 57 58 63 66 67 68 | |
T_RightParen (294) 8 9 48 49 50 57 58 63 64 65 | 206 | 206 | T_RightParen (294) 8 9 48 49 50 57 58 63 64 65 | |
T_LeftBracket (295) 16 17 73 | 207 | 207 | T_LeftBracket (295) 16 17 73 | |
T_RightBracket (296) 16 17 73 | 208 | 208 | T_RightBracket (296) 16 17 73 | |
T_LeftBrace (297) 33 34 50 | 209 | 209 | T_LeftBrace (297) 33 34 50 | |
T_RightBrace (298) 33 34 50 | 210 | 210 | T_RightBrace (298) 33 34 50 | |
T_Dot (299) 77 | 211 | 211 | T_Dot (299) 77 | |
T_Comma (300) 11 70 | 212 | 212 | T_Comma (300) 11 70 | |
T_Colon (301) 51 52 102 | 213 | 213 | T_Colon (301) 51 52 102 | |
T_Semicolon (302) 6 7 39 40 41 53 54 55 56 58 | 214 | 214 | T_Semicolon (302) 6 7 39 40 41 53 54 55 56 58 | |
T_Question (303) 102 | 215 | 215 | T_Question (303) 102 | |
T_LessEqual (304) 93 | 216 | 216 | T_LessEqual (304) 93 | |
T_GreaterEqual (305) 92 | 217 | 217 | T_GreaterEqual (305) 92 | |
T_EQ (306) 95 | 218 | 218 | T_EQ (306) 95 | |
T_NE (307) 96 | 219 | 219 | T_NE (307) 96 | |
T_And (308) 98 | 220 | 220 | T_And (308) 98 | |
T_Or (309) 100 | 221 | 221 | T_Or (309) 100 | |
T_Plus (310) 81 87 | 222 | 222 | T_Plus (310) 81 87 | |
T_Star (311) 84 | 223 | 223 | T_Star (311) 84 | |
T_MulAssign (312) 107 | 224 | 224 | T_MulAssign (312) 107 | |
T_DivAssign (313) 108 | 225 | 225 | T_DivAssign (313) 108 | |
T_AddAssign (314) 105 | 226 | 226 | T_AddAssign (314) 105 | |
T_SubAssign (315) 106 | 227 | 227 | T_SubAssign (315) 106 | |
T_Equal (316) 14 15 104 | 228 | 228 | T_Equal (316) 14 15 104 | |
T_LeftAngle (317) 90 | 229 | 229 | T_LeftAngle (317) 90 | |
T_RightAngle (318) 91 | 230 | 230 | T_RightAngle (318) 91 | |
T_Dash (319) 82 88 | 231 | 231 | T_Dash (319) 82 88 | |
T_Slash (320) 85 | 232 | 232 | T_Slash (320) 85 | |
T_Inc (321) 75 79 | 233 | 233 | T_Inc (321) 75 79 | |
T_Dec (322) 76 80 | 234 | 234 | T_Dec (322) 76 80 | |
T_Identifier (323) 8 9 12 13 14 15 16 17 59 71 | 235 | 235 | T_Identifier (323) 8 9 12 13 14 15 16 17 59 71 | |
T_IntConstant (324) 16 17 60 | 236 | 236 | T_IntConstant (324) 16 17 60 | |
T_FloatConstant (325) 61 | 237 | 237 | T_FloatConstant (325) 61 | |
T_BoolConstant (326) 62 | 238 | 238 | T_BoolConstant (326) 62 | |
T_FieldSelection (327) 77 | 239 | 239 | T_FieldSelection (327) 77 | |
LOWEST (328) | 240 | 240 | LOWEST (328) | |
LOWER_THAN_ELSE (329) | 241 | 241 | LOWER_THAN_ELSE (329) | |
242 | 242 | |||
243 | 243 | |||
Nonterminals, with rules where they appear | 244 | 244 | Nonterminals, with rules where they appear | |
245 | 245 | |||
$accept (75) | 246 | 246 | $accept (75) | |
on left: 0 | 247 | 247 | on left: 0 | |
Program (76) | 248 | 248 | Program (76) | |
on left: 1, on right: 0 | 249 | 249 | on left: 1, on right: 0 | |
DeclList (77) | 250 | 250 | DeclList (77) | |
on left: 2 3, on right: 1 2 | 251 | 251 | on left: 2 3, on right: 1 2 | |
Decl (78) | 252 | 252 | Decl (78) | |
on left: 4 5, on right: 2 3 | 253 | 253 | on left: 4 5, on right: 2 3 | |
Declaration (79) | 254 | 254 | Declaration (79) | |
on left: 6 7, on right: 4 | 255 | 255 | on left: 6 7, on right: 4 | |
FuncDecl (80) | 256 | 256 | FuncDecl (80) | |
on left: 8 9, on right: 5 6 | 257 | 257 | on left: 8 9, on right: 5 6 | |
ParameterList (81) | 258 | 258 | ParameterList (81) | |
on left: 10 11, on right: 9 11 | 259 | 259 | on left: 10 11, on right: 9 11 | |
SingleDecl (82) | 260 | 260 | SingleDecl (82) | |
on left: 12 13 14 15 16 17, on right: 7 10 11 40 | 261 | 261 | on left: 12 13 14 15 16 17, on right: 7 10 11 40 | |
Initializer (83) | 262 | 262 | Initializer (83) | |
on left: 18, on right: 14 15 | 263 | 263 | on left: 18, on right: 14 15 | |
TypeQualify (84) | 264 | 264 | TypeQualify (84) | |
on left: 19 20 21 22, on right: 13 15 17 | 265 | 265 | on left: 19 20 21 22, on right: 13 15 17 | |
TypeDecl (85) | 266 | 266 | TypeDecl (85) | |
on left: 23 24 25 26 27 28 29 30 31 32, on right: 8 9 12 13 14 | 267 | 267 | on left: 23 24 25 26 27 28 29 30 31 32, on right: 8 9 12 13 14 | |
15 16 17 | 268 | 268 | 15 16 17 | |
CompoundStatement (86) | 269 | 269 | CompoundStatement (86) | |
on left: 33 34, on right: 5 37 | 270 | 270 | on left: 33 34, on right: 5 37 | |
StatementList (87) | 271 | 271 | StatementList (87) | |
on left: 35 36, on right: 34 36 50 | 272 | 272 | on left: 35 36, on right: 34 36 50 | |
Statement (88) | 273 | 273 | Statement (88) | |
on left: 37 38, on right: 35 36 48 49 51 52 57 58 | 274 | 274 | on left: 37 38, on right: 35 36 48 49 51 52 57 58 | |
SingleStatement (89) | 275 | 275 | SingleStatement (89) | |
on left: 39 40 41 42 43 44 45 46 47, on right: 38 | 276 | 276 | on left: 39 40 41 42 43 44 45 46 47, on right: 38 | |
SelectionStmt (90) | 277 | 277 | SelectionStmt (90) | |
on left: 48 49, on right: 42 | 278 | 278 | on left: 48 49, on right: 42 | |
SwitchStmt (91) | 279 | 279 | SwitchStmt (91) | |
on left: 50, on right: 43 | 280 | 280 | on left: 50, on right: 43 | |
CaseStmt (92) | 281 | 281 | CaseStmt (92) | |
on left: 51 52, on right: 44 | 282 | 282 | on left: 51 52, on right: 44 | |
JumpStmt (93) | 283 | 283 | JumpStmt (93) | |
on left: 53 54 55 56, on right: 45 | 284 | 284 | on left: 53 54 55 56, on right: 45 | |
WhileStmt (94) | 285 | 285 | WhileStmt (94) | |
on left: 57, on right: 46 | 286 | 286 | on left: 57, on right: 46 | |
ForStmt (95) | 287 | 287 | ForStmt (95) | |
on left: 58, on right: 47 | 288 | 288 | on left: 58, on right: 47 | |
PrimaryExpr (96) | 289 | 289 | PrimaryExpr (96) | |
on left: 59 60 61 62 63, on right: 72 | 290 | 290 | on left: 59 60 61 62 63, on right: 72 | |
FunctionCallExpr (97) | 291 | 291 | FunctionCallExpr (97) | |
on left: 64 65, on right: 74 | 292 | 292 | on left: 64 65, on right: 74 | |
FunctionCallHeaderNoParameters (98) | 293 | 293 | FunctionCallHeaderNoParameters (98) | |
on left: 66 67, on right: 65 | 294 | 294 | on left: 66 67, on right: 65 | |
FunctionCallHeaderWithParameters (99) | 295 | 295 | FunctionCallHeaderWithParameters (99) | |
on left: 68, on right: 64 | 296 | 296 | on left: 68, on right: 64 | |
ArgumentList (100) | 297 | 297 | ArgumentList (100) | |
on left: 69 70, on right: 68 70 | 298 | 298 | on left: 69 70, on right: 68 70 | |
FunctionIdentifier (101) | 299 | 299 | FunctionIdentifier (101) | |
on left: 71, on right: 66 67 68 | 300 | 300 | on left: 71, on right: 66 67 68 | |
PostfixExpr (102) | 301 | 301 | PostfixExpr (102) | |
on left: 72 73 74 75 76 77, on right: 73 75 76 77 78 | 302 | 302 | on left: 72 73 74 75 76 77, on right: 73 75 76 77 78 | |
UnaryExpr (103) | 303 | 303 | UnaryExpr (103) | |
on left: 78 79 80 81 82, on right: 79 80 81 82 83 84 85 103 | 304 | 304 | on left: 78 79 80 81 82, on right: 79 80 81 82 83 84 85 103 | |
MultiExpr (104) | 305 | 305 | MultiExpr (104) | |
on left: 83 84 85, on right: 84 85 86 87 88 | 306 | 306 | on left: 83 84 85, on right: 84 85 86 87 88 | |
AdditionExpr (105) | 307 | 307 | AdditionExpr (105) | |
on left: 86 87 88, on right: 87 88 89 90 91 92 93 | 308 | 308 | on left: 86 87 88, on right: 87 88 89 90 91 92 93 | |
RelationExpr (106) | 309 | 309 | RelationExpr (106) | |
on left: 89 90 91 92 93, on right: 90 91 92 93 94 95 96 | 310 | 310 | on left: 89 90 91 92 93, on right: 90 91 92 93 94 95 96 | |
EqualityExpr (107) | 311 | 311 | EqualityExpr (107) | |
on left: 94 95 96, on right: 95 96 97 98 | 312 | 312 | on left: 94 95 96, on right: 95 96 97 98 | |
LogicAndExpr (108) | 313 | 313 | LogicAndExpr (108) | |
on left: 97 98, on right: 98 99 100 | 314 | 314 | on left: 97 98, on right: 98 99 100 | |
LogicOrExpr (109) | 315 | 315 | LogicOrExpr (109) | |
on left: 99 100, on right: 100 101 102 | 316 | 316 | on left: 99 100, on right: 100 101 102 | |
Expression (110) | 317 | 317 | Expression (110) | |
on left: 101 102 103, on right: 18 41 48 49 50 51 56 57 58 63 69 | 318 | 318 | on left: 101 102 103, on right: 18 41 48 49 50 51 56 57 58 63 69 | |
70 73 103 | 319 | 319 | 70 73 103 | |
AssignOp (111) | 320 | 320 | AssignOp (111) | |
on left: 104 105 106 107 108, on right: 103 | 321 | 321 | on left: 104 105 106 107 108, on right: 103 | |
322 | 322 | |||
323 | 323 | |||
state 0 | 324 | 324 | state 0 | |
325 | 325 | |||
0 $accept: . Program $end | 326 | 326 | 0 $accept: . Program $end | |
327 | 327 | |||
T_Void shift, and go to state 1 | 328 | 328 | T_Void shift, and go to state 1 | |
T_Bool shift, and go to state 2 | 329 | 329 | T_Bool shift, and go to state 2 | |
T_Int shift, and go to state 3 | 330 | 330 | T_Int shift, and go to state 3 | |
T_Float shift, and go to state 4 | 331 | 331 | T_Float shift, and go to state 4 | |
T_Vec2 shift, and go to state 5 | 332 | 332 | T_Vec2 shift, and go to state 5 | |
T_Vec3 shift, and go to state 6 | 333 | 333 | T_Vec3 shift, and go to state 6 | |
T_Vec4 shift, and go to state 7 | 334 | 334 | T_Vec4 shift, and go to state 7 | |
T_Mat2 shift, and go to state 8 | 335 | 335 | T_Mat2 shift, and go to state 8 | |
T_Mat3 shift, and go to state 9 | 336 | 336 | T_Mat3 shift, and go to state 9 | |
T_Mat4 shift, and go to state 10 | 337 | 337 | T_Mat4 shift, and go to state 10 | |
T_In shift, and go to state 11 | 338 | 338 | T_In shift, and go to state 11 | |
T_Out shift, and go to state 12 | 339 | 339 | T_Out shift, and go to state 12 | |
T_Const shift, and go to state 13 | 340 | 340 | T_Const shift, and go to state 13 | |
T_Uniform shift, and go to state 14 | 341 | 341 | T_Uniform shift, and go to state 14 | |
342 | 342 | |||
Program go to state 15 | 343 | 343 | Program go to state 15 | |
DeclList go to state 16 | 344 | 344 | DeclList go to state 16 | |
Decl go to state 17 | 345 | 345 | Decl go to state 17 | |
Declaration go to state 18 | 346 | 346 | Declaration go to state 18 | |
FuncDecl go to state 19 | 347 | 347 | FuncDecl go to state 19 | |
SingleDecl go to state 20 | 348 | 348 | SingleDecl go to state 20 | |
TypeQualify go to state 21 | 349 | 349 | TypeQualify go to state 21 | |
TypeDecl go to state 22 | 350 | 350 | TypeDecl go to state 22 | |
351 | 351 | |||
352 | 352 | |||
state 1 | 353 | 353 | state 1 | |
354 | 354 | |||
24 TypeDecl: T_Void . | 355 | 355 | 24 TypeDecl: T_Void . | |
356 | 356 | |||
$default reduce using rule 24 (TypeDecl) | 357 | 357 | $default reduce using rule 24 (TypeDecl) | |
358 | 358 | |||
359 | 359 | |||
state 2 | 360 | 360 | state 2 | |
361 | 361 | |||
26 TypeDecl: T_Bool . | 362 | 362 | 26 TypeDecl: T_Bool . | |
363 | 363 | |||
$default reduce using rule 26 (TypeDecl) | 364 | 364 | $default reduce using rule 26 (TypeDecl) | |
365 | 365 | |||
366 | 366 | |||
state 3 | 367 | 367 | state 3 | |
368 | 368 | |||
23 TypeDecl: T_Int . | 369 | 369 | 23 TypeDecl: T_Int . | |
370 | 370 | |||
$default reduce using rule 23 (TypeDecl) | 371 | 371 | $default reduce using rule 23 (TypeDecl) | |
372 | 372 | |||
373 | 373 | |||
state 4 | 374 | 374 | state 4 | |
375 | 375 | |||
25 TypeDecl: T_Float . | 376 | 376 | 25 TypeDecl: T_Float . | |
377 | 377 | |||
$default reduce using rule 25 (TypeDecl) | 378 | 378 | $default reduce using rule 25 (TypeDecl) | |
379 | 379 | |||
380 | 380 | |||
state 5 | 381 | 381 | state 5 | |
382 | 382 | |||
27 TypeDecl: T_Vec2 . | 383 | 383 | 27 TypeDecl: T_Vec2 . | |
384 | 384 | |||
$default reduce using rule 27 (TypeDecl) | 385 | 385 | $default reduce using rule 27 (TypeDecl) | |
386 | 386 | |||
387 | 387 | |||
state 6 | 388 | 388 | state 6 | |
389 | 389 | |||
28 TypeDecl: T_Vec3 . | 390 | 390 | 28 TypeDecl: T_Vec3 . | |
391 | 391 | |||
$default reduce using rule 28 (TypeDecl) | 392 | 392 | $default reduce using rule 28 (TypeDecl) | |
393 | 393 | |||
394 | 394 | |||
state 7 | 395 | 395 | state 7 | |
396 | 396 | |||
29 TypeDecl: T_Vec4 . | 397 | 397 | 29 TypeDecl: T_Vec4 . | |
398 | 398 | |||
$default reduce using rule 29 (TypeDecl) | 399 | 399 | $default reduce using rule 29 (TypeDecl) | |
400 | 400 | |||
401 | 401 | |||
state 8 | 402 | 402 | state 8 | |
403 | 403 | |||
30 TypeDecl: T_Mat2 . | 404 | 404 | 30 TypeDecl: T_Mat2 . | |
405 | 405 | |||
$default reduce using rule 30 (TypeDecl) | 406 | 406 | $default reduce using rule 30 (TypeDecl) | |
407 | 407 | |||
408 | 408 | |||
state 9 | 409 | 409 | state 9 | |
410 | 410 | |||
31 TypeDecl: T_Mat3 . | 411 | 411 | 31 TypeDecl: T_Mat3 . | |
412 | 412 | |||
$default reduce using rule 31 (TypeDecl) | 413 | 413 | $default reduce using rule 31 (TypeDecl) | |
414 | 414 | |||
415 | 415 | |||
state 10 | 416 | 416 | state 10 | |
417 | 417 | |||
32 TypeDecl: T_Mat4 . | 418 | 418 | 32 TypeDecl: T_Mat4 . | |
419 | 419 | |||
$default reduce using rule 32 (TypeDecl) | 420 | 420 | $default reduce using rule 32 (TypeDecl) | |
421 | 421 | |||
422 | 422 | |||
state 11 | 423 | 423 | state 11 | |
424 | 424 | |||
19 TypeQualify: T_In . | 425 | 425 | 19 TypeQualify: T_In . | |
426 | 426 | |||
$default reduce using rule 19 (TypeQualify) | 427 | 427 | $default reduce using rule 19 (TypeQualify) | |
428 | 428 | |||
429 | 429 | |||
state 12 | 430 | 430 | state 12 | |
431 | 431 | |||
20 TypeQualify: T_Out . | 432 | 432 | 20 TypeQualify: T_Out . | |
433 | 433 | |||
$default reduce using rule 20 (TypeQualify) | 434 | 434 | $default reduce using rule 20 (TypeQualify) | |
435 | 435 | |||
436 | 436 | |||
state 13 | 437 | 437 | state 13 | |
438 | 438 | |||
21 TypeQualify: T_Const . | 439 | 439 | 21 TypeQualify: T_Const . | |
440 | 440 | |||
$default reduce using rule 21 (TypeQualify) | 441 | 441 | $default reduce using rule 21 (TypeQualify) | |
442 | 442 | |||
443 | 443 | |||
state 14 | 444 | 444 | state 14 | |
445 | 445 | |||
22 TypeQualify: T_Uniform . | 446 | 446 | 22 TypeQualify: T_Uniform . | |
447 | 447 | |||
$default reduce using rule 22 (TypeQualify) | 448 | 448 | $default reduce using rule 22 (TypeQualify) | |
449 | 449 | |||
450 | 450 | |||
state 15 | 451 | 451 | state 15 | |
452 | 452 | |||
0 $accept: Program . $end | 453 | 453 | 0 $accept: Program . $end | |
454 | 454 | |||
$end shift, and go to state 23 | 455 | 455 | $end shift, and go to state 23 | |
456 | 456 | |||
457 | 457 | |||
state 16 | 458 | 458 | state 16 | |
459 | 459 | |||
1 Program: DeclList . | 460 | 460 | 1 Program: DeclList . | |
2 DeclList: DeclList . Decl | 461 | 461 | 2 DeclList: DeclList . Decl | |
462 | 462 | |||
T_Void shift, and go to state 1 | 463 | 463 | T_Void shift, and go to state 1 | |
T_Bool shift, and go to state 2 | 464 | 464 | T_Bool shift, and go to state 2 | |
T_Int shift, and go to state 3 | 465 | 465 | T_Int shift, and go to state 3 | |
T_Float shift, and go to state 4 | 466 | 466 | T_Float shift, and go to state 4 | |
T_Vec2 shift, and go to state 5 | 467 | 467 | T_Vec2 shift, and go to state 5 | |
T_Vec3 shift, and go to state 6 | 468 | 468 | T_Vec3 shift, and go to state 6 | |
T_Vec4 shift, and go to state 7 | 469 | 469 | T_Vec4 shift, and go to state 7 | |
T_Mat2 shift, and go to state 8 | 470 | 470 | T_Mat2 shift, and go to state 8 | |
T_Mat3 shift, and go to state 9 | 471 | 471 | T_Mat3 shift, and go to state 9 | |
T_Mat4 shift, and go to state 10 | 472 | 472 | T_Mat4 shift, and go to state 10 | |
T_In shift, and go to state 11 | 473 | 473 | T_In shift, and go to state 11 | |
T_Out shift, and go to state 12 | 474 | 474 | T_Out shift, and go to state 12 | |
T_Const shift, and go to state 13 | 475 | 475 | T_Const shift, and go to state 13 | |
T_Uniform shift, and go to state 14 | 476 | 476 | T_Uniform shift, and go to state 14 | |
477 | 477 | |||
$default reduce using rule 1 (Program) | 478 | 478 | $default reduce using rule 1 (Program) | |
479 | 479 | |||
Decl go to state 24 | 480 | 480 | Decl go to state 24 | |
Declaration go to state 18 | 481 | 481 | Declaration go to state 18 | |
FuncDecl go to state 19 | 482 | 482 | FuncDecl go to state 19 | |
SingleDecl go to state 20 | 483 | 483 | SingleDecl go to state 20 | |
TypeQualify go to state 21 | 484 | 484 | TypeQualify go to state 21 | |
TypeDecl go to state 22 | 485 | 485 | TypeDecl go to state 22 | |
486 | 486 | |||
487 | 487 | |||
state 17 | 488 | 488 | state 17 | |
489 | 489 | |||
3 DeclList: Decl . | 490 | 490 | 3 DeclList: Decl . | |
491 | 491 | |||
$default reduce using rule 3 (DeclList) | 492 | 492 | $default reduce using rule 3 (DeclList) | |
493 | 493 | |||
494 | 494 | |||
state 18 | 495 | 495 | state 18 | |
496 | 496 | |||
4 Decl: Declaration . | 497 | 497 | 4 Decl: Declaration . | |
498 | 498 | |||
$default reduce using rule 4 (Decl) | 499 | 499 | $default reduce using rule 4 (Decl) | |
500 | 500 | |||
501 | 501 | |||
state 19 | 502 | 502 | state 19 | |
503 | 503 | |||
5 Decl: FuncDecl . CompoundStatement | 504 | 504 | 5 Decl: FuncDecl . CompoundStatement | |
6 Declaration: FuncDecl . T_Semicolon | 505 | 505 | 6 Declaration: FuncDecl . T_Semicolon | |
506 | 506 | |||
T_LeftBrace shift, and go to state 25 | 507 | 507 | T_LeftBrace shift, and go to state 25 | |
T_Semicolon shift, and go to state 26 | 508 | 508 | T_Semicolon shift, and go to state 26 | |
509 | 509 | |||
CompoundStatement go to state 27 | 510 | 510 | CompoundStatement go to state 27 | |
511 | 511 | |||
512 | 512 | |||
state 20 | 513 | 513 | state 20 | |
514 | 514 | |||
7 Declaration: SingleDecl . T_Semicolon | 515 | 515 | 7 Declaration: SingleDecl . T_Semicolon | |
516 | 516 | |||
T_Semicolon shift, and go to state 28 | 517 | 517 | T_Semicolon shift, and go to state 28 | |
518 | 518 | |||
519 | 519 | |||
state 21 | 520 | 520 | state 21 | |
521 | 521 | |||
13 SingleDecl: TypeQualify . TypeDecl T_Identifier | 522 | 522 | 13 SingleDecl: TypeQualify . TypeDecl T_Identifier | |
15 | TypeQualify . TypeDecl T_Identifier T_Equal Initializer | 523 | 523 | 15 | TypeQualify . TypeDecl T_Identifier T_Equal Initializer | |
17 | TypeQualify . TypeDecl T_Identifier T_LeftBracket T_IntConstant T_RightBracket | 524 | 524 | 17 | TypeQualify . TypeDecl T_Identifier T_LeftBracket T_IntConstant T_RightBracket | |
525 | 525 | |||
T_Void shift, and go to state 1 | 526 | 526 | T_Void shift, and go to state 1 | |
T_Bool shift, and go to state 2 | 527 | 527 | T_Bool shift, and go to state 2 | |
T_Int shift, and go to state 3 | 528 | 528 | T_Int shift, and go to state 3 | |
T_Float shift, and go to state 4 | 529 | 529 | T_Float shift, and go to state 4 | |
T_Vec2 shift, and go to state 5 | 530 | 530 | T_Vec2 shift, and go to state 5 | |
T_Vec3 shift, and go to state 6 | 531 | 531 | T_Vec3 shift, and go to state 6 | |
T_Vec4 shift, and go to state 7 | 532 | 532 | T_Vec4 shift, and go to state 7 | |
T_Mat2 shift, and go to state 8 | 533 | 533 | T_Mat2 shift, and go to state 8 | |
T_Mat3 shift, and go to state 9 | 534 | 534 | T_Mat3 shift, and go to state 9 | |
T_Mat4 shift, and go to state 10 | 535 | 535 | T_Mat4 shift, and go to state 10 | |
536 | 536 | |||
TypeDecl go to state 29 | 537 | 537 | TypeDecl go to state 29 | |
538 | 538 | |||
539 | 539 | |||
state 22 | 540 | 540 | state 22 | |
541 | 541 | |||
8 FuncDecl: TypeDecl . T_Identifier T_LeftParen T_RightParen | 542 | 542 | 8 FuncDecl: TypeDecl . T_Identifier T_LeftParen T_RightParen | |
9 | TypeDecl . T_Identifier T_LeftParen ParameterList T_RightParen | 543 | 543 | 9 | TypeDecl . T_Identifier T_LeftParen ParameterList T_RightParen | |
12 SingleDecl: TypeDecl . T_Identifier | 544 | 544 | 12 SingleDecl: TypeDecl . T_Identifier | |
14 | TypeDecl . T_Identifier T_Equal Initializer | 545 | 545 | 14 | TypeDecl . T_Identifier T_Equal Initializer | |
16 | TypeDecl . T_Identifier T_LeftBracket T_IntConstant T_RightBracket | 546 | 546 | 16 | TypeDecl . T_Identifier T_LeftBracket T_IntConstant T_RightBracket | |
547 | 547 | |||
T_Identifier shift, and go to state 30 | 548 | 548 | T_Identifier shift, and go to state 30 | |
549 | 549 | |||
550 | 550 | |||
state 23 | 551 | 551 | state 23 | |
552 | 552 | |||
0 $accept: Program $end . | 553 | 553 | 0 $accept: Program $end . | |
554 | 554 | |||
$default accept | 555 | 555 | $default accept | |
556 | 556 | |||
557 | 557 | |||
state 24 | 558 | 558 | state 24 | |
559 | 559 | |||
2 DeclList: DeclList Decl . | 560 | 560 | 2 DeclList: DeclList Decl . | |
561 | 561 | |||
$default reduce using rule 2 (DeclList) | 562 | 562 | $default reduce using rule 2 (DeclList) | |
563 | 563 | |||
564 | 564 | |||
state 25 | 565 | 565 | state 25 | |
566 | 566 | |||
33 CompoundStatement: T_LeftBrace . T_RightBrace | 567 | 567 | 33 CompoundStatement: T_LeftBrace . T_RightBrace | |
34 | T_LeftBrace . StatementList T_RightBrace | 568 | 568 | 34 | T_LeftBrace . StatementList T_RightBrace | |
569 | 569 | |||
T_Void shift, and go to state 1 | 570 | 570 | T_Void shift, and go to state 1 | |
T_Bool shift, and go to state 2 | 571 | 571 | T_Bool shift, and go to state 2 | |
T_Int shift, and go to state 3 | 572 | 572 | T_Int shift, and go to state 3 | |
T_Float shift, and go to state 4 | 573 | 573 | T_Float shift, and go to state 4 | |
T_Vec2 shift, and go to state 5 | 574 | 574 | T_Vec2 shift, and go to state 5 | |
T_Vec3 shift, and go to state 6 | 575 | 575 | T_Vec3 shift, and go to state 6 | |
T_Vec4 shift, and go to state 7 | 576 | 576 | T_Vec4 shift, and go to state 7 | |
T_Mat2 shift, and go to state 8 | 577 | 577 | T_Mat2 shift, and go to state 8 | |
T_Mat3 shift, and go to state 9 | 578 | 578 | T_Mat3 shift, and go to state 9 | |
T_Mat4 shift, and go to state 10 | 579 | 579 | T_Mat4 shift, and go to state 10 | |
T_While shift, and go to state 31 | 580 | 580 | T_While shift, and go to state 31 | |
T_For shift, and go to state 32 | 581 | 581 | T_For shift, and go to state 32 | |
T_If shift, and go to state 33 | 582 | 582 | T_If shift, and go to state 33 | |
T_Return shift, and go to state 34 | 583 | 583 | T_Return shift, and go to state 34 | |
T_Break shift, and go to state 35 | 584 | 584 | T_Break shift, and go to state 35 | |
T_Continue shift, and go to state 36 | 585 | 585 | T_Continue shift, and go to state 36 | |
T_Switch shift, and go to state 37 | 586 | 586 | T_Switch shift, and go to state 37 | |
T_Case shift, and go to state 38 | 587 | 587 | T_Case shift, and go to state 38 | |
T_Default shift, and go to state 39 | 588 | 588 | T_Default shift, and go to state 39 | |
T_In shift, and go to state 11 | 589 | 589 | T_In shift, and go to state 11 | |
T_Out shift, and go to state 12 | 590 | 590 | T_Out shift, and go to state 12 | |
T_Const shift, and go to state 13 | 591 | 591 | T_Const shift, and go to state 13 | |
T_Uniform shift, and go to state 14 | 592 | 592 | T_Uniform shift, and go to state 14 | |
T_LeftParen shift, and go to state 40 | 593 | 593 | T_LeftParen shift, and go to state 40 | |
T_LeftBrace shift, and go to state 25 | 594 | 594 | T_LeftBrace shift, and go to state 25 | |
T_RightBrace shift, and go to state 41 | 595 | 595 | T_RightBrace shift, and go to state 41 | |
T_Semicolon shift, and go to state 42 | 596 | 596 | T_Semicolon shift, and go to state 42 | |
T_Plus shift, and go to state 43 | 597 | 597 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 598 | 598 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 599 | 599 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 600 | 600 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 601 | 601 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 602 | 602 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 603 | 603 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 604 | 604 | T_BoolConstant shift, and go to state 50 | |
605 | 605 | |||
SingleDecl go to state 51 | 606 | 606 | SingleDecl go to state 51 | |
TypeQualify go to state 21 | 607 | 607 | TypeQualify go to state 21 | |
TypeDecl go to state 52 | 608 | 608 | TypeDecl go to state 52 | |
CompoundStatement go to state 53 | 609 | 609 | CompoundStatement go to state 53 | |
StatementList go to state 54 | 610 | 610 | StatementList go to state 54 | |
Statement go to state 55 | 611 | 611 | Statement go to state 55 | |
SingleStatement go to state 56 | 612 | 612 | SingleStatement go to state 56 | |
SelectionStmt go to state 57 | 613 | 613 | SelectionStmt go to state 57 | |
SwitchStmt go to state 58 | 614 | 614 | SwitchStmt go to state 58 | |
CaseStmt go to state 59 | 615 | 615 | CaseStmt go to state 59 | |
JumpStmt go to state 60 | 616 | 616 | JumpStmt go to state 60 | |
WhileStmt go to state 61 | 617 | 617 | WhileStmt go to state 61 | |
ForStmt go to state 62 | 618 | 618 | ForStmt go to state 62 | |
PrimaryExpr go to state 63 | 619 | 619 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 620 | 620 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 621 | 621 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 622 | 622 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 623 | 623 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 624 | 624 | PostfixExpr go to state 68 | |
UnaryExpr go to state 69 | 625 | 625 | UnaryExpr go to state 69 | |
MultiExpr go to state 70 | 626 | 626 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 627 | 627 | AdditionExpr go to state 71 | |
RelationExpr go to state 72 | 628 | 628 | RelationExpr go to state 72 | |
EqualityExpr go to state 73 | 629 | 629 | EqualityExpr go to state 73 | |
LogicAndExpr go to state 74 | 630 | 630 | LogicAndExpr go to state 74 | |
LogicOrExpr go to state 75 | 631 | 631 | LogicOrExpr go to state 75 | |
Expression go to state 76 | 632 | 632 | Expression go to state 76 | |
633 | 633 | |||
634 | 634 | |||
state 26 | 635 | 635 | state 26 | |
636 | 636 | |||
6 Declaration: FuncDecl T_Semicolon . | 637 | 637 | 6 Declaration: FuncDecl T_Semicolon . | |
638 | 638 | |||
$default reduce using rule 6 (Declaration) | 639 | 639 | $default reduce using rule 6 (Declaration) | |
640 | 640 | |||
641 | 641 | |||
state 27 | 642 | 642 | state 27 | |
643 | 643 | |||
5 Decl: FuncDecl CompoundStatement . | 644 | 644 | 5 Decl: FuncDecl CompoundStatement . | |
645 | 645 | |||
$default reduce using rule 5 (Decl) | 646 | 646 | $default reduce using rule 5 (Decl) | |
647 | 647 | |||
648 | 648 | |||
state 28 | 649 | 649 | state 28 | |
650 | 650 | |||
7 Declaration: SingleDecl T_Semicolon . | 651 | 651 | 7 Declaration: SingleDecl T_Semicolon . | |
652 | 652 | |||
$default reduce using rule 7 (Declaration) | 653 | 653 | $default reduce using rule 7 (Declaration) | |
654 | 654 | |||
655 | 655 | |||
state 29 | 656 | 656 | state 29 | |
657 | 657 | |||
13 SingleDecl: TypeQualify TypeDecl . T_Identifier | 658 | 658 | 13 SingleDecl: TypeQualify TypeDecl . T_Identifier | |
15 | TypeQualify TypeDecl . T_Identifier T_Equal Initializer | 659 | 659 | 15 | TypeQualify TypeDecl . T_Identifier T_Equal Initializer | |
17 | TypeQualify TypeDecl . T_Identifier T_LeftBracket T_IntConstant T_RightBracket | 660 | 660 | 17 | TypeQualify TypeDecl . T_Identifier T_LeftBracket T_IntConstant T_RightBracket | |
661 | 661 | |||
T_Identifier shift, and go to state 77 | 662 | 662 | T_Identifier shift, and go to state 77 | |
663 | 663 | |||
664 | 664 | |||
state 30 | 665 | 665 | state 30 | |
666 | 666 | |||
8 FuncDecl: TypeDecl T_Identifier . T_LeftParen T_RightParen | 667 | 667 | 8 FuncDecl: TypeDecl T_Identifier . T_LeftParen T_RightParen | |
9 | TypeDecl T_Identifier . T_LeftParen ParameterList T_RightParen | 668 | 668 | 9 | TypeDecl T_Identifier . T_LeftParen ParameterList T_RightParen | |
12 SingleDecl: TypeDecl T_Identifier . | 669 | 669 | 12 SingleDecl: TypeDecl T_Identifier . | |
14 | TypeDecl T_Identifier . T_Equal Initializer | 670 | 670 | 14 | TypeDecl T_Identifier . T_Equal Initializer | |
16 | TypeDecl T_Identifier . T_LeftBracket T_IntConstant T_RightBracket | 671 | 671 | 16 | TypeDecl T_Identifier . T_LeftBracket T_IntConstant T_RightBracket | |
672 | 672 | |||
T_LeftParen shift, and go to state 78 | 673 | 673 | T_LeftParen shift, and go to state 78 | |
T_LeftBracket shift, and go to state 79 | 674 | 674 | T_LeftBracket shift, and go to state 79 | |
T_Equal shift, and go to state 80 | 675 | 675 | T_Equal shift, and go to state 80 | |
676 | 676 | |||
$default reduce using rule 12 (SingleDecl) | 677 | 677 | $default reduce using rule 12 (SingleDecl) | |
678 | 678 | |||
679 | 679 | |||
state 31 | 680 | 680 | state 31 | |
681 | 681 | |||
57 WhileStmt: T_While . T_LeftParen Expression T_RightParen Statement | 682 | 682 | 57 WhileStmt: T_While . T_LeftParen Expression T_RightParen Statement | |
683 | 683 | |||
T_LeftParen shift, and go to state 81 | 684 | 684 | T_LeftParen shift, and go to state 81 | |
685 | 685 | |||
686 | 686 | |||
state 32 | 687 | 687 | state 32 | |
688 | 688 | |||
58 ForStmt: T_For . T_LeftParen Expression T_Semicolon Expression T_Semicolon Expression T_RightParen Statement | 689 | 689 | 58 ForStmt: T_For . T_LeftParen Expression T_Semicolon Expression T_Semicolon Expression T_RightParen Statement | |
690 | 690 | |||
T_LeftParen shift, and go to state 82 | 691 | 691 | T_LeftParen shift, and go to state 82 | |
692 | 692 | |||
693 | 693 | |||
state 33 | 694 | 694 | state 33 | |
695 | 695 | |||
48 SelectionStmt: T_If . T_LeftParen Expression T_RightParen Statement T_Else Statement | 696 | 696 | 48 SelectionStmt: T_If . T_LeftParen Expression T_RightParen Statement T_Else Statement | |
49 | T_If . T_LeftParen Expression T_RightParen Statement | 697 | 697 | 49 | T_If . T_LeftParen Expression T_RightParen Statement | |
698 | 698 | |||
T_LeftParen shift, and go to state 83 | 699 | 699 | T_LeftParen shift, and go to state 83 | |
700 | 700 | |||
701 | 701 | |||
state 34 | 702 | 702 | state 34 | |
703 | 703 | |||
55 JumpStmt: T_Return . T_Semicolon | 704 | 704 | 55 JumpStmt: T_Return . T_Semicolon | |
56 | T_Return . Expression T_Semicolon | 705 | 705 | 56 | T_Return . Expression T_Semicolon | |
706 | 706 | |||
T_LeftParen shift, and go to state 40 | 707 | 707 | T_LeftParen shift, and go to state 40 | |
T_Semicolon shift, and go to state 84 | 708 | 708 | T_Semicolon shift, and go to state 84 | |
T_Plus shift, and go to state 43 | 709 | 709 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 710 | 710 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 711 | 711 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 712 | 712 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 713 | 713 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 714 | 714 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 715 | 715 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 716 | 716 | T_BoolConstant shift, and go to state 50 | |
717 | 717 | |||
PrimaryExpr go to state 63 | 718 | 718 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 719 | 719 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 720 | 720 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 721 | 721 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 722 | 722 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 723 | 723 | PostfixExpr go to state 68 | |
UnaryExpr go to state 69 | 724 | 724 | UnaryExpr go to state 69 | |
MultiExpr go to state 70 | 725 | 725 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 726 | 726 | AdditionExpr go to state 71 | |
RelationExpr go to state 72 | 727 | 727 | RelationExpr go to state 72 | |
EqualityExpr go to state 73 | 728 | 728 | EqualityExpr go to state 73 | |
LogicAndExpr go to state 74 | 729 | 729 | LogicAndExpr go to state 74 | |
LogicOrExpr go to state 75 | 730 | 730 | LogicOrExpr go to state 75 | |
Expression go to state 85 | 731 | 731 | Expression go to state 85 | |
732 | 732 | |||
733 | 733 | |||
state 35 | 734 | 734 | state 35 | |
735 | 735 | |||
53 JumpStmt: T_Break . T_Semicolon | 736 | 736 | 53 JumpStmt: T_Break . T_Semicolon | |
737 | 737 | |||
T_Semicolon shift, and go to state 86 | 738 | 738 | T_Semicolon shift, and go to state 86 | |
739 | 739 | |||
740 | 740 | |||
state 36 | 741 | 741 | state 36 | |
742 | 742 | |||
54 JumpStmt: T_Continue . T_Semicolon | 743 | 743 | 54 JumpStmt: T_Continue . T_Semicolon | |
744 | 744 | |||
T_Semicolon shift, and go to state 87 | 745 | 745 | T_Semicolon shift, and go to state 87 | |
746 | 746 | |||
747 | 747 | |||
state 37 | 748 | 748 | state 37 | |
749 | 749 | |||
50 SwitchStmt: T_Switch . T_LeftParen Expression T_RightParen T_LeftBrace StatementList T_RightBrace | 750 | 750 | 50 SwitchStmt: T_Switch . T_LeftParen Expression T_RightParen T_LeftBrace StatementList T_RightBrace | |
751 | 751 | |||
T_LeftParen shift, and go to state 88 | 752 | 752 | T_LeftParen shift, and go to state 88 | |
753 | 753 | |||
754 | 754 | |||
state 38 | 755 | 755 | state 38 | |
756 | 756 | |||
51 CaseStmt: T_Case . Expression T_Colon Statement | 757 | 757 | 51 CaseStmt: T_Case . Expression T_Colon Statement | |
758 | 758 | |||
T_LeftParen shift, and go to state 40 | 759 | 759 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 760 | 760 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 761 | 761 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 762 | 762 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 763 | 763 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 764 | 764 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 765 | 765 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 766 | 766 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 767 | 767 | T_BoolConstant shift, and go to state 50 | |
768 | 768 | |||
PrimaryExpr go to state 63 | 769 | 769 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 770 | 770 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 771 | 771 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 772 | 772 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 773 | 773 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 774 | 774 | PostfixExpr go to state 68 | |
UnaryExpr go to state 69 | 775 | 775 | UnaryExpr go to state 69 | |
MultiExpr go to state 70 | 776 | 776 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 777 | 777 | AdditionExpr go to state 71 | |
RelationExpr go to state 72 | 778 | 778 | RelationExpr go to state 72 | |
EqualityExpr go to state 73 | 779 | 779 | EqualityExpr go to state 73 | |
LogicAndExpr go to state 74 | 780 | 780 | LogicAndExpr go to state 74 | |
LogicOrExpr go to state 75 | 781 | 781 | LogicOrExpr go to state 75 | |
Expression go to state 89 | 782 | 782 | Expression go to state 89 | |
783 | 783 | |||
784 | 784 | |||
state 39 | 785 | 785 | state 39 | |
786 | 786 | |||
52 CaseStmt: T_Default . T_Colon Statement | 787 | 787 | 52 CaseStmt: T_Default . T_Colon Statement | |
788 | 788 | |||
T_Colon shift, and go to state 90 | 789 | 789 | T_Colon shift, and go to state 90 | |
790 | 790 | |||
791 | 791 | |||
state 40 | 792 | 792 | state 40 | |
793 | 793 | |||
63 PrimaryExpr: T_LeftParen . Expression T_RightParen | 794 | 794 | 63 PrimaryExpr: T_LeftParen . Expression T_RightParen | |
795 | 795 | |||
T_LeftParen shift, and go to state 40 | 796 | 796 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 797 | 797 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 798 | 798 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 799 | 799 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 800 | 800 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 801 | 801 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 802 | 802 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 803 | 803 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 804 | 804 | T_BoolConstant shift, and go to state 50 | |
805 | 805 | |||
PrimaryExpr go to state 63 | 806 | 806 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 807 | 807 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 808 | 808 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 809 | 809 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 810 | 810 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 811 | 811 | PostfixExpr go to state 68 | |
UnaryExpr go to state 69 | 812 | 812 | UnaryExpr go to state 69 | |
MultiExpr go to state 70 | 813 | 813 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 814 | 814 | AdditionExpr go to state 71 | |
RelationExpr go to state 72 | 815 | 815 | RelationExpr go to state 72 | |
EqualityExpr go to state 73 | 816 | 816 | EqualityExpr go to state 73 | |
LogicAndExpr go to state 74 | 817 | 817 | LogicAndExpr go to state 74 | |
LogicOrExpr go to state 75 | 818 | 818 | LogicOrExpr go to state 75 | |
Expression go to state 91 | 819 | 819 | Expression go to state 91 | |
820 | 820 | |||
821 | 821 | |||
state 41 | 822 | 822 | state 41 | |
823 | 823 | |||
33 CompoundStatement: T_LeftBrace T_RightBrace . | 824 | 824 | 33 CompoundStatement: T_LeftBrace T_RightBrace . | |
825 | 825 | |||
$default reduce using rule 33 (CompoundStatement) | 826 | 826 | $default reduce using rule 33 (CompoundStatement) | |
827 | 827 | |||
828 | 828 | |||
state 42 | 829 | 829 | state 42 | |
830 | 830 | |||
39 SingleStatement: T_Semicolon . | 831 | 831 | 39 SingleStatement: T_Semicolon . | |
832 | 832 | |||
$default reduce using rule 39 (SingleStatement) | 833 | 833 | $default reduce using rule 39 (SingleStatement) | |
834 | 834 | |||
835 | 835 | |||
state 43 | 836 | 836 | state 43 | |
837 | 837 | |||
81 UnaryExpr: T_Plus . UnaryExpr | 838 | 838 | 81 UnaryExpr: T_Plus . UnaryExpr | |
839 | 839 | |||
T_LeftParen shift, and go to state 40 | 840 | 840 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 841 | 841 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 842 | 842 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 843 | 843 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 844 | 844 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 845 | 845 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 846 | 846 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 847 | 847 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 848 | 848 | T_BoolConstant shift, and go to state 50 | |
849 | 849 | |||
PrimaryExpr go to state 63 | 850 | 850 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 851 | 851 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 852 | 852 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 853 | 853 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 854 | 854 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 855 | 855 | PostfixExpr go to state 68 | |
UnaryExpr go to state 92 | 856 | 856 | UnaryExpr go to state 92 | |
857 | 857 | |||
858 | 858 | |||
state 44 | 859 | 859 | state 44 | |
860 | 860 | |||
82 UnaryExpr: T_Dash . UnaryExpr | 861 | 861 | 82 UnaryExpr: T_Dash . UnaryExpr | |
862 | 862 | |||
T_LeftParen shift, and go to state 40 | 863 | 863 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 864 | 864 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 865 | 865 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 866 | 866 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 867 | 867 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 868 | 868 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 869 | 869 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 870 | 870 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 871 | 871 | T_BoolConstant shift, and go to state 50 | |
872 | 872 | |||
PrimaryExpr go to state 63 | 873 | 873 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 874 | 874 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 875 | 875 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 876 | 876 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 877 | 877 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 878 | 878 | PostfixExpr go to state 68 | |
UnaryExpr go to state 93 | 879 | 879 | UnaryExpr go to state 93 | |
880 | 880 | |||
881 | 881 | |||
state 45 | 882 | 882 | state 45 | |
883 | 883 | |||
79 UnaryExpr: T_Inc . UnaryExpr | 884 | 884 | 79 UnaryExpr: T_Inc . UnaryExpr | |
885 | 885 | |||
T_LeftParen shift, and go to state 40 | 886 | 886 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 887 | 887 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 888 | 888 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 889 | 889 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 890 | 890 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 891 | 891 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 892 | 892 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 893 | 893 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 894 | 894 | T_BoolConstant shift, and go to state 50 | |
895 | 895 | |||
PrimaryExpr go to state 63 | 896 | 896 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 897 | 897 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 898 | 898 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 899 | 899 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 900 | 900 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 901 | 901 | PostfixExpr go to state 68 | |
UnaryExpr go to state 94 | 902 | 902 | UnaryExpr go to state 94 | |
903 | 903 | |||
904 | 904 | |||
state 46 | 905 | 905 | state 46 | |
906 | 906 | |||
80 UnaryExpr: T_Dec . UnaryExpr | 907 | 907 | 80 UnaryExpr: T_Dec . UnaryExpr | |
908 | 908 | |||
T_LeftParen shift, and go to state 40 | 909 | 909 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 910 | 910 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 911 | 911 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 912 | 912 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 913 | 913 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 914 | 914 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 915 | 915 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 916 | 916 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 917 | 917 | T_BoolConstant shift, and go to state 50 | |
918 | 918 | |||
PrimaryExpr go to state 63 | 919 | 919 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 920 | 920 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 921 | 921 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 922 | 922 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 923 | 923 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 924 | 924 | PostfixExpr go to state 68 | |
UnaryExpr go to state 95 | 925 | 925 | UnaryExpr go to state 95 | |
926 | 926 | |||
927 | 927 | |||
state 47 | 928 | 928 | state 47 | |
929 | 929 | |||
59 PrimaryExpr: T_Identifier . | 930 | 930 | 59 PrimaryExpr: T_Identifier . | |
71 FunctionIdentifier: T_Identifier . | 931 | 931 | 71 FunctionIdentifier: T_Identifier . | |
932 | 932 | |||
T_LeftParen reduce using rule 71 (FunctionIdentifier) | 933 | 933 | T_LeftParen reduce using rule 71 (FunctionIdentifier) | |
$default reduce using rule 59 (PrimaryExpr) | 934 | 934 | $default reduce using rule 59 (PrimaryExpr) | |
935 | 935 | |||
936 | 936 | |||
state 48 | 937 | 937 | state 48 | |
938 | 938 | |||
60 PrimaryExpr: T_IntConstant . | 939 | 939 | 60 PrimaryExpr: T_IntConstant . | |
940 | 940 | |||
$default reduce using rule 60 (PrimaryExpr) | 941 | 941 | $default reduce using rule 60 (PrimaryExpr) | |
942 | 942 | |||
943 | 943 | |||
state 49 | 944 | 944 | state 49 | |
945 | 945 | |||
61 PrimaryExpr: T_FloatConstant . | 946 | 946 | 61 PrimaryExpr: T_FloatConstant . | |
947 | 947 | |||
$default reduce using rule 61 (PrimaryExpr) | 948 | 948 | $default reduce using rule 61 (PrimaryExpr) | |
949 | 949 | |||
950 | 950 | |||
state 50 | 951 | 951 | state 50 | |
952 | 952 | |||
62 PrimaryExpr: T_BoolConstant . | 953 | 953 | 62 PrimaryExpr: T_BoolConstant . | |
954 | 954 | |||
$default reduce using rule 62 (PrimaryExpr) | 955 | 955 | $default reduce using rule 62 (PrimaryExpr) | |
956 | 956 | |||
957 | 957 | |||
state 51 | 958 | 958 | state 51 | |
959 | 959 | |||
40 SingleStatement: SingleDecl . T_Semicolon | 960 | 960 | 40 SingleStatement: SingleDecl . T_Semicolon | |
961 | 961 | |||
T_Semicolon shift, and go to state 96 | 962 | 962 | T_Semicolon shift, and go to state 96 | |
963 | 963 | |||
964 | 964 | |||
state 52 | 965 | 965 | state 52 | |
966 | 966 | |||
12 SingleDecl: TypeDecl . T_Identifier | 967 | 967 | 12 SingleDecl: TypeDecl . T_Identifier | |
14 | TypeDecl . T_Identifier T_Equal Initializer | 968 | 968 | 14 | TypeDecl . T_Identifier T_Equal Initializer | |
16 | TypeDecl . T_Identifier T_LeftBracket T_IntConstant T_RightBracket | 969 | 969 | 16 | TypeDecl . T_Identifier T_LeftBracket T_IntConstant T_RightBracket | |
970 | 970 | |||
T_Identifier shift, and go to state 97 | 971 | 971 | T_Identifier shift, and go to state 97 | |
972 | 972 | |||
973 | 973 | |||
state 53 | 974 | 974 | state 53 | |
975 | 975 | |||
37 Statement: CompoundStatement . | 976 | 976 | 37 Statement: CompoundStatement . | |
977 | 977 | |||
$default reduce using rule 37 (Statement) | 978 | 978 | $default reduce using rule 37 (Statement) | |
979 | 979 | |||
980 | 980 | |||
state 54 | 981 | 981 | state 54 | |
982 | 982 | |||
34 CompoundStatement: T_LeftBrace StatementList . T_RightBrace | 983 | 983 | 34 CompoundStatement: T_LeftBrace StatementList . T_RightBrace | |
36 StatementList: StatementList . Statement | 984 | 984 | 36 StatementList: StatementList . Statement | |
985 | 985 | |||
T_Void shift, and go to state 1 | 986 | 986 | T_Void shift, and go to state 1 | |
T_Bool shift, and go to state 2 | 987 | 987 | T_Bool shift, and go to state 2 | |
T_Int shift, and go to state 3 | 988 | 988 | T_Int shift, and go to state 3 | |
T_Float shift, and go to state 4 | 989 | 989 | T_Float shift, and go to state 4 | |
T_Vec2 shift, and go to state 5 | 990 | 990 | T_Vec2 shift, and go to state 5 | |
T_Vec3 shift, and go to state 6 | 991 | 991 | T_Vec3 shift, and go to state 6 | |
T_Vec4 shift, and go to state 7 | 992 | 992 | T_Vec4 shift, and go to state 7 | |
T_Mat2 shift, and go to state 8 | 993 | 993 | T_Mat2 shift, and go to state 8 | |
T_Mat3 shift, and go to state 9 | 994 | 994 | T_Mat3 shift, and go to state 9 | |
T_Mat4 shift, and go to state 10 | 995 | 995 | T_Mat4 shift, and go to state 10 | |
T_While shift, and go to state 31 | 996 | 996 | T_While shift, and go to state 31 | |
T_For shift, and go to state 32 | 997 | 997 | T_For shift, and go to state 32 | |
T_If shift, and go to state 33 | 998 | 998 | T_If shift, and go to state 33 | |
T_Return shift, and go to state 34 | 999 | 999 | T_Return shift, and go to state 34 | |
T_Break shift, and go to state 35 | 1000 | 1000 | T_Break shift, and go to state 35 | |
T_Continue shift, and go to state 36 | 1001 | 1001 | T_Continue shift, and go to state 36 | |
T_Switch shift, and go to state 37 | 1002 | 1002 | T_Switch shift, and go to state 37 | |
T_Case shift, and go to state 38 | 1003 | 1003 | T_Case shift, and go to state 38 | |
T_Default shift, and go to state 39 | 1004 | 1004 | T_Default shift, and go to state 39 | |
T_In shift, and go to state 11 | 1005 | 1005 | T_In shift, and go to state 11 | |
T_Out shift, and go to state 12 | 1006 | 1006 | T_Out shift, and go to state 12 | |
T_Const shift, and go to state 13 | 1007 | 1007 | T_Const shift, and go to state 13 | |
T_Uniform shift, and go to state 14 | 1008 | 1008 | T_Uniform shift, and go to state 14 | |
T_LeftParen shift, and go to state 40 | 1009 | 1009 | T_LeftParen shift, and go to state 40 | |
T_LeftBrace shift, and go to state 25 | 1010 | 1010 | T_LeftBrace shift, and go to state 25 | |
T_RightBrace shift, and go to state 98 | 1011 | 1011 | T_RightBrace shift, and go to state 98 | |
T_Semicolon shift, and go to state 42 | 1012 | 1012 | T_Semicolon shift, and go to state 42 | |
T_Plus shift, and go to state 43 | 1013 | 1013 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 1014 | 1014 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 1015 | 1015 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 1016 | 1016 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 1017 | 1017 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 1018 | 1018 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 1019 | 1019 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 1020 | 1020 | T_BoolConstant shift, and go to state 50 | |
1021 | 1021 | |||
SingleDecl go to state 51 | 1022 | 1022 | SingleDecl go to state 51 | |
TypeQualify go to state 21 | 1023 | 1023 | TypeQualify go to state 21 | |
TypeDecl go to state 52 | 1024 | 1024 | TypeDecl go to state 52 | |
CompoundStatement go to state 53 | 1025 | 1025 | CompoundStatement go to state 53 | |
Statement go to state 99 | 1026 | 1026 | Statement go to state 99 | |
SingleStatement go to state 56 | 1027 | 1027 | SingleStatement go to state 56 | |
SelectionStmt go to state 57 | 1028 | 1028 | SelectionStmt go to state 57 | |
SwitchStmt go to state 58 | 1029 | 1029 | SwitchStmt go to state 58 | |
CaseStmt go to state 59 | 1030 | 1030 | CaseStmt go to state 59 | |
JumpStmt go to state 60 | 1031 | 1031 | JumpStmt go to state 60 | |
WhileStmt go to state 61 | 1032 | 1032 | WhileStmt go to state 61 | |
ForStmt go to state 62 | 1033 | 1033 | ForStmt go to state 62 | |
PrimaryExpr go to state 63 | 1034 | 1034 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 1035 | 1035 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 1036 | 1036 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 1037 | 1037 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 1038 | 1038 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 1039 | 1039 | PostfixExpr go to state 68 | |
UnaryExpr go to state 69 | 1040 | 1040 | UnaryExpr go to state 69 | |
MultiExpr go to state 70 | 1041 | 1041 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 1042 | 1042 | AdditionExpr go to state 71 | |
RelationExpr go to state 72 | 1043 | 1043 | RelationExpr go to state 72 | |
EqualityExpr go to state 73 | 1044 | 1044 | EqualityExpr go to state 73 | |
LogicAndExpr go to state 74 | 1045 | 1045 | LogicAndExpr go to state 74 | |
LogicOrExpr go to state 75 | 1046 | 1046 | LogicOrExpr go to state 75 | |
Expression go to state 76 | 1047 | 1047 | Expression go to state 76 | |
1048 | 1048 | |||
1049 | 1049 | |||
state 55 | 1050 | 1050 | state 55 | |
1051 | 1051 | |||
35 StatementList: Statement . | 1052 | 1052 | 35 StatementList: Statement . | |
1053 | 1053 | |||
$default reduce using rule 35 (StatementList) | 1054 | 1054 | $default reduce using rule 35 (StatementList) | |
1055 | 1055 | |||
1056 | 1056 | |||
state 56 | 1057 | 1057 | state 56 | |
1058 | 1058 | |||
38 Statement: SingleStatement . | 1059 | 1059 | 38 Statement: SingleStatement . | |
1060 | 1060 | |||
$default reduce using rule 38 (Statement) | 1061 | 1061 | $default reduce using rule 38 (Statement) | |
1062 | 1062 | |||
1063 | 1063 | |||
state 57 | 1064 | 1064 | state 57 | |
1065 | 1065 | |||
42 SingleStatement: SelectionStmt . | 1066 | 1066 | 42 SingleStatement: SelectionStmt . | |
1067 | 1067 | |||
$default reduce using rule 42 (SingleStatement) | 1068 | 1068 | $default reduce using rule 42 (SingleStatement) | |
1069 | 1069 | |||
1070 | 1070 | |||
state 58 | 1071 | 1071 | state 58 | |
1072 | 1072 | |||
43 SingleStatement: SwitchStmt . | 1073 | 1073 | 43 SingleStatement: SwitchStmt . | |
1074 | 1074 | |||
$default reduce using rule 43 (SingleStatement) | 1075 | 1075 | $default reduce using rule 43 (SingleStatement) | |
1076 | 1076 | |||
1077 | 1077 | |||
state 59 | 1078 | 1078 | state 59 | |
1079 | 1079 | |||
44 SingleStatement: CaseStmt . | 1080 | 1080 | 44 SingleStatement: CaseStmt . | |
1081 | 1081 | |||
$default reduce using rule 44 (SingleStatement) | 1082 | 1082 | $default reduce using rule 44 (SingleStatement) | |
1083 | 1083 | |||
1084 | 1084 | |||
state 60 | 1085 | 1085 | state 60 | |
1086 | 1086 | |||
45 SingleStatement: JumpStmt . | 1087 | 1087 | 45 SingleStatement: JumpStmt . | |
1088 | 1088 | |||
$default reduce using rule 45 (SingleStatement) | 1089 | 1089 | $default reduce using rule 45 (SingleStatement) | |
1090 | 1090 | |||
1091 | 1091 | |||
state 61 | 1092 | 1092 | state 61 | |
1093 | 1093 | |||
46 SingleStatement: WhileStmt . | 1094 | 1094 | 46 SingleStatement: WhileStmt . | |
1095 | 1095 | |||
$default reduce using rule 46 (SingleStatement) | 1096 | 1096 | $default reduce using rule 46 (SingleStatement) | |
1097 | 1097 | |||
1098 | 1098 | |||
state 62 | 1099 | 1099 | state 62 | |
1100 | 1100 | |||
47 SingleStatement: ForStmt . | 1101 | 1101 | 47 SingleStatement: ForStmt . | |
1102 | 1102 | |||
$default reduce using rule 47 (SingleStatement) | 1103 | 1103 | $default reduce using rule 47 (SingleStatement) | |
1104 | 1104 | |||
1105 | 1105 | |||
state 63 | 1106 | 1106 | state 63 | |
1107 | 1107 | |||
72 PostfixExpr: PrimaryExpr . | 1108 | 1108 | 72 PostfixExpr: PrimaryExpr . | |
1109 | 1109 | |||
$default reduce using rule 72 (PostfixExpr) | 1110 | 1110 | $default reduce using rule 72 (PostfixExpr) | |
1111 | 1111 | |||
1112 | 1112 | |||
state 64 | 1113 | 1113 | state 64 | |
1114 | 1114 | |||
74 PostfixExpr: FunctionCallExpr . | 1115 | 1115 | 74 PostfixExpr: FunctionCallExpr . | |
1116 | 1116 | |||
$default reduce using rule 74 (PostfixExpr) | 1117 | 1117 | $default reduce using rule 74 (PostfixExpr) | |
1118 | 1118 | |||
1119 | 1119 | |||
state 65 | 1120 | 1120 | state 65 | |
1121 | 1121 | |||
65 FunctionCallExpr: FunctionCallHeaderNoParameters . T_RightParen | 1122 | 1122 | 65 FunctionCallExpr: FunctionCallHeaderNoParameters . T_RightParen | |
1123 | 1123 | |||
T_RightParen shift, and go to state 100 | 1124 | 1124 | T_RightParen shift, and go to state 100 | |
1125 | 1125 | |||
1126 | 1126 | |||
state 66 | 1127 | 1127 | state 66 | |
1128 | 1128 | |||
64 FunctionCallExpr: FunctionCallHeaderWithParameters . T_RightParen | 1129 | 1129 | 64 FunctionCallExpr: FunctionCallHeaderWithParameters . T_RightParen | |
1130 | 1130 | |||
T_RightParen shift, and go to state 101 | 1131 | 1131 | T_RightParen shift, and go to state 101 | |
1132 | 1132 | |||
1133 | 1133 | |||
state 67 | 1134 | 1134 | state 67 | |
1135 | 1135 | |||
66 FunctionCallHeaderNoParameters: FunctionIdentifier . T_LeftParen T_Void | 1136 | 1136 | 66 FunctionCallHeaderNoParameters: FunctionIdentifier . T_LeftParen T_Void | |
67 | FunctionIdentifier . T_LeftParen | 1137 | 1137 | 67 | FunctionIdentifier . T_LeftParen | |
68 FunctionCallHeaderWithParameters: FunctionIdentifier . T_LeftParen ArgumentList | 1138 | 1138 | 68 FunctionCallHeaderWithParameters: FunctionIdentifier . T_LeftParen ArgumentList | |
1139 | 1139 | |||
T_LeftParen shift, and go to state 102 | 1140 | 1140 | T_LeftParen shift, and go to state 102 | |
1141 | 1141 | |||
1142 | 1142 | |||
state 68 | 1143 | 1143 | state 68 | |
1144 | 1144 | |||
73 PostfixExpr: PostfixExpr . T_LeftBracket Expression T_RightBracket | 1145 | 1145 | 73 PostfixExpr: PostfixExpr . T_LeftBracket Expression T_RightBracket | |
75 | PostfixExpr . T_Inc | 1146 | 1146 | 75 | PostfixExpr . T_Inc | |
76 | PostfixExpr . T_Dec | 1147 | 1147 | 76 | PostfixExpr . T_Dec | |
77 | PostfixExpr . T_Dot T_FieldSelection | 1148 | 1148 | 77 | PostfixExpr . T_Dot T_FieldSelection | |
78 UnaryExpr: PostfixExpr . | 1149 | 1149 | 78 UnaryExpr: PostfixExpr . | |
1150 | 1150 | |||
T_LeftBracket shift, and go to state 103 | 1151 | 1151 | T_LeftBracket shift, and go to state 103 | |
T_Dot shift, and go to state 104 | 1152 | 1152 | T_Dot shift, and go to state 104 | |
T_Inc shift, and go to state 105 | 1153 | 1153 | T_Inc shift, and go to state 105 | |
T_Dec shift, and go to state 106 | 1154 | 1154 | T_Dec shift, and go to state 106 | |
1155 | 1155 | |||
$default reduce using rule 78 (UnaryExpr) | 1156 | 1156 | $default reduce using rule 78 (UnaryExpr) | |
1157 | 1157 | |||
1158 | 1158 | |||
state 69 | 1159 | 1159 | state 69 | |
1160 | 1160 | |||
83 MultiExpr: UnaryExpr . | 1161 | 1161 | 83 MultiExpr: UnaryExpr . | |
103 Expression: UnaryExpr . AssignOp Expression | 1162 | 1162 | 103 Expression: UnaryExpr . AssignOp Expression | |
1163 | 1163 | |||
T_MulAssign shift, and go to state 107 | 1164 | 1164 | T_MulAssign shift, and go to state 107 | |
T_DivAssign shift, and go to state 108 | 1165 | 1165 | T_DivAssign shift, and go to state 108 | |
T_AddAssign shift, and go to state 109 | 1166 | 1166 | T_AddAssign shift, and go to state 109 | |
T_SubAssign shift, and go to state 110 | 1167 | 1167 | T_SubAssign shift, and go to state 110 | |
T_Equal shift, and go to state 111 | 1168 | 1168 | T_Equal shift, and go to state 111 | |
1169 | 1169 | |||
$default reduce using rule 83 (MultiExpr) | 1170 | 1170 | $default reduce using rule 83 (MultiExpr) | |
1171 | 1171 | |||
AssignOp go to state 112 | 1172 | 1172 | AssignOp go to state 112 | |
1173 | 1173 | |||
1174 | 1174 | |||
state 70 | 1175 | 1175 | state 70 | |
1176 | 1176 | |||
84 MultiExpr: MultiExpr . T_Star UnaryExpr | 1177 | 1177 | 84 MultiExpr: MultiExpr . T_Star UnaryExpr | |
85 | MultiExpr . T_Slash UnaryExpr | 1178 | 1178 | 85 | MultiExpr . T_Slash UnaryExpr | |
86 AdditionExpr: MultiExpr . | 1179 | 1179 | 86 AdditionExpr: MultiExpr . | |
1180 | 1180 | |||
T_Star shift, and go to state 113 | 1181 | 1181 | T_Star shift, and go to state 113 | |
T_Slash shift, and go to state 114 | 1182 | 1182 | T_Slash shift, and go to state 114 | |
1183 | 1183 | |||
$default reduce using rule 86 (AdditionExpr) | 1184 | 1184 | $default reduce using rule 86 (AdditionExpr) | |
1185 | 1185 | |||
1186 | 1186 | |||
state 71 | 1187 | 1187 | state 71 | |
1188 | 1188 | |||
87 AdditionExpr: AdditionExpr . T_Plus MultiExpr | 1189 | 1189 | 87 AdditionExpr: AdditionExpr . T_Plus MultiExpr | |
88 | AdditionExpr . T_Dash MultiExpr | 1190 | 1190 | 88 | AdditionExpr . T_Dash MultiExpr | |
89 RelationExpr: AdditionExpr . | 1191 | 1191 | 89 RelationExpr: AdditionExpr . | |
1192 | 1192 | |||
T_Plus shift, and go to state 115 | 1193 | 1193 | T_Plus shift, and go to state 115 | |
T_Dash shift, and go to state 116 | 1194 | 1194 | T_Dash shift, and go to state 116 | |
1195 | 1195 | |||
$default reduce using rule 89 (RelationExpr) | 1196 | 1196 | $default reduce using rule 89 (RelationExpr) | |
1197 | 1197 | |||
1198 | 1198 | |||
state 72 | 1199 | 1199 | state 72 | |
1200 | 1200 | |||
90 RelationExpr: RelationExpr . T_LeftAngle AdditionExpr | 1201 | 1201 | 90 RelationExpr: RelationExpr . T_LeftAngle AdditionExpr | |
91 | RelationExpr . T_RightAngle AdditionExpr | 1202 | 1202 | 91 | RelationExpr . T_RightAngle AdditionExpr | |
92 | RelationExpr . T_GreaterEqual AdditionExpr | 1203 | 1203 | 92 | RelationExpr . T_GreaterEqual AdditionExpr | |
93 | RelationExpr . T_LessEqual AdditionExpr | 1204 | 1204 | 93 | RelationExpr . T_LessEqual AdditionExpr | |
94 EqualityExpr: RelationExpr . | 1205 | 1205 | 94 EqualityExpr: RelationExpr . | |
1206 | 1206 | |||
T_LessEqual shift, and go to state 117 | 1207 | 1207 | T_LessEqual shift, and go to state 117 | |
T_GreaterEqual shift, and go to state 118 | 1208 | 1208 | T_GreaterEqual shift, and go to state 118 | |
T_LeftAngle shift, and go to state 119 | 1209 | 1209 | T_LeftAngle shift, and go to state 119 | |
T_RightAngle shift, and go to state 120 | 1210 | 1210 | T_RightAngle shift, and go to state 120 | |
1211 | 1211 | |||
$default reduce using rule 94 (EqualityExpr) | 1212 | 1212 | $default reduce using rule 94 (EqualityExpr) | |
1213 | 1213 | |||
1214 | 1214 | |||
state 73 | 1215 | 1215 | state 73 | |
1216 | 1216 | |||
95 EqualityExpr: EqualityExpr . T_EQ RelationExpr | 1217 | 1217 | 95 EqualityExpr: EqualityExpr . T_EQ RelationExpr | |
96 | EqualityExpr . T_NE RelationExpr | 1218 | 1218 | 96 | EqualityExpr . T_NE RelationExpr | |
97 LogicAndExpr: EqualityExpr . | 1219 | 1219 | 97 LogicAndExpr: EqualityExpr . | |
1220 | 1220 | |||
T_EQ shift, and go to state 121 | 1221 | 1221 | T_EQ shift, and go to state 121 | |
T_NE shift, and go to state 122 | 1222 | 1222 | T_NE shift, and go to state 122 | |
1223 | 1223 | |||
$default reduce using rule 97 (LogicAndExpr) | 1224 | 1224 | $default reduce using rule 97 (LogicAndExpr) | |
1225 | 1225 | |||
1226 | 1226 | |||
state 74 | 1227 | 1227 | state 74 | |
1228 | 1228 | |||
98 LogicAndExpr: LogicAndExpr . T_And EqualityExpr | 1229 | 1229 | 98 LogicAndExpr: LogicAndExpr . T_And EqualityExpr | |
99 LogicOrExpr: LogicAndExpr . | 1230 | 1230 | 99 LogicOrExpr: LogicAndExpr . | |
1231 | 1231 | |||
T_And shift, and go to state 123 | 1232 | 1232 | T_And shift, and go to state 123 | |
1233 | 1233 | |||
$default reduce using rule 99 (LogicOrExpr) | 1234 | 1234 | $default reduce using rule 99 (LogicOrExpr) | |
1235 | 1235 | |||
1236 | 1236 | |||
state 75 | 1237 | 1237 | state 75 | |
1238 | 1238 | |||
100 LogicOrExpr: LogicOrExpr . T_Or LogicAndExpr | 1239 | 1239 | 100 LogicOrExpr: LogicOrExpr . T_Or LogicAndExpr | |
101 Expression: LogicOrExpr . | 1240 | 1240 | 101 Expression: LogicOrExpr . | |
102 | LogicOrExpr . T_Question LogicOrExpr T_Colon LogicOrExpr | 1241 | 1241 | 102 | LogicOrExpr . T_Question LogicOrExpr T_Colon LogicOrExpr | |
1242 | 1242 | |||
T_Question shift, and go to state 124 | 1243 | 1243 | T_Question shift, and go to state 124 | |
T_Or shift, and go to state 125 | 1244 | 1244 | T_Or shift, and go to state 125 | |
1245 | 1245 | |||
$default reduce using rule 101 (Expression) | 1246 | 1246 | $default reduce using rule 101 (Expression) | |
1247 | 1247 | |||
1248 | 1248 | |||
state 76 | 1249 | 1249 | state 76 | |
1250 | 1250 | |||
41 SingleStatement: Expression . T_Semicolon | 1251 | 1251 | 41 SingleStatement: Expression . T_Semicolon | |
1252 | 1252 | |||
T_Semicolon shift, and go to state 126 | 1253 | 1253 | T_Semicolon shift, and go to state 126 | |
1254 | 1254 | |||
1255 | 1255 | |||
state 77 | 1256 | 1256 | state 77 | |
1257 | 1257 | |||
13 SingleDecl: TypeQualify TypeDecl T_Identifier . | 1258 | 1258 | 13 SingleDecl: TypeQualify TypeDecl T_Identifier . | |
15 | TypeQualify TypeDecl T_Identifier . T_Equal Initializer | 1259 | 1259 | 15 | TypeQualify TypeDecl T_Identifier . T_Equal Initializer | |
17 | TypeQualify TypeDecl T_Identifier . T_LeftBracket T_IntConstant T_RightBracket | 1260 | 1260 | 17 | TypeQualify TypeDecl T_Identifier . T_LeftBracket T_IntConstant T_RightBracket | |
1261 | 1261 | |||
T_LeftBracket shift, and go to state 127 | 1262 | 1262 | T_LeftBracket shift, and go to state 127 | |
T_Equal shift, and go to state 128 | 1263 | 1263 | T_Equal shift, and go to state 128 | |
1264 | 1264 | |||
$default reduce using rule 13 (SingleDecl) | 1265 | 1265 | $default reduce using rule 13 (SingleDecl) | |
1266 | 1266 | |||
1267 | 1267 | |||
state 78 | 1268 | 1268 | state 78 | |
1269 | 1269 | |||
8 FuncDecl: TypeDecl T_Identifier T_LeftParen . T_RightParen | 1270 | 1270 | 8 FuncDecl: TypeDecl T_Identifier T_LeftParen . T_RightParen | |
9 | TypeDecl T_Identifier T_LeftParen . ParameterList T_RightParen | 1271 | 1271 | 9 | TypeDecl T_Identifier T_LeftParen . ParameterList T_RightParen | |
1272 | 1272 | |||
T_Void shift, and go to state 1 | 1273 | 1273 | T_Void shift, and go to state 1 | |
T_Bool shift, and go to state 2 | 1274 | 1274 | T_Bool shift, and go to state 2 | |
T_Int shift, and go to state 3 | 1275 | 1275 | T_Int shift, and go to state 3 | |
T_Float shift, and go to state 4 | 1276 | 1276 | T_Float shift, and go to state 4 | |
T_Vec2 shift, and go to state 5 | 1277 | 1277 | T_Vec2 shift, and go to state 5 | |
T_Vec3 shift, and go to state 6 | 1278 | 1278 | T_Vec3 shift, and go to state 6 | |
T_Vec4 shift, and go to state 7 | 1279 | 1279 | T_Vec4 shift, and go to state 7 | |
T_Mat2 shift, and go to state 8 | 1280 | 1280 | T_Mat2 shift, and go to state 8 | |
T_Mat3 shift, and go to state 9 | 1281 | 1281 | T_Mat3 shift, and go to state 9 | |
T_Mat4 shift, and go to state 10 | 1282 | 1282 | T_Mat4 shift, and go to state 10 | |
T_In shift, and go to state 11 | 1283 | 1283 | T_In shift, and go to state 11 | |
T_Out shift, and go to state 12 | 1284 | 1284 | T_Out shift, and go to state 12 | |
T_Const shift, and go to state 13 | 1285 | 1285 | T_Const shift, and go to state 13 | |
T_Uniform shift, and go to state 14 | 1286 | 1286 | T_Uniform shift, and go to state 14 | |
T_RightParen shift, and go to state 129 | 1287 | 1287 | T_RightParen shift, and go to state 129 | |
1288 | 1288 | |||
ParameterList go to state 130 | 1289 | 1289 | ParameterList go to state 130 | |
SingleDecl go to state 131 | 1290 | 1290 | SingleDecl go to state 131 | |
TypeQualify go to state 21 | 1291 | 1291 | TypeQualify go to state 21 | |
TypeDecl go to state 52 | 1292 | 1292 | TypeDecl go to state 52 | |
1293 | 1293 | |||
1294 | 1294 | |||
state 79 | 1295 | 1295 | state 79 | |
1296 | 1296 | |||
16 SingleDecl: TypeDecl T_Identifier T_LeftBracket . T_IntConstant T_RightBracket | 1297 | 1297 | 16 SingleDecl: TypeDecl T_Identifier T_LeftBracket . T_IntConstant T_RightBracket | |
1298 | 1298 | |||
T_IntConstant shift, and go to state 132 | 1299 | 1299 | T_IntConstant shift, and go to state 132 | |
1300 | 1300 | |||
1301 | 1301 | |||
state 80 | 1302 | 1302 | state 80 | |
1303 | 1303 | |||
14 SingleDecl: TypeDecl T_Identifier T_Equal . Initializer | 1304 | 1304 | 14 SingleDecl: TypeDecl T_Identifier T_Equal . Initializer | |
1305 | 1305 | |||
T_LeftParen shift, and go to state 40 | 1306 | 1306 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 1307 | 1307 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 1308 | 1308 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 1309 | 1309 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 1310 | 1310 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 1311 | 1311 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 1312 | 1312 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 1313 | 1313 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 1314 | 1314 | T_BoolConstant shift, and go to state 50 | |
1315 | 1315 | |||
Initializer go to state 133 | 1316 | 1316 | Initializer go to state 133 | |
PrimaryExpr go to state 63 | 1317 | 1317 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 1318 | 1318 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 1319 | 1319 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 1320 | 1320 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 1321 | 1321 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 1322 | 1322 | PostfixExpr go to state 68 | |
UnaryExpr go to state 69 | 1323 | 1323 | UnaryExpr go to state 69 | |
MultiExpr go to state 70 | 1324 | 1324 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 1325 | 1325 | AdditionExpr go to state 71 | |
RelationExpr go to state 72 | 1326 | 1326 | RelationExpr go to state 72 | |
EqualityExpr go to state 73 | 1327 | 1327 | EqualityExpr go to state 73 | |
LogicAndExpr go to state 74 | 1328 | 1328 | LogicAndExpr go to state 74 | |
LogicOrExpr go to state 75 | 1329 | 1329 | LogicOrExpr go to state 75 | |
Expression go to state 134 | 1330 | 1330 | Expression go to state 134 | |
1331 | 1331 | |||
1332 | 1332 | |||
state 81 | 1333 | 1333 | state 81 | |
1334 | 1334 | |||
57 WhileStmt: T_While T_LeftParen . Expression T_RightParen Statement | 1335 | 1335 | 57 WhileStmt: T_While T_LeftParen . Expression T_RightParen Statement | |
1336 | 1336 | |||
T_LeftParen shift, and go to state 40 | 1337 | 1337 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 1338 | 1338 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 1339 | 1339 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 1340 | 1340 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 1341 | 1341 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 1342 | 1342 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 1343 | 1343 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 1344 | 1344 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 1345 | 1345 | T_BoolConstant shift, and go to state 50 | |
1346 | 1346 | |||
PrimaryExpr go to state 63 | 1347 | 1347 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 1348 | 1348 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 1349 | 1349 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 1350 | 1350 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 1351 | 1351 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 1352 | 1352 | PostfixExpr go to state 68 | |
UnaryExpr go to state 69 | 1353 | 1353 | UnaryExpr go to state 69 | |
MultiExpr go to state 70 | 1354 | 1354 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 1355 | 1355 | AdditionExpr go to state 71 | |
RelationExpr go to state 72 | 1356 | 1356 | RelationExpr go to state 72 | |
EqualityExpr go to state 73 | 1357 | 1357 | EqualityExpr go to state 73 | |
LogicAndExpr go to state 74 | 1358 | 1358 | LogicAndExpr go to state 74 | |
LogicOrExpr go to state 75 | 1359 | 1359 | LogicOrExpr go to state 75 | |
Expression go to state 135 | 1360 | 1360 | Expression go to state 135 | |
1361 | 1361 | |||
1362 | 1362 | |||
state 82 | 1363 | 1363 | state 82 | |
1364 | 1364 | |||
58 ForStmt: T_For T_LeftParen . Expression T_Semicolon Expression T_Semicolon Expression T_RightParen Statement | 1365 | 1365 | 58 ForStmt: T_For T_LeftParen . Expression T_Semicolon Expression T_Semicolon Expression T_RightParen Statement | |
1366 | 1366 | |||
T_LeftParen shift, and go to state 40 | 1367 | 1367 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 1368 | 1368 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 1369 | 1369 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 1370 | 1370 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 1371 | 1371 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 1372 | 1372 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 1373 | 1373 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 1374 | 1374 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 1375 | 1375 | T_BoolConstant shift, and go to state 50 | |
1376 | 1376 | |||
PrimaryExpr go to state 63 | 1377 | 1377 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 1378 | 1378 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 1379 | 1379 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 1380 | 1380 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 1381 | 1381 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 1382 | 1382 | PostfixExpr go to state 68 | |
UnaryExpr go to state 69 | 1383 | 1383 | UnaryExpr go to state 69 | |
MultiExpr go to state 70 | 1384 | 1384 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 1385 | 1385 | AdditionExpr go to state 71 | |
RelationExpr go to state 72 | 1386 | 1386 | RelationExpr go to state 72 | |
EqualityExpr go to state 73 | 1387 | 1387 | EqualityExpr go to state 73 | |
LogicAndExpr go to state 74 | 1388 | 1388 | LogicAndExpr go to state 74 | |
LogicOrExpr go to state 75 | 1389 | 1389 | LogicOrExpr go to state 75 | |
Expression go to state 136 | 1390 | 1390 | Expression go to state 136 | |
1391 | 1391 | |||
1392 | 1392 | |||
state 83 | 1393 | 1393 | state 83 | |
1394 | 1394 | |||
48 SelectionStmt: T_If T_LeftParen . Expression T_RightParen Statement T_Else Statement | 1395 | 1395 | 48 SelectionStmt: T_If T_LeftParen . Expression T_RightParen Statement T_Else Statement | |
49 | T_If T_LeftParen . Expression T_RightParen Statement | 1396 | 1396 | 49 | T_If T_LeftParen . Expression T_RightParen Statement | |
1397 | 1397 | |||
T_LeftParen shift, and go to state 40 | 1398 | 1398 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 1399 | 1399 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 1400 | 1400 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 1401 | 1401 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 1402 | 1402 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 1403 | 1403 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 1404 | 1404 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 1405 | 1405 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 1406 | 1406 | T_BoolConstant shift, and go to state 50 | |
1407 | 1407 | |||
PrimaryExpr go to state 63 | 1408 | 1408 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 1409 | 1409 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 1410 | 1410 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 1411 | 1411 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 1412 | 1412 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 1413 | 1413 | PostfixExpr go to state 68 | |
UnaryExpr go to state 69 | 1414 | 1414 | UnaryExpr go to state 69 | |
MultiExpr go to state 70 | 1415 | 1415 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 1416 | 1416 | AdditionExpr go to state 71 | |
RelationExpr go to state 72 | 1417 | 1417 | RelationExpr go to state 72 | |
EqualityExpr go to state 73 | 1418 | 1418 | EqualityExpr go to state 73 | |
LogicAndExpr go to state 74 | 1419 | 1419 | LogicAndExpr go to state 74 | |
LogicOrExpr go to state 75 | 1420 | 1420 | LogicOrExpr go to state 75 | |
Expression go to state 137 | 1421 | 1421 | Expression go to state 137 | |
1422 | 1422 | |||
1423 | 1423 | |||
state 84 | 1424 | 1424 | state 84 | |
1425 | 1425 | |||
55 JumpStmt: T_Return T_Semicolon . | 1426 | 1426 | 55 JumpStmt: T_Return T_Semicolon . | |
1427 | 1427 | |||
$default reduce using rule 55 (JumpStmt) | 1428 | 1428 | $default reduce using rule 55 (JumpStmt) | |
1429 | 1429 | |||
1430 | 1430 | |||
state 85 | 1431 | 1431 | state 85 | |
1432 | 1432 | |||
56 JumpStmt: T_Return Expression . T_Semicolon | 1433 | 1433 | 56 JumpStmt: T_Return Expression . T_Semicolon | |
1434 | 1434 | |||
T_Semicolon shift, and go to state 138 | 1435 | 1435 | T_Semicolon shift, and go to state 138 | |
1436 | 1436 | |||
1437 | 1437 | |||
state 86 | 1438 | 1438 | state 86 | |
1439 | 1439 | |||
53 JumpStmt: T_Break T_Semicolon . | 1440 | 1440 | 53 JumpStmt: T_Break T_Semicolon . | |
1441 | 1441 | |||
$default reduce using rule 53 (JumpStmt) | 1442 | 1442 | $default reduce using rule 53 (JumpStmt) | |
1443 | 1443 | |||
1444 | 1444 | |||
state 87 | 1445 | 1445 | state 87 | |
1446 | 1446 | |||
54 JumpStmt: T_Continue T_Semicolon . | 1447 | 1447 | 54 JumpStmt: T_Continue T_Semicolon . | |
1448 | 1448 | |||
$default reduce using rule 54 (JumpStmt) | 1449 | 1449 | $default reduce using rule 54 (JumpStmt) | |
1450 | 1450 | |||
1451 | 1451 | |||
state 88 | 1452 | 1452 | state 88 | |
1453 | 1453 | |||
50 SwitchStmt: T_Switch T_LeftParen . Expression T_RightParen T_LeftBrace StatementList T_RightBrace | 1454 | 1454 | 50 SwitchStmt: T_Switch T_LeftParen . Expression T_RightParen T_LeftBrace StatementList T_RightBrace | |
1455 | 1455 | |||
T_LeftParen shift, and go to state 40 | 1456 | 1456 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 1457 | 1457 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 1458 | 1458 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 1459 | 1459 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 1460 | 1460 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 1461 | 1461 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 1462 | 1462 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 1463 | 1463 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 1464 | 1464 | T_BoolConstant shift, and go to state 50 | |
1465 | 1465 | |||
PrimaryExpr go to state 63 | 1466 | 1466 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 1467 | 1467 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 1468 | 1468 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 1469 | 1469 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 1470 | 1470 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 1471 | 1471 | PostfixExpr go to state 68 | |
UnaryExpr go to state 69 | 1472 | 1472 | UnaryExpr go to state 69 | |
MultiExpr go to state 70 | 1473 | 1473 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 1474 | 1474 | AdditionExpr go to state 71 | |
RelationExpr go to state 72 | 1475 | 1475 | RelationExpr go to state 72 | |
EqualityExpr go to state 73 | 1476 | 1476 | EqualityExpr go to state 73 | |
LogicAndExpr go to state 74 | 1477 | 1477 | LogicAndExpr go to state 74 | |
LogicOrExpr go to state 75 | 1478 | 1478 | LogicOrExpr go to state 75 | |
Expression go to state 139 | 1479 | 1479 | Expression go to state 139 | |
1480 | 1480 | |||
1481 | 1481 | |||
state 89 | 1482 | 1482 | state 89 | |
1483 | 1483 | |||
51 CaseStmt: T_Case Expression . T_Colon Statement | 1484 | 1484 | 51 CaseStmt: T_Case Expression . T_Colon Statement | |
1485 | 1485 | |||
T_Colon shift, and go to state 140 | 1486 | 1486 | T_Colon shift, and go to state 140 | |
1487 | 1487 | |||
1488 | 1488 | |||
state 90 | 1489 | 1489 | state 90 | |
1490 | 1490 | |||
52 CaseStmt: T_Default T_Colon . Statement | 1491 | 1491 | 52 CaseStmt: T_Default T_Colon . Statement | |
1492 | 1492 | |||
T_Void shift, and go to state 1 | 1493 | 1493 | T_Void shift, and go to state 1 | |
T_Bool shift, and go to state 2 | 1494 | 1494 | T_Bool shift, and go to state 2 | |
T_Int shift, and go to state 3 | 1495 | 1495 | T_Int shift, and go to state 3 | |
T_Float shift, and go to state 4 | 1496 | 1496 | T_Float shift, and go to state 4 | |
T_Vec2 shift, and go to state 5 | 1497 | 1497 | T_Vec2 shift, and go to state 5 | |
T_Vec3 shift, and go to state 6 | 1498 | 1498 | T_Vec3 shift, and go to state 6 | |
T_Vec4 shift, and go to state 7 | 1499 | 1499 | T_Vec4 shift, and go to state 7 | |
T_Mat2 shift, and go to state 8 | 1500 | 1500 | T_Mat2 shift, and go to state 8 | |
T_Mat3 shift, and go to state 9 | 1501 | 1501 | T_Mat3 shift, and go to state 9 | |
T_Mat4 shift, and go to state 10 | 1502 | 1502 | T_Mat4 shift, and go to state 10 | |
T_While shift, and go to state 31 | 1503 | 1503 | T_While shift, and go to state 31 | |
T_For shift, and go to state 32 | 1504 | 1504 | T_For shift, and go to state 32 | |
T_If shift, and go to state 33 | 1505 | 1505 | T_If shift, and go to state 33 | |
T_Return shift, and go to state 34 | 1506 | 1506 | T_Return shift, and go to state 34 | |
T_Break shift, and go to state 35 | 1507 | 1507 | T_Break shift, and go to state 35 | |
T_Continue shift, and go to state 36 | 1508 | 1508 | T_Continue shift, and go to state 36 | |
T_Switch shift, and go to state 37 | 1509 | 1509 | T_Switch shift, and go to state 37 | |
T_Case shift, and go to state 38 | 1510 | 1510 | T_Case shift, and go to state 38 | |
T_Default shift, and go to state 39 | 1511 | 1511 | T_Default shift, and go to state 39 | |
T_In shift, and go to state 11 | 1512 | 1512 | T_In shift, and go to state 11 | |
T_Out shift, and go to state 12 | 1513 | 1513 | T_Out shift, and go to state 12 | |
T_Const shift, and go to state 13 | 1514 | 1514 | T_Const shift, and go to state 13 | |
T_Uniform shift, and go to state 14 | 1515 | 1515 | T_Uniform shift, and go to state 14 | |
T_LeftParen shift, and go to state 40 | 1516 | 1516 | T_LeftParen shift, and go to state 40 | |
T_LeftBrace shift, and go to state 25 | 1517 | 1517 | T_LeftBrace shift, and go to state 25 | |
T_Semicolon shift, and go to state 42 | 1518 | 1518 | T_Semicolon shift, and go to state 42 | |
T_Plus shift, and go to state 43 | 1519 | 1519 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 1520 | 1520 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 1521 | 1521 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 1522 | 1522 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 1523 | 1523 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 1524 | 1524 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 1525 | 1525 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 1526 | 1526 | T_BoolConstant shift, and go to state 50 | |
1527 | 1527 | |||
SingleDecl go to state 51 | 1528 | 1528 | SingleDecl go to state 51 | |
TypeQualify go to state 21 | 1529 | 1529 | TypeQualify go to state 21 | |
TypeDecl go to state 52 | 1530 | 1530 | TypeDecl go to state 52 | |
CompoundStatement go to state 53 | 1531 | 1531 | CompoundStatement go to state 53 | |
Statement go to state 141 | 1532 | 1532 | Statement go to state 141 | |
SingleStatement go to state 56 | 1533 | 1533 | SingleStatement go to state 56 | |
SelectionStmt go to state 57 | 1534 | 1534 | SelectionStmt go to state 57 | |
SwitchStmt go to state 58 | 1535 | 1535 | SwitchStmt go to state 58 | |
CaseStmt go to state 59 | 1536 | 1536 | CaseStmt go to state 59 | |
JumpStmt go to state 60 | 1537 | 1537 | JumpStmt go to state 60 | |
WhileStmt go to state 61 | 1538 | 1538 | WhileStmt go to state 61 | |
ForStmt go to state 62 | 1539 | 1539 | ForStmt go to state 62 | |
PrimaryExpr go to state 63 | 1540 | 1540 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 1541 | 1541 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 1542 | 1542 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 1543 | 1543 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 1544 | 1544 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 1545 | 1545 | PostfixExpr go to state 68 | |
UnaryExpr go to state 69 | 1546 | 1546 | UnaryExpr go to state 69 | |
MultiExpr go to state 70 | 1547 | 1547 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 1548 | 1548 | AdditionExpr go to state 71 | |
RelationExpr go to state 72 | 1549 | 1549 | RelationExpr go to state 72 | |
EqualityExpr go to state 73 | 1550 | 1550 | EqualityExpr go to state 73 | |
LogicAndExpr go to state 74 | 1551 | 1551 | LogicAndExpr go to state 74 | |
LogicOrExpr go to state 75 | 1552 | 1552 | LogicOrExpr go to state 75 | |
Expression go to state 76 | 1553 | 1553 | Expression go to state 76 | |
1554 | 1554 | |||
1555 | 1555 | |||
state 91 | 1556 | 1556 | state 91 | |
1557 | 1557 | |||
63 PrimaryExpr: T_LeftParen Expression . T_RightParen | 1558 | 1558 | 63 PrimaryExpr: T_LeftParen Expression . T_RightParen | |
1559 | 1559 | |||
T_RightParen shift, and go to state 142 | 1560 | 1560 | T_RightParen shift, and go to state 142 | |
1561 | 1561 | |||
1562 | 1562 | |||
state 92 | 1563 | 1563 | state 92 | |
1564 | 1564 | |||
81 UnaryExpr: T_Plus UnaryExpr . | 1565 | 1565 | 81 UnaryExpr: T_Plus UnaryExpr . | |
1566 | 1566 | |||
$default reduce using rule 81 (UnaryExpr) | 1567 | 1567 | $default reduce using rule 81 (UnaryExpr) | |
1568 | 1568 | |||
1569 | 1569 | |||
state 93 | 1570 | 1570 | state 93 | |
1571 | 1571 | |||
82 UnaryExpr: T_Dash UnaryExpr . | 1572 | 1572 | 82 UnaryExpr: T_Dash UnaryExpr . | |
1573 | 1573 | |||
$default reduce using rule 82 (UnaryExpr) | 1574 | 1574 | $default reduce using rule 82 (UnaryExpr) | |
1575 | 1575 | |||
1576 | 1576 | |||
state 94 | 1577 | 1577 | state 94 | |
1578 | 1578 | |||
79 UnaryExpr: T_Inc UnaryExpr . | 1579 | 1579 | 79 UnaryExpr: T_Inc UnaryExpr . | |
1580 | 1580 | |||
$default reduce using rule 79 (UnaryExpr) | 1581 | 1581 | $default reduce using rule 79 (UnaryExpr) | |
1582 | 1582 | |||
1583 | 1583 | |||
state 95 | 1584 | 1584 | state 95 | |
1585 | 1585 | |||
80 UnaryExpr: T_Dec UnaryExpr . | 1586 | 1586 | 80 UnaryExpr: T_Dec UnaryExpr . | |
1587 | 1587 | |||
$default reduce using rule 80 (UnaryExpr) | 1588 | 1588 | $default reduce using rule 80 (UnaryExpr) | |
1589 | 1589 | |||
1590 | 1590 | |||
state 96 | 1591 | 1591 | state 96 | |
1592 | 1592 | |||
40 SingleStatement: SingleDecl T_Semicolon . | 1593 | 1593 | 40 SingleStatement: SingleDecl T_Semicolon . | |
1594 | 1594 | |||
$default reduce using rule 40 (SingleStatement) | 1595 | 1595 | $default reduce using rule 40 (SingleStatement) | |
1596 | 1596 | |||
1597 | 1597 | |||
state 97 | 1598 | 1598 | state 97 | |
1599 | 1599 | |||
12 SingleDecl: TypeDecl T_Identifier . | 1600 | 1600 | 12 SingleDecl: TypeDecl T_Identifier . | |
14 | TypeDecl T_Identifier . T_Equal Initializer | 1601 | 1601 | 14 | TypeDecl T_Identifier . T_Equal Initializer | |
16 | TypeDecl T_Identifier . T_LeftBracket T_IntConstant T_RightBracket | 1602 | 1602 | 16 | TypeDecl T_Identifier . T_LeftBracket T_IntConstant T_RightBracket | |
1603 | 1603 | |||
T_LeftBracket shift, and go to state 79 | 1604 | 1604 | T_LeftBracket shift, and go to state 79 | |
T_Equal shift, and go to state 80 | 1605 | 1605 | T_Equal shift, and go to state 80 | |
1606 | 1606 | |||
$default reduce using rule 12 (SingleDecl) | 1607 | 1607 | $default reduce using rule 12 (SingleDecl) | |
1608 | 1608 | |||
1609 | 1609 | |||
state 98 | 1610 | 1610 | state 98 | |
1611 | 1611 | |||
34 CompoundStatement: T_LeftBrace StatementList T_RightBrace . | 1612 | 1612 | 34 CompoundStatement: T_LeftBrace StatementList T_RightBrace . | |
1613 | 1613 | |||
$default reduce using rule 34 (CompoundStatement) | 1614 | 1614 | $default reduce using rule 34 (CompoundStatement) | |
1615 | 1615 | |||
1616 | 1616 | |||
state 99 | 1617 | 1617 | state 99 | |
1618 | 1618 | |||
36 StatementList: StatementList Statement . | 1619 | 1619 | 36 StatementList: StatementList Statement . | |
1620 | 1620 | |||
$default reduce using rule 36 (StatementList) | 1621 | 1621 | $default reduce using rule 36 (StatementList) | |
1622 | 1622 | |||
1623 | 1623 | |||
state 100 | 1624 | 1624 | state 100 | |
1625 | 1625 | |||
65 FunctionCallExpr: FunctionCallHeaderNoParameters T_RightParen . | 1626 | 1626 | 65 FunctionCallExpr: FunctionCallHeaderNoParameters T_RightParen . | |
1627 | 1627 | |||
$default reduce using rule 65 (FunctionCallExpr) | 1628 | 1628 | $default reduce using rule 65 (FunctionCallExpr) | |
1629 | 1629 | |||
1630 | 1630 | |||
state 101 | 1631 | 1631 | state 101 | |
1632 | 1632 | |||
64 FunctionCallExpr: FunctionCallHeaderWithParameters T_RightParen . | 1633 | 1633 | 64 FunctionCallExpr: FunctionCallHeaderWithParameters T_RightParen . | |
1634 | 1634 | |||
$default reduce using rule 64 (FunctionCallExpr) | 1635 | 1635 | $default reduce using rule 64 (FunctionCallExpr) | |
1636 | 1636 | |||
1637 | 1637 | |||
state 102 | 1638 | 1638 | state 102 | |
1639 | 1639 | |||
66 FunctionCallHeaderNoParameters: FunctionIdentifier T_LeftParen . T_Void | 1640 | 1640 | 66 FunctionCallHeaderNoParameters: FunctionIdentifier T_LeftParen . T_Void | |
67 | FunctionIdentifier T_LeftParen . | 1641 | 1641 | 67 | FunctionIdentifier T_LeftParen . | |
68 FunctionCallHeaderWithParameters: FunctionIdentifier T_LeftParen . ArgumentList | 1642 | 1642 | 68 FunctionCallHeaderWithParameters: FunctionIdentifier T_LeftParen . ArgumentList | |
1643 | 1643 | |||
T_Void shift, and go to state 143 | 1644 | 1644 | T_Void shift, and go to state 143 | |
T_LeftParen shift, and go to state 40 | 1645 | 1645 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 1646 | 1646 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 1647 | 1647 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 1648 | 1648 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 1649 | 1649 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 1650 | 1650 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 1651 | 1651 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 1652 | 1652 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 1653 | 1653 | T_BoolConstant shift, and go to state 50 | |
1654 | 1654 | |||
$default reduce using rule 67 (FunctionCallHeaderNoParameters) | 1655 | 1655 | $default reduce using rule 67 (FunctionCallHeaderNoParameters) | |
1656 | 1656 | |||
PrimaryExpr go to state 63 | 1657 | 1657 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 1658 | 1658 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 1659 | 1659 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 1660 | 1660 | FunctionCallHeaderWithParameters go to state 66 | |
ArgumentList go to state 144 | 1661 | 1661 | ArgumentList go to state 144 | |
FunctionIdentifier go to state 67 | 1662 | 1662 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 1663 | 1663 | PostfixExpr go to state 68 | |
UnaryExpr go to state 69 | 1664 | 1664 | UnaryExpr go to state 69 | |
MultiExpr go to state 70 | 1665 | 1665 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 1666 | 1666 | AdditionExpr go to state 71 | |
RelationExpr go to state 72 | 1667 | 1667 | RelationExpr go to state 72 | |
EqualityExpr go to state 73 | 1668 | 1668 | EqualityExpr go to state 73 | |
LogicAndExpr go to state 74 | 1669 | 1669 | LogicAndExpr go to state 74 | |
LogicOrExpr go to state 75 | 1670 | 1670 | LogicOrExpr go to state 75 | |
Expression go to state 145 | 1671 | 1671 | Expression go to state 145 | |
1672 | 1672 | |||
1673 | 1673 | |||
state 103 | 1674 | 1674 | state 103 | |
1675 | 1675 | |||
73 PostfixExpr: PostfixExpr T_LeftBracket . Expression T_RightBracket | 1676 | 1676 | 73 PostfixExpr: PostfixExpr T_LeftBracket . Expression T_RightBracket | |
1677 | 1677 | |||
T_LeftParen shift, and go to state 40 | 1678 | 1678 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 1679 | 1679 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 1680 | 1680 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 1681 | 1681 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 1682 | 1682 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 1683 | 1683 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 1684 | 1684 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 1685 | 1685 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 1686 | 1686 | T_BoolConstant shift, and go to state 50 | |
1687 | 1687 | |||
PrimaryExpr go to state 63 | 1688 | 1688 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 1689 | 1689 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 1690 | 1690 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 1691 | 1691 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 1692 | 1692 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 1693 | 1693 | PostfixExpr go to state 68 | |
UnaryExpr go to state 69 | 1694 | 1694 | UnaryExpr go to state 69 | |
MultiExpr go to state 70 | 1695 | 1695 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 1696 | 1696 | AdditionExpr go to state 71 | |
RelationExpr go to state 72 | 1697 | 1697 | RelationExpr go to state 72 | |
EqualityExpr go to state 73 | 1698 | 1698 | EqualityExpr go to state 73 | |
LogicAndExpr go to state 74 | 1699 | 1699 | LogicAndExpr go to state 74 | |
LogicOrExpr go to state 75 | 1700 | 1700 | LogicOrExpr go to state 75 | |
Expression go to state 146 | 1701 | 1701 | Expression go to state 146 | |
1702 | 1702 | |||
1703 | 1703 | |||
state 104 | 1704 | 1704 | state 104 | |
1705 | 1705 | |||
77 PostfixExpr: PostfixExpr T_Dot . T_FieldSelection | 1706 | 1706 | 77 PostfixExpr: PostfixExpr T_Dot . T_FieldSelection | |
1707 | 1707 | |||
T_FieldSelection shift, and go to state 147 | 1708 | 1708 | T_FieldSelection shift, and go to state 147 | |
1709 | 1709 | |||
1710 | 1710 | |||
state 105 | 1711 | 1711 | state 105 | |
1712 | 1712 | |||
75 PostfixExpr: PostfixExpr T_Inc . | 1713 | 1713 | 75 PostfixExpr: PostfixExpr T_Inc . | |
1714 | 1714 | |||
$default reduce using rule 75 (PostfixExpr) | 1715 | 1715 | $default reduce using rule 75 (PostfixExpr) | |
1716 | 1716 | |||
1717 | 1717 | |||
state 106 | 1718 | 1718 | state 106 | |
1719 | 1719 | |||
76 PostfixExpr: PostfixExpr T_Dec . | 1720 | 1720 | 76 PostfixExpr: PostfixExpr T_Dec . | |
1721 | 1721 | |||
$default reduce using rule 76 (PostfixExpr) | 1722 | 1722 | $default reduce using rule 76 (PostfixExpr) | |
1723 | 1723 | |||
1724 | 1724 | |||
state 107 | 1725 | 1725 | state 107 | |
1726 | 1726 | |||
107 AssignOp: T_MulAssign . | 1727 | 1727 | 107 AssignOp: T_MulAssign . | |
1728 | 1728 | |||
$default reduce using rule 107 (AssignOp) | 1729 | 1729 | $default reduce using rule 107 (AssignOp) | |
1730 | 1730 | |||
1731 | 1731 | |||
state 108 | 1732 | 1732 | state 108 | |
1733 | 1733 | |||
108 AssignOp: T_DivAssign . | 1734 | 1734 | 108 AssignOp: T_DivAssign . | |
1735 | 1735 | |||
$default reduce using rule 108 (AssignOp) | 1736 | 1736 | $default reduce using rule 108 (AssignOp) | |
1737 | 1737 | |||
1738 | 1738 | |||
state 109 | 1739 | 1739 | state 109 | |
1740 | 1740 | |||
105 AssignOp: T_AddAssign . | 1741 | 1741 | 105 AssignOp: T_AddAssign . | |
1742 | 1742 | |||
$default reduce using rule 105 (AssignOp) | 1743 | 1743 | $default reduce using rule 105 (AssignOp) | |
1744 | 1744 | |||
1745 | 1745 | |||
state 110 | 1746 | 1746 | state 110 | |
1747 | 1747 | |||
106 AssignOp: T_SubAssign . | 1748 | 1748 | 106 AssignOp: T_SubAssign . | |
1749 | 1749 | |||
$default reduce using rule 106 (AssignOp) | 1750 | 1750 | $default reduce using rule 106 (AssignOp) | |
1751 | 1751 | |||
1752 | 1752 | |||
state 111 | 1753 | 1753 | state 111 | |
1754 | 1754 | |||
104 AssignOp: T_Equal . | 1755 | 1755 | 104 AssignOp: T_Equal . | |
1756 | 1756 | |||
$default reduce using rule 104 (AssignOp) | 1757 | 1757 | $default reduce using rule 104 (AssignOp) | |
1758 | 1758 | |||
1759 | 1759 | |||
state 112 | 1760 | 1760 | state 112 | |
1761 | 1761 | |||
103 Expression: UnaryExpr AssignOp . Expression | 1762 | 1762 | 103 Expression: UnaryExpr AssignOp . Expression | |
1763 | 1763 | |||
T_LeftParen shift, and go to state 40 | 1764 | 1764 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 1765 | 1765 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 1766 | 1766 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 1767 | 1767 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 1768 | 1768 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 1769 | 1769 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 1770 | 1770 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 1771 | 1771 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 1772 | 1772 | T_BoolConstant shift, and go to state 50 | |
1773 | 1773 | |||
PrimaryExpr go to state 63 | 1774 | 1774 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 1775 | 1775 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 1776 | 1776 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 1777 | 1777 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 1778 | 1778 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 1779 | 1779 | PostfixExpr go to state 68 | |
UnaryExpr go to state 69 | 1780 | 1780 | UnaryExpr go to state 69 | |
MultiExpr go to state 70 | 1781 | 1781 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 1782 | 1782 | AdditionExpr go to state 71 | |
RelationExpr go to state 72 | 1783 | 1783 | RelationExpr go to state 72 | |
EqualityExpr go to state 73 | 1784 | 1784 | EqualityExpr go to state 73 | |
LogicAndExpr go to state 74 | 1785 | 1785 | LogicAndExpr go to state 74 | |
LogicOrExpr go to state 75 | 1786 | 1786 | LogicOrExpr go to state 75 | |
Expression go to state 148 | 1787 | 1787 | Expression go to state 148 | |
1788 | 1788 | |||
1789 | 1789 | |||
state 113 | 1790 | 1790 | state 113 | |
1791 | 1791 | |||
84 MultiExpr: MultiExpr T_Star . UnaryExpr | 1792 | 1792 | 84 MultiExpr: MultiExpr T_Star . UnaryExpr | |
1793 | 1793 | |||
T_LeftParen shift, and go to state 40 | 1794 | 1794 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 1795 | 1795 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 1796 | 1796 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 1797 | 1797 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 1798 | 1798 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 1799 | 1799 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 1800 | 1800 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 1801 | 1801 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 1802 | 1802 | T_BoolConstant shift, and go to state 50 | |
1803 | 1803 | |||
PrimaryExpr go to state 63 | 1804 | 1804 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 1805 | 1805 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 1806 | 1806 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 1807 | 1807 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 1808 | 1808 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 1809 | 1809 | PostfixExpr go to state 68 | |
UnaryExpr go to state 149 | 1810 | 1810 | UnaryExpr go to state 149 | |
1811 | 1811 | |||
1812 | 1812 | |||
state 114 | 1813 | 1813 | state 114 | |
1814 | 1814 | |||
85 MultiExpr: MultiExpr T_Slash . UnaryExpr | 1815 | 1815 | 85 MultiExpr: MultiExpr T_Slash . UnaryExpr | |
1816 | 1816 | |||
T_LeftParen shift, and go to state 40 | 1817 | 1817 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 1818 | 1818 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 1819 | 1819 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 1820 | 1820 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 1821 | 1821 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 1822 | 1822 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 1823 | 1823 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 1824 | 1824 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 1825 | 1825 | T_BoolConstant shift, and go to state 50 | |
1826 | 1826 | |||
PrimaryExpr go to state 63 | 1827 | 1827 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 1828 | 1828 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 1829 | 1829 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 1830 | 1830 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 1831 | 1831 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 1832 | 1832 | PostfixExpr go to state 68 | |
UnaryExpr go to state 150 | 1833 | 1833 | UnaryExpr go to state 150 | |
1834 | 1834 | |||
1835 | 1835 | |||
state 115 | 1836 | 1836 | state 115 | |
1837 | 1837 | |||
87 AdditionExpr: AdditionExpr T_Plus . MultiExpr | 1838 | 1838 | 87 AdditionExpr: AdditionExpr T_Plus . MultiExpr | |
1839 | 1839 | |||
T_LeftParen shift, and go to state 40 | 1840 | 1840 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 1841 | 1841 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 1842 | 1842 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 1843 | 1843 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 1844 | 1844 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 1845 | 1845 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 1846 | 1846 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 1847 | 1847 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 1848 | 1848 | T_BoolConstant shift, and go to state 50 | |
1849 | 1849 | |||
PrimaryExpr go to state 63 | 1850 | 1850 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 1851 | 1851 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 1852 | 1852 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 1853 | 1853 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 1854 | 1854 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 1855 | 1855 | PostfixExpr go to state 68 | |
UnaryExpr go to state 151 | 1856 | 1856 | UnaryExpr go to state 151 | |
MultiExpr go to state 152 | 1857 | 1857 | MultiExpr go to state 152 | |
1858 | 1858 | |||
1859 | 1859 | |||
state 116 | 1860 | 1860 | state 116 | |
1861 | 1861 | |||
88 AdditionExpr: AdditionExpr T_Dash . MultiExpr | 1862 | 1862 | 88 AdditionExpr: AdditionExpr T_Dash . MultiExpr | |
1863 | 1863 | |||
T_LeftParen shift, and go to state 40 | 1864 | 1864 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 1865 | 1865 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 1866 | 1866 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 1867 | 1867 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 1868 | 1868 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 1869 | 1869 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 1870 | 1870 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 1871 | 1871 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 1872 | 1872 | T_BoolConstant shift, and go to state 50 | |
1873 | 1873 | |||
PrimaryExpr go to state 63 | 1874 | 1874 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 1875 | 1875 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 1876 | 1876 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 1877 | 1877 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 1878 | 1878 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 1879 | 1879 | PostfixExpr go to state 68 | |
UnaryExpr go to state 151 | 1880 | 1880 | UnaryExpr go to state 151 | |
MultiExpr go to state 153 | 1881 | 1881 | MultiExpr go to state 153 | |
1882 | 1882 | |||
1883 | 1883 | |||
state 117 | 1884 | 1884 | state 117 | |
1885 | 1885 | |||
93 RelationExpr: RelationExpr T_LessEqual . AdditionExpr | 1886 | 1886 | 93 RelationExpr: RelationExpr T_LessEqual . AdditionExpr | |
1887 | 1887 | |||
T_LeftParen shift, and go to state 40 | 1888 | 1888 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 1889 | 1889 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 1890 | 1890 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 1891 | 1891 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 1892 | 1892 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 1893 | 1893 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 1894 | 1894 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 1895 | 1895 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 1896 | 1896 | T_BoolConstant shift, and go to state 50 | |
1897 | 1897 | |||
PrimaryExpr go to state 63 | 1898 | 1898 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 1899 | 1899 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 1900 | 1900 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 1901 | 1901 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 1902 | 1902 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 1903 | 1903 | PostfixExpr go to state 68 | |
UnaryExpr go to state 151 | 1904 | 1904 | UnaryExpr go to state 151 | |
MultiExpr go to state 70 | 1905 | 1905 | MultiExpr go to state 70 | |
AdditionExpr go to state 154 | 1906 | 1906 | AdditionExpr go to state 154 | |
1907 | 1907 | |||
1908 | 1908 | |||
state 118 | 1909 | 1909 | state 118 | |
1910 | 1910 | |||
92 RelationExpr: RelationExpr T_GreaterEqual . AdditionExpr | 1911 | 1911 | 92 RelationExpr: RelationExpr T_GreaterEqual . AdditionExpr | |
1912 | 1912 | |||
T_LeftParen shift, and go to state 40 | 1913 | 1913 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 1914 | 1914 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 1915 | 1915 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 1916 | 1916 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 1917 | 1917 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 1918 | 1918 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 1919 | 1919 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 1920 | 1920 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 1921 | 1921 | T_BoolConstant shift, and go to state 50 | |
1922 | 1922 | |||
PrimaryExpr go to state 63 | 1923 | 1923 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 1924 | 1924 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 1925 | 1925 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 1926 | 1926 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 1927 | 1927 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 1928 | 1928 | PostfixExpr go to state 68 | |
UnaryExpr go to state 151 | 1929 | 1929 | UnaryExpr go to state 151 | |
MultiExpr go to state 70 | 1930 | 1930 | MultiExpr go to state 70 | |
AdditionExpr go to state 155 | 1931 | 1931 | AdditionExpr go to state 155 | |
1932 | 1932 | |||
1933 | 1933 | |||
state 119 | 1934 | 1934 | state 119 | |
1935 | 1935 | |||
90 RelationExpr: RelationExpr T_LeftAngle . AdditionExpr | 1936 | 1936 | 90 RelationExpr: RelationExpr T_LeftAngle . AdditionExpr | |
1937 | 1937 | |||
T_LeftParen shift, and go to state 40 | 1938 | 1938 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 1939 | 1939 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 1940 | 1940 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 1941 | 1941 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 1942 | 1942 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 1943 | 1943 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 1944 | 1944 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 1945 | 1945 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 1946 | 1946 | T_BoolConstant shift, and go to state 50 | |
1947 | 1947 | |||
PrimaryExpr go to state 63 | 1948 | 1948 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 1949 | 1949 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 1950 | 1950 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 1951 | 1951 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 1952 | 1952 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 1953 | 1953 | PostfixExpr go to state 68 | |
UnaryExpr go to state 151 | 1954 | 1954 | UnaryExpr go to state 151 | |
MultiExpr go to state 70 | 1955 | 1955 | MultiExpr go to state 70 | |
AdditionExpr go to state 156 | 1956 | 1956 | AdditionExpr go to state 156 | |
1957 | 1957 | |||
1958 | 1958 | |||
state 120 | 1959 | 1959 | state 120 | |
1960 | 1960 | |||
91 RelationExpr: RelationExpr T_RightAngle . AdditionExpr | 1961 | 1961 | 91 RelationExpr: RelationExpr T_RightAngle . AdditionExpr | |
1962 | 1962 | |||
T_LeftParen shift, and go to state 40 | 1963 | 1963 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 1964 | 1964 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 1965 | 1965 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 1966 | 1966 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 1967 | 1967 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 1968 | 1968 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 1969 | 1969 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 1970 | 1970 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 1971 | 1971 | T_BoolConstant shift, and go to state 50 | |
1972 | 1972 | |||
PrimaryExpr go to state 63 | 1973 | 1973 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 1974 | 1974 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 1975 | 1975 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 1976 | 1976 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 1977 | 1977 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 1978 | 1978 | PostfixExpr go to state 68 | |
UnaryExpr go to state 151 | 1979 | 1979 | UnaryExpr go to state 151 | |
MultiExpr go to state 70 | 1980 | 1980 | MultiExpr go to state 70 | |
AdditionExpr go to state 157 | 1981 | 1981 | AdditionExpr go to state 157 | |
1982 | 1982 | |||
1983 | 1983 | |||
state 121 | 1984 | 1984 | state 121 | |
1985 | 1985 | |||
95 EqualityExpr: EqualityExpr T_EQ . RelationExpr | 1986 | 1986 | 95 EqualityExpr: EqualityExpr T_EQ . RelationExpr | |
1987 | 1987 | |||
T_LeftParen shift, and go to state 40 | 1988 | 1988 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 1989 | 1989 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 1990 | 1990 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 1991 | 1991 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 1992 | 1992 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 1993 | 1993 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 1994 | 1994 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 1995 | 1995 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 1996 | 1996 | T_BoolConstant shift, and go to state 50 | |
1997 | 1997 | |||
PrimaryExpr go to state 63 | 1998 | 1998 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 1999 | 1999 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 2000 | 2000 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 2001 | 2001 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 2002 | 2002 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 2003 | 2003 | PostfixExpr go to state 68 | |
UnaryExpr go to state 151 | 2004 | 2004 | UnaryExpr go to state 151 | |
MultiExpr go to state 70 | 2005 | 2005 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 2006 | 2006 | AdditionExpr go to state 71 | |
RelationExpr go to state 158 | 2007 | 2007 | RelationExpr go to state 158 | |
2008 | 2008 | |||
2009 | 2009 | |||
state 122 | 2010 | 2010 | state 122 | |
2011 | 2011 | |||
96 EqualityExpr: EqualityExpr T_NE . RelationExpr | 2012 | 2012 | 96 EqualityExpr: EqualityExpr T_NE . RelationExpr | |
2013 | 2013 | |||
T_LeftParen shift, and go to state 40 | 2014 | 2014 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 2015 | 2015 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 2016 | 2016 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 2017 | 2017 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 2018 | 2018 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 2019 | 2019 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 2020 | 2020 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 2021 | 2021 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 2022 | 2022 | T_BoolConstant shift, and go to state 50 | |
2023 | 2023 | |||
PrimaryExpr go to state 63 | 2024 | 2024 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 2025 | 2025 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 2026 | 2026 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 2027 | 2027 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 2028 | 2028 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 2029 | 2029 | PostfixExpr go to state 68 | |
UnaryExpr go to state 151 | 2030 | 2030 | UnaryExpr go to state 151 | |
MultiExpr go to state 70 | 2031 | 2031 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 2032 | 2032 | AdditionExpr go to state 71 | |
RelationExpr go to state 159 | 2033 | 2033 | RelationExpr go to state 159 | |
2034 | 2034 | |||
2035 | 2035 | |||
state 123 | 2036 | 2036 | state 123 | |
2037 | 2037 | |||
98 LogicAndExpr: LogicAndExpr T_And . EqualityExpr | 2038 | 2038 | 98 LogicAndExpr: LogicAndExpr T_And . EqualityExpr | |
2039 | 2039 | |||
T_LeftParen shift, and go to state 40 | 2040 | 2040 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 2041 | 2041 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 2042 | 2042 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 2043 | 2043 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 2044 | 2044 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 2045 | 2045 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 2046 | 2046 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 2047 | 2047 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 2048 | 2048 | T_BoolConstant shift, and go to state 50 | |
2049 | 2049 | |||
PrimaryExpr go to state 63 | 2050 | 2050 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 2051 | 2051 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 2052 | 2052 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 2053 | 2053 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 2054 | 2054 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 2055 | 2055 | PostfixExpr go to state 68 | |
UnaryExpr go to state 151 | 2056 | 2056 | UnaryExpr go to state 151 | |
MultiExpr go to state 70 | 2057 | 2057 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 2058 | 2058 | AdditionExpr go to state 71 | |
RelationExpr go to state 72 | 2059 | 2059 | RelationExpr go to state 72 | |
EqualityExpr go to state 160 | 2060 | 2060 | EqualityExpr go to state 160 | |
2061 | 2061 | |||
2062 | 2062 | |||
state 124 | 2063 | 2063 | state 124 | |
2064 | 2064 | |||
102 Expression: LogicOrExpr T_Question . LogicOrExpr T_Colon LogicOrExpr | 2065 | 2065 | 102 Expression: LogicOrExpr T_Question . LogicOrExpr T_Colon LogicOrExpr | |
2066 | 2066 | |||
T_LeftParen shift, and go to state 40 | 2067 | 2067 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 2068 | 2068 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 2069 | 2069 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 2070 | 2070 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 2071 | 2071 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 2072 | 2072 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 2073 | 2073 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 2074 | 2074 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 2075 | 2075 | T_BoolConstant shift, and go to state 50 | |
2076 | 2076 | |||
PrimaryExpr go to state 63 | 2077 | 2077 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 2078 | 2078 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 2079 | 2079 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 2080 | 2080 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 2081 | 2081 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 2082 | 2082 | PostfixExpr go to state 68 | |
UnaryExpr go to state 151 | 2083 | 2083 | UnaryExpr go to state 151 | |
MultiExpr go to state 70 | 2084 | 2084 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 2085 | 2085 | AdditionExpr go to state 71 | |
RelationExpr go to state 72 | 2086 | 2086 | RelationExpr go to state 72 | |
EqualityExpr go to state 73 | 2087 | 2087 | EqualityExpr go to state 73 | |
LogicAndExpr go to state 74 | 2088 | 2088 | LogicAndExpr go to state 74 | |
LogicOrExpr go to state 161 | 2089 | 2089 | LogicOrExpr go to state 161 | |
2090 | 2090 | |||
2091 | 2091 | |||
state 125 | 2092 | 2092 | state 125 | |
2093 | 2093 | |||
100 LogicOrExpr: LogicOrExpr T_Or . LogicAndExpr | 2094 | 2094 | 100 LogicOrExpr: LogicOrExpr T_Or . LogicAndExpr | |
2095 | 2095 | |||
T_LeftParen shift, and go to state 40 | 2096 | 2096 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 2097 | 2097 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 2098 | 2098 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 2099 | 2099 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 2100 | 2100 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 2101 | 2101 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 2102 | 2102 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 2103 | 2103 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 2104 | 2104 | T_BoolConstant shift, and go to state 50 | |
2105 | 2105 | |||
PrimaryExpr go to state 63 | 2106 | 2106 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 2107 | 2107 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 2108 | 2108 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 2109 | 2109 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 2110 | 2110 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 2111 | 2111 | PostfixExpr go to state 68 | |
UnaryExpr go to state 151 | 2112 | 2112 | UnaryExpr go to state 151 | |
MultiExpr go to state 70 | 2113 | 2113 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 2114 | 2114 | AdditionExpr go to state 71 | |
RelationExpr go to state 72 | 2115 | 2115 | RelationExpr go to state 72 | |
EqualityExpr go to state 73 | 2116 | 2116 | EqualityExpr go to state 73 | |
LogicAndExpr go to state 162 | 2117 | 2117 | LogicAndExpr go to state 162 | |
2118 | 2118 | |||
2119 | 2119 | |||
state 126 | 2120 | 2120 | state 126 | |
2121 | 2121 | |||
41 SingleStatement: Expression T_Semicolon . | 2122 | 2122 | 41 SingleStatement: Expression T_Semicolon . | |
2123 | 2123 | |||
$default reduce using rule 41 (SingleStatement) | 2124 | 2124 | $default reduce using rule 41 (SingleStatement) | |
2125 | 2125 | |||
2126 | 2126 | |||
state 127 | 2127 | 2127 | state 127 | |
2128 | 2128 | |||
17 SingleDecl: TypeQualify TypeDecl T_Identifier T_LeftBracket . T_IntConstant T_RightBracket | 2129 | 2129 | 17 SingleDecl: TypeQualify TypeDecl T_Identifier T_LeftBracket . T_IntConstant T_RightBracket | |
2130 | 2130 | |||
T_IntConstant shift, and go to state 163 | 2131 | 2131 | T_IntConstant shift, and go to state 163 | |
2132 | 2132 | |||
2133 | 2133 | |||
state 128 | 2134 | 2134 | state 128 | |
2135 | 2135 | |||
15 SingleDecl: TypeQualify TypeDecl T_Identifier T_Equal . Initializer | 2136 | 2136 | 15 SingleDecl: TypeQualify TypeDecl T_Identifier T_Equal . Initializer | |
2137 | 2137 | |||
T_LeftParen shift, and go to state 40 | 2138 | 2138 | T_LeftParen shift, and go to state 40 | |
T_Plus shift, and go to state 43 | 2139 | 2139 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 2140 | 2140 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 2141 | 2141 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 2142 | 2142 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 2143 | 2143 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 2144 | 2144 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 2145 | 2145 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 2146 | 2146 | T_BoolConstant shift, and go to state 50 | |
2147 | 2147 | |||
Initializer go to state 164 | 2148 | 2148 | Initializer go to state 164 | |
PrimaryExpr go to state 63 | 2149 | 2149 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 2150 | 2150 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 2151 | 2151 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 2152 | 2152 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 2153 | 2153 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 2154 | 2154 | PostfixExpr go to state 68 | |
UnaryExpr go to state 69 | 2155 | 2155 | UnaryExpr go to state 69 | |
MultiExpr go to state 70 | 2156 | 2156 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 2157 | 2157 | AdditionExpr go to state 71 | |
RelationExpr go to state 72 | 2158 | 2158 | RelationExpr go to state 72 | |
EqualityExpr go to state 73 | 2159 | 2159 | EqualityExpr go to state 73 | |
LogicAndExpr go to state 74 | 2160 | 2160 | LogicAndExpr go to state 74 | |
LogicOrExpr go to state 75 | 2161 | 2161 | LogicOrExpr go to state 75 | |
Expression go to state 134 | 2162 | 2162 | Expression go to state 134 | |
2163 | 2163 | |||
2164 | 2164 | |||
state 129 | 2165 | 2165 | state 129 | |
2166 | 2166 | |||
8 FuncDecl: TypeDecl T_Identifier T_LeftParen T_RightParen . | 2167 | 2167 | 8 FuncDecl: TypeDecl T_Identifier T_LeftParen T_RightParen . | |
2168 | 2168 | |||
$default reduce using rule 8 (FuncDecl) | 2169 | 2169 | $default reduce using rule 8 (FuncDecl) | |
2170 | 2170 | |||
2171 | 2171 | |||
state 130 | 2172 | 2172 | state 130 | |
2173 | 2173 | |||
9 FuncDecl: TypeDecl T_Identifier T_LeftParen ParameterList . T_RightParen | 2174 | 2174 | 9 FuncDecl: TypeDecl T_Identifier T_LeftParen ParameterList . T_RightParen | |
11 ParameterList: ParameterList . T_Comma SingleDecl | 2175 | 2175 | 11 ParameterList: ParameterList . T_Comma SingleDecl | |
2176 | 2176 | |||
T_RightParen shift, and go to state 165 | 2177 | 2177 | T_RightParen shift, and go to state 165 | |
T_Comma shift, and go to state 166 | 2178 | 2178 | T_Comma shift, and go to state 166 | |
2179 | 2179 | |||
2180 | 2180 | |||
state 131 | 2181 | 2181 | state 131 | |
2182 | 2182 | |||
10 ParameterList: SingleDecl . | 2183 | 2183 | 10 ParameterList: SingleDecl . | |
2184 | 2184 | |||
$default reduce using rule 10 (ParameterList) | 2185 | 2185 | $default reduce using rule 10 (ParameterList) | |
2186 | 2186 | |||
2187 | 2187 | |||
state 132 | 2188 | 2188 | state 132 | |
2189 | 2189 | |||
16 SingleDecl: TypeDecl T_Identifier T_LeftBracket T_IntConstant . T_RightBracket | 2190 | 2190 | 16 SingleDecl: TypeDecl T_Identifier T_LeftBracket T_IntConstant . T_RightBracket | |
2191 | 2191 | |||
T_RightBracket shift, and go to state 167 | 2192 | 2192 | T_RightBracket shift, and go to state 167 | |
2193 | 2193 | |||
2194 | 2194 | |||
state 133 | 2195 | 2195 | state 133 | |
2196 | 2196 | |||
14 SingleDecl: TypeDecl T_Identifier T_Equal Initializer . | 2197 | 2197 | 14 SingleDecl: TypeDecl T_Identifier T_Equal Initializer . | |
2198 | 2198 | |||
$default reduce using rule 14 (SingleDecl) | 2199 | 2199 | $default reduce using rule 14 (SingleDecl) | |
2200 | 2200 | |||
2201 | 2201 | |||
state 134 | 2202 | 2202 | state 134 | |
2203 | 2203 | |||
18 Initializer: Expression . | 2204 | 2204 | 18 Initializer: Expression . | |
2205 | 2205 | |||
$default reduce using rule 18 (Initializer) | 2206 | 2206 | $default reduce using rule 18 (Initializer) | |
2207 | 2207 | |||
2208 | 2208 | |||
state 135 | 2209 | 2209 | state 135 | |
2210 | 2210 | |||
57 WhileStmt: T_While T_LeftParen Expression . T_RightParen Statement | 2211 | 2211 | 57 WhileStmt: T_While T_LeftParen Expression . T_RightParen Statement | |
2212 | 2212 | |||
T_RightParen shift, and go to state 168 | 2213 | 2213 | T_RightParen shift, and go to state 168 | |
2214 | 2214 | |||
2215 | 2215 | |||
state 136 | 2216 | 2216 | state 136 | |
2217 | 2217 | |||
58 ForStmt: T_For T_LeftParen Expression . T_Semicolon Expression T_Semicolon Expression T_RightParen Statement | 2218 | 2218 | 58 ForStmt: T_For T_LeftParen Expression . T_Semicolon Expression T_Semicolon Expression T_RightParen Statement | |
2219 | 2219 | |||
T_Semicolon shift, and go to state 169 | 2220 | 2220 | T_Semicolon shift, and go to state 169 | |
2221 | 2221 | |||
2222 | 2222 | |||
state 137 | 2223 | 2223 | state 137 | |
2224 | 2224 | |||
48 SelectionStmt: T_If T_LeftParen Expression . T_RightParen Statement T_Else Statement | 2225 | 2225 | 48 SelectionStmt: T_If T_LeftParen Expression . T_RightParen Statement T_Else Statement | |
49 | T_If T_LeftParen Expression . T_RightParen Statement | 2226 | 2226 | 49 | T_If T_LeftParen Expression . T_RightParen Statement | |
2227 | 2227 | |||
T_RightParen shift, and go to state 170 | 2228 | 2228 | T_RightParen shift, and go to state 170 | |
2229 | 2229 | |||
2230 | 2230 | |||
state 138 | 2231 | 2231 | state 138 | |
2232 | 2232 | |||
56 JumpStmt: T_Return Expression T_Semicolon . | 2233 | 2233 | 56 JumpStmt: T_Return Expression T_Semicolon . | |
2234 | 2234 | |||
$default reduce using rule 56 (JumpStmt) | 2235 | 2235 | $default reduce using rule 56 (JumpStmt) | |
2236 | 2236 | |||
2237 | 2237 | |||
state 139 | 2238 | 2238 | state 139 | |
2239 | 2239 | |||
50 SwitchStmt: T_Switch T_LeftParen Expression . T_RightParen T_LeftBrace StatementList T_RightBrace | 2240 | 2240 | 50 SwitchStmt: T_Switch T_LeftParen Expression . T_RightParen T_LeftBrace StatementList T_RightBrace | |
2241 | 2241 | |||
T_RightParen shift, and go to state 171 | 2242 | 2242 | T_RightParen shift, and go to state 171 | |
2243 | 2243 | |||
2244 | 2244 | |||
state 140 | 2245 | 2245 | state 140 | |
2246 | 2246 | |||
51 CaseStmt: T_Case Expression T_Colon . Statement | 2247 | 2247 | 51 CaseStmt: T_Case Expression T_Colon . Statement | |
2248 | 2248 | |||
T_Void shift, and go to state 1 | 2249 | 2249 | T_Void shift, and go to state 1 | |
T_Bool shift, and go to state 2 | 2250 | 2250 | T_Bool shift, and go to state 2 | |
T_Int shift, and go to state 3 | 2251 | 2251 | T_Int shift, and go to state 3 | |
T_Float shift, and go to state 4 | 2252 | 2252 | T_Float shift, and go to state 4 | |
T_Vec2 shift, and go to state 5 | 2253 | 2253 | T_Vec2 shift, and go to state 5 | |
T_Vec3 shift, and go to state 6 | 2254 | 2254 | T_Vec3 shift, and go to state 6 | |
T_Vec4 shift, and go to state 7 | 2255 | 2255 | T_Vec4 shift, and go to state 7 | |
T_Mat2 shift, and go to state 8 | 2256 | 2256 | T_Mat2 shift, and go to state 8 | |
T_Mat3 shift, and go to state 9 | 2257 | 2257 | T_Mat3 shift, and go to state 9 | |
T_Mat4 shift, and go to state 10 | 2258 | 2258 | T_Mat4 shift, and go to state 10 | |
T_While shift, and go to state 31 | 2259 | 2259 | T_While shift, and go to state 31 | |
T_For shift, and go to state 32 | 2260 | 2260 | T_For shift, and go to state 32 | |
T_If shift, and go to state 33 | 2261 | 2261 | T_If shift, and go to state 33 | |
T_Return shift, and go to state 34 | 2262 | 2262 | T_Return shift, and go to state 34 | |
T_Break shift, and go to state 35 | 2263 | 2263 | T_Break shift, and go to state 35 | |
T_Continue shift, and go to state 36 | 2264 | 2264 | T_Continue shift, and go to state 36 | |
T_Switch shift, and go to state 37 | 2265 | 2265 | T_Switch shift, and go to state 37 | |
T_Case shift, and go to state 38 | 2266 | 2266 | T_Case shift, and go to state 38 | |
T_Default shift, and go to state 39 | 2267 | 2267 | T_Default shift, and go to state 39 | |
T_In shift, and go to state 11 | 2268 | 2268 | T_In shift, and go to state 11 | |
T_Out shift, and go to state 12 | 2269 | 2269 | T_Out shift, and go to state 12 | |
T_Const shift, and go to state 13 | 2270 | 2270 | T_Const shift, and go to state 13 | |
T_Uniform shift, and go to state 14 | 2271 | 2271 | T_Uniform shift, and go to state 14 | |
T_LeftParen shift, and go to state 40 | 2272 | 2272 | T_LeftParen shift, and go to state 40 | |
T_LeftBrace shift, and go to state 25 | 2273 | 2273 | T_LeftBrace shift, and go to state 25 | |
T_Semicolon shift, and go to state 42 | 2274 | 2274 | T_Semicolon shift, and go to state 42 | |
T_Plus shift, and go to state 43 | 2275 | 2275 | T_Plus shift, and go to state 43 | |
T_Dash shift, and go to state 44 | 2276 | 2276 | T_Dash shift, and go to state 44 | |
T_Inc shift, and go to state 45 | 2277 | 2277 | T_Inc shift, and go to state 45 | |
T_Dec shift, and go to state 46 | 2278 | 2278 | T_Dec shift, and go to state 46 | |
T_Identifier shift, and go to state 47 | 2279 | 2279 | T_Identifier shift, and go to state 47 | |
T_IntConstant shift, and go to state 48 | 2280 | 2280 | T_IntConstant shift, and go to state 48 | |
T_FloatConstant shift, and go to state 49 | 2281 | 2281 | T_FloatConstant shift, and go to state 49 | |
T_BoolConstant shift, and go to state 50 | 2282 | 2282 | T_BoolConstant shift, and go to state 50 | |
2283 | 2283 | |||
SingleDecl go to state 51 | 2284 | 2284 | SingleDecl go to state 51 | |
TypeQualify go to state 21 | 2285 | 2285 | TypeQualify go to state 21 | |
TypeDecl go to state 52 | 2286 | 2286 | TypeDecl go to state 52 | |
CompoundStatement go to state 53 | 2287 | 2287 | CompoundStatement go to state 53 | |
Statement go to state 172 | 2288 | 2288 | Statement go to state 172 | |
SingleStatement go to state 56 | 2289 | 2289 | SingleStatement go to state 56 | |
SelectionStmt go to state 57 | 2290 | 2290 | SelectionStmt go to state 57 | |
SwitchStmt go to state 58 | 2291 | 2291 | SwitchStmt go to state 58 | |
CaseStmt go to state 59 | 2292 | 2292 | CaseStmt go to state 59 | |
JumpStmt go to state 60 | 2293 | 2293 | JumpStmt go to state 60 | |
WhileStmt go to state 61 | 2294 | 2294 | WhileStmt go to state 61 | |
ForStmt go to state 62 | 2295 | 2295 | ForStmt go to state 62 | |
PrimaryExpr go to state 63 | 2296 | 2296 | PrimaryExpr go to state 63 | |
FunctionCallExpr go to state 64 | 2297 | 2297 | FunctionCallExpr go to state 64 | |
FunctionCallHeaderNoParameters go to state 65 | 2298 | 2298 | FunctionCallHeaderNoParameters go to state 65 | |
FunctionCallHeaderWithParameters go to state 66 | 2299 | 2299 | FunctionCallHeaderWithParameters go to state 66 | |
FunctionIdentifier go to state 67 | 2300 | 2300 | FunctionIdentifier go to state 67 | |
PostfixExpr go to state 68 | 2301 | 2301 | PostfixExpr go to state 68 | |
UnaryExpr go to state 69 | 2302 | 2302 | UnaryExpr go to state 69 | |
MultiExpr go to state 70 | 2303 | 2303 | MultiExpr go to state 70 | |
AdditionExpr go to state 71 | 2304 | 2304 | AdditionExpr go to state 71 | |
RelationExpr go to state 72 | 2305 | 2305 | RelationExpr go to state 72 | |
EqualityExpr go to state 73 | 2306 | 2306 | EqualityExpr go to state 73 | |
LogicAndExpr go to state 74 | 2307 | 2307 | LogicAndExpr go to state 74 | |
LogicOrExpr go to state 75 | 2308 | 2308 | LogicOrExpr go to state 75 | |
Expression go to state 76 | 2309 | 2309 | Expression go to state 76 | |
2310 | 2310 | |||
2311 | 2311 | |||
state 141 | 2312 | 2312 | state 141 | |
2313 | 2313 | |||
52 CaseStmt: T_Default T_Colon Statement . | 2314 | 2314 | 52 CaseStmt: T_Default T_Colon Statement . | |
2315 | 2315 | |||
$default reduce using rule 52 (CaseStmt) | 2316 | 2316 | $default reduce using rule 52 (CaseStmt) |
y.tab.c
View file @
c189b2a
/* A Bison parser, made by GNU Bison 2.3. */ | 1 | |||
2 | 1 | |||
/* Skeleton implementation for Bison's Yacc-like parsers in C | 3 | 2 | /* A Bison parser, made by GNU Bison 2.4.1. */ | |
4 | 3 | |||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 | 5 | 4 | /* Skeleton implementation for Bison's Yacc-like parsers in C | |
5 | ||||
6 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 | |||
Free Software Foundation, Inc. | 6 | 7 | Free Software Foundation, Inc. | |
7 | 8 | |||
This program is free software; you can redistribute it and/or modify | 8 | 9 | This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | 9 | 10 | it under the terms of the GNU General Public License as published by | |
the Free Software Foundation; either version 2, or (at your option) | 10 | 11 | the Free Software Foundation, either version 3 of the License, or | |
any later version. | 11 | 12 | (at your option) any later version. | |
12 | 13 | |||
This program is distributed in the hope that it will be useful, | 13 | 14 | This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
GNU General Public License for more details. | 16 | 17 | GNU General Public License for more details. | |
17 | 18 | |||
You should have received a copy of the GNU General Public License | 18 | 19 | You should have received a copy of the GNU General Public License | |
along with this program; if not, write to the Free Software | 19 | 20 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
Foundation, Inc., 51 Franklin Street, Fifth Floor, | 20 | |||
Boston, MA 02110-1301, USA. */ | 21 | |||
22 | 21 | |||
/* As a special exception, you may create a larger work that contains | 23 | 22 | /* As a special exception, you may create a larger work that contains | |
part or all of the Bison parser skeleton and distribute that work | 24 | 23 | part or all of the Bison parser skeleton and distribute that work | |
under terms of your choice, so long as that work isn't itself a | 25 | 24 | under terms of your choice, so long as that work isn't itself a | |
parser generator using the skeleton or a modified version thereof | 26 | 25 | parser generator using the skeleton or a modified version thereof | |
as a parser skeleton. Alternatively, if you modify or redistribute | 27 | 26 | as a parser skeleton. Alternatively, if you modify or redistribute | |
the parser skeleton itself, you may (at your option) remove this | 28 | 27 | the parser skeleton itself, you may (at your option) remove this | |
special exception, which will cause the skeleton and the resulting | 29 | 28 | special exception, which will cause the skeleton and the resulting | |
Bison output files to be licensed under the GNU General Public | 30 | 29 | Bison output files to be licensed under the GNU General Public | |
License without this special exception. | 31 | 30 | License without this special exception. | |
32 | 31 | |||
This special exception was added by the Free Software Foundation in | 33 | 32 | This special exception was added by the Free Software Foundation in | |
version 2.2 of Bison. */ | 34 | 33 | version 2.2 of Bison. */ | |
35 | 34 | |||
/* C LALR(1) parser skeleton written by Richard Stallman, by | 36 | 35 | /* C LALR(1) parser skeleton written by Richard Stallman, by | |
simplifying the original so-called "semantic" parser. */ | 37 | 36 | simplifying the original so-called "semantic" parser. */ | |
38 | 37 | |||
/* All symbols defined below should begin with yy or YY, to avoid | 39 | 38 | /* All symbols defined below should begin with yy or YY, to avoid | |
infringing on user name space. This should be done even for local | 40 | 39 | infringing on user name space. This should be done even for local | |
variables, as they might otherwise be expanded by user macros. | 41 | 40 | variables, as they might otherwise be expanded by user macros. | |
There are some unavoidable exceptions within include files to | 42 | 41 | There are some unavoidable exceptions within include files to | |
define necessary library symbols; they are noted "INFRINGES ON | 43 | 42 | define necessary library symbols; they are noted "INFRINGES ON | |
USER NAME SPACE" below. */ | 44 | 43 | USER NAME SPACE" below. */ | |
45 | 44 | |||
/* Identify Bison output. */ | 46 | 45 | /* Identify Bison output. */ | |
#define YYBISON 1 | 47 | 46 | #define YYBISON 1 | |
48 | 47 | |||
/* Bison version. */ | 49 | 48 | /* Bison version. */ | |
#define YYBISON_VERSION "2.3" | 50 | 49 | #define YYBISON_VERSION "2.4.1" | |
51 | 50 | |||
/* Skeleton name. */ | 52 | 51 | /* Skeleton name. */ | |
#define YYSKELETON_NAME "yacc.c" | 53 | 52 | #define YYSKELETON_NAME "yacc.c" | |
54 | 53 | |||
/* Pure parsers. */ | 55 | 54 | /* Pure parsers. */ | |
#define YYPURE 0 | 56 | 55 | #define YYPURE 0 | |
57 | 56 | |||
57 | /* Push parsers. */ | |||
58 | #define YYPUSH 0 | |||
59 | ||||
60 | /* Pull parsers. */ | |||
61 | #define YYPULL 1 | |||
62 | ||||
/* Using locations. */ | 58 | 63 | /* Using locations. */ | |
#define YYLSP_NEEDED 1 | 59 | 64 | #define YYLSP_NEEDED 1 | |
60 | 65 | |||
61 | 66 | |||
62 | 67 | |||
68 | /* Copy the first part of user declarations. */ | |||
69 | ||||
70 | /* Line 189 of yacc.c */ | |||
71 | #line 11 "parser.y" | |||
72 | ||||
73 | ||||
74 | /* Just like lex, the text within this first region delimited by %{ and %} | |||
75 | * is assumed to be C/C++ code and will be copied verbatim to the y.tab.c | |||
76 | * file ahead of the definitions of the yyparse() function. Add other header | |||
77 | * file inclusions or C++ variable declarations/prototypes that are needed | |||
78 | * by your code here. | |||
79 | */ | |||
80 | #include "scanner.h" // for yylex | |||
81 | #include "parser.h" | |||
82 | #include "errors.h" | |||
83 | ||||
84 | void yyerror(const char *msg); // standard error-handling routine | |||
85 | ||||
86 | ||||
87 | ||||
88 | /* Line 189 of yacc.c */ | |||
89 | #line 90 "y.tab.c" | |||
90 | ||||
91 | /* Enabling traces. */ | |||
92 | #ifndef YYDEBUG | |||
93 | # define YYDEBUG 1 | |||
94 | #endif | |||
95 | ||||
96 | /* Enabling verbose error messages. */ | |||
97 | #ifdef YYERROR_VERBOSE | |||
98 | # undef YYERROR_VERBOSE | |||
99 | # define YYERROR_VERBOSE 1 | |||
100 | #else | |||
101 | # define YYERROR_VERBOSE 0 | |||
102 | #endif | |||
103 | ||||
104 | /* Enabling the token table. */ | |||
105 | #ifndef YYTOKEN_TABLE | |||
106 | # define YYTOKEN_TABLE 0 | |||
107 | #endif | |||
108 | ||||
109 | ||||
/* Tokens. */ | 63 | 110 | /* Tokens. */ | |
#ifndef YYTOKENTYPE | 64 | 111 | #ifndef YYTOKENTYPE | |
# define YYTOKENTYPE | 65 | 112 | # define YYTOKENTYPE | |
/* Put the tokens into the symbol table, so that GDB and other debuggers | 66 | 113 | /* Put the tokens into the symbol table, so that GDB and other debuggers | |
know about them. */ | 67 | 114 | know about them. */ | |
enum yytokentype { | 68 | 115 | enum yytokentype { | |
T_Void = 258, | 69 | 116 | T_Void = 258, | |
T_Bool = 259, | 70 | 117 | T_Bool = 259, | |
T_Int = 260, | 71 | 118 | T_Int = 260, | |
T_Float = 261, | 72 | 119 | T_Float = 261, | |
T_Uint = 262, | 73 | 120 | T_Uint = 262, | |
T_Bvec2 = 263, | 74 | 121 | T_Bvec2 = 263, | |
T_Bvec3 = 264, | 75 | 122 | T_Bvec3 = 264, | |
T_Bvec4 = 265, | 76 | 123 | T_Bvec4 = 265, | |
T_Ivec2 = 266, | 77 | 124 | T_Ivec2 = 266, | |
T_Ivec3 = 267, | 78 | 125 | T_Ivec3 = 267, | |
T_Ivec4 = 268, | 79 | 126 | T_Ivec4 = 268, | |
T_Uvec2 = 269, | 80 | 127 | T_Uvec2 = 269, | |
T_Uvec3 = 270, | 81 | 128 | T_Uvec3 = 270, | |
T_Uvec4 = 271, | 82 | 129 | T_Uvec4 = 271, | |
T_Vec2 = 272, | 83 | 130 | T_Vec2 = 272, | |
T_Vec3 = 273, | 84 | 131 | T_Vec3 = 273, | |
T_Vec4 = 274, | 85 | 132 | T_Vec4 = 274, | |
T_Mat2 = 275, | 86 | 133 | T_Mat2 = 275, | |
T_Mat3 = 276, | 87 | 134 | T_Mat3 = 276, | |
T_Mat4 = 277, | 88 | 135 | T_Mat4 = 277, | |
T_While = 278, | 89 | 136 | T_While = 278, | |
T_For = 279, | 90 | 137 | T_For = 279, | |
T_If = 280, | 91 | 138 | T_If = 280, | |
T_Else = 281, | 92 | 139 | T_Else = 281, | |
T_Return = 282, | 93 | 140 | T_Return = 282, | |
T_Break = 283, | 94 | 141 | T_Break = 283, | |
T_Continue = 284, | 95 | 142 | T_Continue = 284, | |
T_Do = 285, | 96 | 143 | T_Do = 285, | |
T_Switch = 286, | 97 | 144 | T_Switch = 286, | |
T_Case = 287, | 98 | 145 | T_Case = 287, | |
T_Default = 288, | 99 | 146 | T_Default = 288, | |
T_In = 289, | 100 | 147 | T_In = 289, | |
T_Out = 290, | 101 | 148 | T_Out = 290, | |
T_Const = 291, | 102 | 149 | T_Const = 291, | |
T_Uniform = 292, | 103 | 150 | T_Uniform = 292, | |
T_LeftParen = 293, | 104 | 151 | T_LeftParen = 293, | |
T_RightParen = 294, | 105 | 152 | T_RightParen = 294, | |
T_LeftBracket = 295, | 106 | 153 | T_LeftBracket = 295, | |
T_RightBracket = 296, | 107 | 154 | T_RightBracket = 296, | |
T_LeftBrace = 297, | 108 | 155 | T_LeftBrace = 297, | |
T_RightBrace = 298, | 109 | 156 | T_RightBrace = 298, | |
T_Dot = 299, | 110 | 157 | T_Dot = 299, | |
T_Comma = 300, | 111 | 158 | T_Comma = 300, | |
T_Colon = 301, | 112 | 159 | T_Colon = 301, | |
T_Semicolon = 302, | 113 | 160 | T_Semicolon = 302, | |
T_Question = 303, | 114 | 161 | T_Question = 303, | |
T_LessEqual = 304, | 115 | 162 | T_LessEqual = 304, | |
T_GreaterEqual = 305, | 116 | 163 | T_GreaterEqual = 305, | |
T_EQ = 306, | 117 | 164 | T_EQ = 306, | |
T_NE = 307, | 118 | 165 | T_NE = 307, | |
T_And = 308, | 119 | 166 | T_And = 308, | |
T_Or = 309, | 120 | 167 | T_Or = 309, | |
T_Plus = 310, | 121 | 168 | T_Plus = 310, | |
T_Star = 311, | 122 | 169 | T_Star = 311, | |
T_MulAssign = 312, | 123 | 170 | T_MulAssign = 312, | |
T_DivAssign = 313, | 124 | 171 | T_DivAssign = 313, | |
T_AddAssign = 314, | 125 | 172 | T_AddAssign = 314, | |
T_SubAssign = 315, | 126 | 173 | T_SubAssign = 315, | |
T_Equal = 316, | 127 | 174 | T_Equal = 316, | |
T_LeftAngle = 317, | 128 | 175 | T_LeftAngle = 317, | |
T_RightAngle = 318, | 129 | 176 | T_RightAngle = 318, | |
T_Dash = 319, | 130 | 177 | T_Dash = 319, | |
T_Slash = 320, | 131 | 178 | T_Slash = 320, | |
T_Inc = 321, | 132 | 179 | T_Inc = 321, | |
T_Dec = 322, | 133 | 180 | T_Dec = 322, | |
T_Identifier = 323, | 134 | 181 | T_Identifier = 323, | |
T_IntConstant = 324, | 135 | 182 | T_IntConstant = 324, | |
T_FloatConstant = 325, | 136 | 183 | T_FloatConstant = 325, | |
T_BoolConstant = 326, | 137 | 184 | T_BoolConstant = 326, | |
T_FieldSelection = 327, | 138 | 185 | T_FieldSelection = 327, | |
LOWEST = 328, | 139 | 186 | LOWEST = 328, | |
LOWER_THAN_ELSE = 329 | 140 | 187 | LOWER_THAN_ELSE = 329 | |
}; | 141 | 188 | }; | |
#endif | 142 | 189 | #endif | |
/* Tokens. */ | 143 | 190 | /* Tokens. */ | |
#define T_Void 258 | 144 | 191 | #define T_Void 258 | |
#define T_Bool 259 | 145 | 192 | #define T_Bool 259 | |
#define T_Int 260 | 146 | 193 | #define T_Int 260 | |
#define T_Float 261 | 147 | 194 | #define T_Float 261 | |
#define T_Uint 262 | 148 | 195 | #define T_Uint 262 | |
#define T_Bvec2 263 | 149 | 196 | #define T_Bvec2 263 | |
#define T_Bvec3 264 | 150 | 197 | #define T_Bvec3 264 | |
#define T_Bvec4 265 | 151 | 198 | #define T_Bvec4 265 | |
#define T_Ivec2 266 | 152 | 199 | #define T_Ivec2 266 | |
#define T_Ivec3 267 | 153 | 200 | #define T_Ivec3 267 | |
#define T_Ivec4 268 | 154 | 201 | #define T_Ivec4 268 | |
#define T_Uvec2 269 | 155 | 202 | #define T_Uvec2 269 | |
#define T_Uvec3 270 | 156 | 203 | #define T_Uvec3 270 | |
#define T_Uvec4 271 | 157 | 204 | #define T_Uvec4 271 | |
#define T_Vec2 272 | 158 | 205 | #define T_Vec2 272 | |
#define T_Vec3 273 | 159 | 206 | #define T_Vec3 273 | |
#define T_Vec4 274 | 160 | 207 | #define T_Vec4 274 | |
#define T_Mat2 275 | 161 | 208 | #define T_Mat2 275 | |
#define T_Mat3 276 | 162 | 209 | #define T_Mat3 276 | |
#define T_Mat4 277 | 163 | 210 | #define T_Mat4 277 | |
#define T_While 278 | 164 | 211 | #define T_While 278 | |
#define T_For 279 | 165 | 212 | #define T_For 279 | |
#define T_If 280 | 166 | 213 | #define T_If 280 | |
#define T_Else 281 | 167 | 214 | #define T_Else 281 | |
#define T_Return 282 | 168 | 215 | #define T_Return 282 | |
#define T_Break 283 | 169 | 216 | #define T_Break 283 | |
#define T_Continue 284 | 170 | 217 | #define T_Continue 284 | |
#define T_Do 285 | 171 | 218 | #define T_Do 285 | |
#define T_Switch 286 | 172 | 219 | #define T_Switch 286 | |
#define T_Case 287 | 173 | 220 | #define T_Case 287 | |
#define T_Default 288 | 174 | 221 | #define T_Default 288 | |
#define T_In 289 | 175 | 222 | #define T_In 289 | |
#define T_Out 290 | 176 | 223 | #define T_Out 290 | |
#define T_Const 291 | 177 | 224 | #define T_Const 291 | |
#define T_Uniform 292 | 178 | 225 | #define T_Uniform 292 | |
#define T_LeftParen 293 | 179 | 226 | #define T_LeftParen 293 | |
#define T_RightParen 294 | 180 | 227 | #define T_RightParen 294 | |
#define T_LeftBracket 295 | 181 | 228 | #define T_LeftBracket 295 | |
#define T_RightBracket 296 | 182 | 229 | #define T_RightBracket 296 | |
#define T_LeftBrace 297 | 183 | 230 | #define T_LeftBrace 297 | |
#define T_RightBrace 298 | 184 | 231 | #define T_RightBrace 298 | |
#define T_Dot 299 | 185 | 232 | #define T_Dot 299 | |
#define T_Comma 300 | 186 | 233 | #define T_Comma 300 | |
#define T_Colon 301 | 187 | 234 | #define T_Colon 301 | |
#define T_Semicolon 302 | 188 | 235 | #define T_Semicolon 302 | |
#define T_Question 303 | 189 | 236 | #define T_Question 303 | |
#define T_LessEqual 304 | 190 | 237 | #define T_LessEqual 304 | |
#define T_GreaterEqual 305 | 191 | 238 | #define T_GreaterEqual 305 | |
#define T_EQ 306 | 192 | 239 | #define T_EQ 306 | |
#define T_NE 307 | 193 | 240 | #define T_NE 307 | |
#define T_And 308 | 194 | 241 | #define T_And 308 | |
#define T_Or 309 | 195 | 242 | #define T_Or 309 | |
#define T_Plus 310 | 196 | 243 | #define T_Plus 310 | |
#define T_Star 311 | 197 | 244 | #define T_Star 311 | |
#define T_MulAssign 312 | 198 | 245 | #define T_MulAssign 312 | |
#define T_DivAssign 313 | 199 | 246 | #define T_DivAssign 313 | |
#define T_AddAssign 314 | 200 | 247 | #define T_AddAssign 314 | |
#define T_SubAssign 315 | 201 | 248 | #define T_SubAssign 315 | |
#define T_Equal 316 | 202 | 249 | #define T_Equal 316 | |
#define T_LeftAngle 317 | 203 | 250 | #define T_LeftAngle 317 | |
#define T_RightAngle 318 | 204 | 251 | #define T_RightAngle 318 | |
#define T_Dash 319 | 205 | 252 | #define T_Dash 319 | |
#define T_Slash 320 | 206 | 253 | #define T_Slash 320 | |
#define T_Inc 321 | 207 | 254 | #define T_Inc 321 | |
#define T_Dec 322 | 208 | 255 | #define T_Dec 322 | |
#define T_Identifier 323 | 209 | 256 | #define T_Identifier 323 | |
#define T_IntConstant 324 | 210 | 257 | #define T_IntConstant 324 | |
#define T_FloatConstant 325 | 211 | 258 | #define T_FloatConstant 325 | |
#define T_BoolConstant 326 | 212 | 259 | #define T_BoolConstant 326 | |
#define T_FieldSelection 327 | 213 | 260 | #define T_FieldSelection 327 | |
#define LOWEST 328 | 214 | 261 | #define LOWEST 328 | |
#define LOWER_THAN_ELSE 329 | 215 | 262 | #define LOWER_THAN_ELSE 329 | |
216 | 263 | |||
217 | 264 | |||
218 | 265 | |||
219 | 266 | |||
/* Copy the first part of user declarations. */ | 220 | |||
#line 11 "parser.y" | 221 | |||
222 | ||||
223 | ||||
/* Just like lex, the text within this first region delimited by %{ and %} | 224 | |||
* is assumed to be C/C++ code and will be copied verbatim to the y.tab.c | 225 | |||
* file ahead of the definitions of the yyparse() function. Add other header | 226 | |||
* file inclusions or C++ variable declarations/prototypes that are needed | 227 | |||
* by your code here. | 228 | |||
*/ | 229 | |||
#include "scanner.h" // for yylex | 230 | |||
#include "parser.h" | 231 | |||
#include "errors.h" | 232 | |||
233 | ||||
void yyerror(const char *msg); // standard error-handling routine | 234 | |||
235 | ||||
236 | ||||
237 | ||||
/* Enabling traces. */ | 238 | |||
#ifndef YYDEBUG | 239 | |||
# define YYDEBUG 1 | 240 | |||
#endif | 241 | |||
242 | ||||
/* Enabling verbose error messages. */ | 243 | |||
#ifdef YYERROR_VERBOSE | 244 | |||
# undef YYERROR_VERBOSE | 245 | |||
# define YYERROR_VERBOSE 1 | 246 | |||
#else | 247 | |||
# define YYERROR_VERBOSE 0 | 248 | |||
#endif | 249 | |||
250 | ||||
/* Enabling the token table. */ | 251 | |||
#ifndef YYTOKEN_TABLE | 252 | |||
# define YYTOKEN_TABLE 0 | 253 | |||
#endif | 254 | |||
255 | ||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED | 256 | 267 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED | |
typedef union YYSTYPE | 257 | 268 | typedef union YYSTYPE | |
#line 41 "parser.y" | 258 | |||
{ | 259 | 269 | { | |
270 | ||||
271 | /* Line 214 of yacc.c */ | |||
272 | #line 41 "parser.y" | |||
273 | ||||
int integerConstant; | 260 | 274 | int integerConstant; | |
bool boolConstant; | 261 | 275 | bool boolConstant; | |
double floatConstant; | 262 | 276 | double floatConstant; | |
char identifier[MaxIdentLen+1]; // +1 for terminating null | 263 | 277 | char identifier[MaxIdentLen+1]; // +1 for terminating null | |
Decl *decl; | 264 | 278 | Decl *decl; | |
FnDecl *funcDecl; | 265 | 279 | FnDecl *funcDecl; | |
List<Decl*> *declList; | 266 | 280 | List<Decl*> *declList; | |
Type *typeDecl; | 267 | 281 | Type *typeDecl; | |
TypeQualifier *typeQualifier; | 268 | 282 | TypeQualifier *typeQualifier; | |
Expr *expression; | 269 | 283 | Expr *expression; | |
VarDecl *varDecl; | 270 | 284 | VarDecl *varDecl; | |
List<VarDecl *> *varDeclList; | 271 | 285 | List<VarDecl *> *varDeclList; | |
List<Stmt*> *stmtList; | 272 | 286 | List<Stmt*> *stmtList; | |
Stmt *stmt; | 273 | 287 | Stmt *stmt; | |
Operator *ops; | 274 | 288 | Operator *ops; | |
Identifier *funcId; | 275 | 289 | Identifier *funcId; | |
List<Expr*> *argList; | 276 | 290 | List<Expr*> *argList; | |
} | 277 | 291 | ||
/* Line 193 of yacc.c. */ | 278 | 292 | ||
#line 280 "y.tab.c" | 279 | 293 | ||
YYSTYPE; | 280 | 294 | /* Line 214 of yacc.c */ | |
295 | #line 296 "y.tab.c" | |||
296 | } YYSTYPE; | |||
297 | # define YYSTYPE_IS_TRIVIAL 1 | |||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ | 281 | 298 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ | |
# define YYSTYPE_IS_DECLARED 1 | 282 | 299 | # define YYSTYPE_IS_DECLARED 1 | |
# define YYSTYPE_IS_TRIVIAL 1 | 283 | |||
#endif | 284 | 300 | #endif | |
285 | 301 | |||
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED | 286 | 302 | #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED | |
typedef struct YYLTYPE | 287 | 303 | typedef struct YYLTYPE | |
{ | 288 | 304 | { | |
int first_line; | 289 | 305 | int first_line; | |
int first_column; | 290 | 306 | int first_column; | |
int last_line; | 291 | 307 | int last_line; | |
int last_column; | 292 | 308 | int last_column; | |
} YYLTYPE; | 293 | 309 | } YYLTYPE; | |
# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ | 294 | 310 | # define yyltype YYLTYPE /* obsolescent; will be withdrawn */ | |
# define YYLTYPE_IS_DECLARED 1 | 295 | 311 | # define YYLTYPE_IS_DECLARED 1 | |
# define YYLTYPE_IS_TRIVIAL 1 | 296 | 312 | # define YYLTYPE_IS_TRIVIAL 1 | |
#endif | 297 | 313 | #endif | |
298 | 314 | |||
299 | 315 | |||
/* Copy the second part of user declarations. */ | 300 | 316 | /* Copy the second part of user declarations. */ | |
301 | 317 | |||
302 | 318 | |||
/* Line 216 of yacc.c. */ | 303 | 319 | /* Line 264 of yacc.c */ | |
#line 305 "y.tab.c" | 304 | 320 | #line 321 "y.tab.c" | |
305 | 321 | |||
#ifdef short | 306 | 322 | #ifdef short | |
# undef short | 307 | 323 | # undef short | |
#endif | 308 | 324 | #endif | |
309 | 325 | |||
#ifdef YYTYPE_UINT8 | 310 | 326 | #ifdef YYTYPE_UINT8 | |
typedef YYTYPE_UINT8 yytype_uint8; | 311 | 327 | typedef YYTYPE_UINT8 yytype_uint8; | |
#else | 312 | 328 | #else | |
typedef unsigned char yytype_uint8; | 313 | 329 | typedef unsigned char yytype_uint8; | |
#endif | 314 | 330 | #endif | |
315 | 331 | |||
#ifdef YYTYPE_INT8 | 316 | 332 | #ifdef YYTYPE_INT8 | |
typedef YYTYPE_INT8 yytype_int8; | 317 | 333 | typedef YYTYPE_INT8 yytype_int8; | |
#elif (defined __STDC__ || defined __C99__FUNC__ \ | 318 | 334 | #elif (defined __STDC__ || defined __C99__FUNC__ \ | |
|| defined __cplusplus || defined _MSC_VER) | 319 | 335 | || defined __cplusplus || defined _MSC_VER) | |
typedef signed char yytype_int8; | 320 | 336 | typedef signed char yytype_int8; | |
#else | 321 | 337 | #else | |
typedef short int yytype_int8; | 322 | 338 | typedef short int yytype_int8; | |
#endif | 323 | 339 | #endif | |
324 | 340 | |||
#ifdef YYTYPE_UINT16 | 325 | 341 | #ifdef YYTYPE_UINT16 | |
typedef YYTYPE_UINT16 yytype_uint16; | 326 | 342 | typedef YYTYPE_UINT16 yytype_uint16; | |
#else | 327 | 343 | #else | |
typedef unsigned short int yytype_uint16; | 328 | 344 | typedef unsigned short int yytype_uint16; | |
#endif | 329 | 345 | #endif | |
330 | 346 | |||
#ifdef YYTYPE_INT16 | 331 | 347 | #ifdef YYTYPE_INT16 | |
typedef YYTYPE_INT16 yytype_int16; | 332 | 348 | typedef YYTYPE_INT16 yytype_int16; | |
#else | 333 | 349 | #else | |
typedef short int yytype_int16; | 334 | 350 | typedef short int yytype_int16; | |
#endif | 335 | 351 | #endif | |
336 | 352 | |||
#ifndef YYSIZE_T | 337 | 353 | #ifndef YYSIZE_T | |
# ifdef __SIZE_TYPE__ | 338 | 354 | # ifdef __SIZE_TYPE__ | |
# define YYSIZE_T __SIZE_TYPE__ | 339 | 355 | # define YYSIZE_T __SIZE_TYPE__ | |
# elif defined size_t | 340 | 356 | # elif defined size_t | |
# define YYSIZE_T size_t | 341 | 357 | # define YYSIZE_T size_t | |
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ | 342 | 358 | # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ | |
|| defined __cplusplus || defined _MSC_VER) | 343 | 359 | || defined __cplusplus || defined _MSC_VER) | |
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ | 344 | 360 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ | |
# define YYSIZE_T size_t | 345 | 361 | # define YYSIZE_T size_t | |
# else | 346 | 362 | # else | |
# define YYSIZE_T unsigned int | 347 | 363 | # define YYSIZE_T unsigned int | |
# endif | 348 | 364 | # endif | |
#endif | 349 | 365 | #endif | |
350 | 366 | |||
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) | 351 | 367 | #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) | |
352 | 368 | |||
#ifndef YY_ | 353 | 369 | #ifndef YY_ | |
# if defined YYENABLE_NLS && YYENABLE_NLS | 354 | 370 | # if YYENABLE_NLS | |
# if ENABLE_NLS | 355 | 371 | # if ENABLE_NLS | |
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ | 356 | 372 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ | |
# define YY_(msgid) dgettext ("bison-runtime", msgid) | 357 | 373 | # define YY_(msgid) dgettext ("bison-runtime", msgid) | |
# endif | 358 | 374 | # endif | |
# endif | 359 | 375 | # endif | |
# ifndef YY_ | 360 | 376 | # ifndef YY_ | |
# define YY_(msgid) msgid | 361 | 377 | # define YY_(msgid) msgid | |
# endif | 362 | 378 | # endif | |
#endif | 363 | 379 | #endif | |
364 | 380 | |||
/* Suppress unused-variable warnings by "using" E. */ | 365 | 381 | /* Suppress unused-variable warnings by "using" E. */ | |
#if ! defined lint || defined __GNUC__ | 366 | 382 | #if ! defined lint || defined __GNUC__ | |
# define YYUSE(e) ((void) (e)) | 367 | 383 | # define YYUSE(e) ((void) (e)) | |
#else | 368 | 384 | #else | |
# define YYUSE(e) /* empty */ | 369 | 385 | # define YYUSE(e) /* empty */ | |
#endif | 370 | 386 | #endif | |
371 | 387 | |||
/* Identity function, used to suppress warnings about constant conditions. */ | 372 | 388 | /* Identity function, used to suppress warnings about constant conditions. */ | |
#ifndef lint | 373 | 389 | #ifndef lint | |
# define YYID(n) (n) | 374 | 390 | # define YYID(n) (n) | |
#else | 375 | 391 | #else | |
#if (defined __STDC__ || defined __C99__FUNC__ \ | 376 | 392 | #if (defined __STDC__ || defined __C99__FUNC__ \ | |
|| defined __cplusplus || defined _MSC_VER) | 377 | 393 | || defined __cplusplus || defined _MSC_VER) | |
static int | 378 | 394 | static int | |
YYID (int i) | 379 | 395 | YYID (int yyi) | |
#else | 380 | 396 | #else | |
static int | 381 | 397 | static int | |
YYID (i) | 382 | 398 | YYID (yyi) | |
int i; | 383 | 399 | int yyi; | |
#endif | 384 | 400 | #endif | |
{ | 385 | 401 | { | |
return i; | 386 | 402 | return yyi; | |
} | 387 | 403 | } | |
#endif | 388 | 404 | #endif | |
389 | 405 | |||
#if ! defined yyoverflow || YYERROR_VERBOSE | 390 | 406 | #if ! defined yyoverflow || YYERROR_VERBOSE | |
391 | 407 | |||
/* The parser invokes alloca or malloc; define the necessary symbols. */ | 392 | 408 | /* The parser invokes alloca or malloc; define the necessary symbols. */ | |
393 | 409 | |||
# ifdef YYSTACK_USE_ALLOCA | 394 | 410 | # ifdef YYSTACK_USE_ALLOCA | |
# if YYSTACK_USE_ALLOCA | 395 | 411 | # if YYSTACK_USE_ALLOCA | |
# ifdef __GNUC__ | 396 | 412 | # ifdef __GNUC__ | |
# define YYSTACK_ALLOC __builtin_alloca | 397 | 413 | # define YYSTACK_ALLOC __builtin_alloca | |
# elif defined __BUILTIN_VA_ARG_INCR | 398 | 414 | # elif defined __BUILTIN_VA_ARG_INCR | |
# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ | 399 | 415 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ | |
# elif defined _AIX | 400 | 416 | # elif defined _AIX | |
# define YYSTACK_ALLOC __alloca | 401 | 417 | # define YYSTACK_ALLOC __alloca | |
# elif defined _MSC_VER | 402 | 418 | # elif defined _MSC_VER | |
# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ | 403 | 419 | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ | |
# define alloca _alloca | 404 | 420 | # define alloca _alloca | |
# else | 405 | 421 | # else | |
# define YYSTACK_ALLOC alloca | 406 | 422 | # define YYSTACK_ALLOC alloca | |
# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ | 407 | 423 | # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ | |
|| defined __cplusplus || defined _MSC_VER) | 408 | 424 | || defined __cplusplus || defined _MSC_VER) | |
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ | 409 | 425 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ | |
# ifndef _STDLIB_H | 410 | 426 | # ifndef _STDLIB_H | |
# define _STDLIB_H 1 | 411 | 427 | # define _STDLIB_H 1 | |
# endif | 412 | 428 | # endif | |
# endif | 413 | 429 | # endif | |
# endif | 414 | 430 | # endif | |
# endif | 415 | 431 | # endif | |
# endif | 416 | 432 | # endif | |
417 | 433 | |||
# ifdef YYSTACK_ALLOC | 418 | 434 | # ifdef YYSTACK_ALLOC | |
/* Pacify GCC's `empty if-body' warning. */ | 419 | 435 | /* Pacify GCC's `empty if-body' warning. */ | |
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) | 420 | 436 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) | |
# ifndef YYSTACK_ALLOC_MAXIMUM | 421 | 437 | # ifndef YYSTACK_ALLOC_MAXIMUM | |
/* The OS might guarantee only one guard page at the bottom of the stack, | 422 | 438 | /* The OS might guarantee only one guard page at the bottom of the stack, | |
and a page size can be as small as 4096 bytes. So we cannot safely | 423 | 439 | and a page size can be as small as 4096 bytes. So we cannot safely | |
invoke alloca (N) if N exceeds 4096. Use a slightly smaller number | 424 | 440 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number | |
to allow for a few compiler-allocated temporary stack slots. */ | 425 | 441 | to allow for a few compiler-allocated temporary stack slots. */ | |
# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ | 426 | 442 | # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ | |
# endif | 427 | 443 | # endif | |
# else | 428 | 444 | # else | |
# define YYSTACK_ALLOC YYMALLOC | 429 | 445 | # define YYSTACK_ALLOC YYMALLOC | |
# define YYSTACK_FREE YYFREE | 430 | 446 | # define YYSTACK_FREE YYFREE | |
# ifndef YYSTACK_ALLOC_MAXIMUM | 431 | 447 | # ifndef YYSTACK_ALLOC_MAXIMUM | |
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM | 432 | 448 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM | |
# endif | 433 | 449 | # endif | |
# if (defined __cplusplus && ! defined _STDLIB_H \ | 434 | 450 | # if (defined __cplusplus && ! defined _STDLIB_H \ | |
&& ! ((defined YYMALLOC || defined malloc) \ | 435 | 451 | && ! ((defined YYMALLOC || defined malloc) \ | |
&& (defined YYFREE || defined free))) | 436 | 452 | && (defined YYFREE || defined free))) | |
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ | 437 | 453 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ | |
# ifndef _STDLIB_H | 438 | 454 | # ifndef _STDLIB_H | |
# define _STDLIB_H 1 | 439 | 455 | # define _STDLIB_H 1 | |
# endif | 440 | 456 | # endif | |
# endif | 441 | 457 | # endif | |
# ifndef YYMALLOC | 442 | 458 | # ifndef YYMALLOC | |
# define YYMALLOC malloc | 443 | 459 | # define YYMALLOC malloc | |
# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ | 444 | 460 | # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ | |
|| defined __cplusplus || defined _MSC_VER) | 445 | 461 | || defined __cplusplus || defined _MSC_VER) | |
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ | 446 | 462 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ | |
# endif | 447 | 463 | # endif | |
# endif | 448 | 464 | # endif | |
# ifndef YYFREE | 449 | 465 | # ifndef YYFREE | |
# define YYFREE free | 450 | 466 | # define YYFREE free | |
# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ | 451 | 467 | # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ | |
|| defined __cplusplus || defined _MSC_VER) | 452 | 468 | || defined __cplusplus || defined _MSC_VER) | |
void free (void *); /* INFRINGES ON USER NAME SPACE */ | 453 | 469 | void free (void *); /* INFRINGES ON USER NAME SPACE */ | |
# endif | 454 | 470 | # endif | |
# endif | 455 | 471 | # endif | |
# endif | 456 | 472 | # endif | |
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ | 457 | 473 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ | |
458 | 474 | |||
459 | 475 | |||
#if (! defined yyoverflow \ | 460 | 476 | #if (! defined yyoverflow \ | |
&& (! defined __cplusplus \ | 461 | 477 | && (! defined __cplusplus \ | |
|| (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ | 462 | 478 | || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ | |
&& defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) | 463 | 479 | && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) | |
464 | 480 | |||
/* A type that is properly aligned for any stack member. */ | 465 | 481 | /* A type that is properly aligned for any stack member. */ | |
union yyalloc | 466 | 482 | union yyalloc | |
{ | 467 | 483 | { | |
yytype_int16 yyss; | 468 | 484 | yytype_int16 yyss_alloc; | |
YYSTYPE yyvs; | 469 | 485 | YYSTYPE yyvs_alloc; | |
YYLTYPE yyls; | 470 | 486 | YYLTYPE yyls_alloc; | |
}; | 471 | 487 | }; | |
472 | 488 | |||
/* The size of the maximum gap between one aligned stack and the next. */ | 473 | 489 | /* The size of the maximum gap between one aligned stack and the next. */ | |
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) | 474 | 490 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) | |
475 | 491 | |||
/* The size of an array large to enough to hold all stacks, each with | 476 | 492 | /* The size of an array large to enough to hold all stacks, each with | |
N elements. */ | 477 | 493 | N elements. */ | |
# define YYSTACK_BYTES(N) \ | 478 | 494 | # define YYSTACK_BYTES(N) \ | |
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ | 479 | 495 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ | |
+ 2 * YYSTACK_GAP_MAXIMUM) | 480 | 496 | + 2 * YYSTACK_GAP_MAXIMUM) | |
481 | 497 | |||
/* Copy COUNT objects from FROM to TO. The source and destination do | 482 | 498 | /* Copy COUNT objects from FROM to TO. The source and destination do | |
not overlap. */ | 483 | 499 | not overlap. */ | |
# ifndef YYCOPY | 484 | 500 | # ifndef YYCOPY | |
# if defined __GNUC__ && 1 < __GNUC__ | 485 | 501 | # if defined __GNUC__ && 1 < __GNUC__ | |
# define YYCOPY(To, From, Count) \ | 486 | 502 | # define YYCOPY(To, From, Count) \ | |
__builtin_memcpy (To, From, (Count) * sizeof (*(From))) | 487 | 503 | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) | |
# else | 488 | 504 | # else | |
# define YYCOPY(To, From, Count) \ | 489 | 505 | # define YYCOPY(To, From, Count) \ | |
do \ | 490 | 506 | do \ | |
{ \ | 491 | 507 | { \ | |
YYSIZE_T yyi; \ | 492 | 508 | YYSIZE_T yyi; \ | |
for (yyi = 0; yyi < (Count); yyi++) \ | 493 | 509 | for (yyi = 0; yyi < (Count); yyi++) \ | |
(To)[yyi] = (From)[yyi]; \ | 494 | 510 | (To)[yyi] = (From)[yyi]; \ | |
} \ | 495 | 511 | } \ | |
while (YYID (0)) | 496 | 512 | while (YYID (0)) | |
# endif | 497 | 513 | # endif | |
# endif | 498 | 514 | # endif | |
499 | 515 | |||
/* Relocate STACK from its old location to the new one. The | 500 | 516 | /* Relocate STACK from its old location to the new one. The | |
local variables YYSIZE and YYSTACKSIZE give the old and new number of | 501 | 517 | local variables YYSIZE and YYSTACKSIZE give the old and new number of | |
elements in the stack, and YYPTR gives the new location of the | 502 | 518 | elements in the stack, and YYPTR gives the new location of the | |
stack. Advance YYPTR to a properly aligned location for the next | 503 | 519 | stack. Advance YYPTR to a properly aligned location for the next | |
stack. */ | 504 | 520 | stack. */ | |
# define YYSTACK_RELOCATE(Stack) \ | 505 | 521 | # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ | |
do \ | 506 | 522 | do \ | |
{ \ | 507 | 523 | { \ | |
YYSIZE_T yynewbytes; \ | 508 | 524 | YYSIZE_T yynewbytes; \ | |
YYCOPY (&yyptr->Stack, Stack, yysize); \ | 509 | 525 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ | |
Stack = &yyptr->Stack; \ | 510 | 526 | Stack = &yyptr->Stack_alloc; \ | |
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ | 511 | 527 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ | |
yyptr += yynewbytes / sizeof (*yyptr); \ | 512 | 528 | yyptr += yynewbytes / sizeof (*yyptr); \ | |
} \ | 513 | 529 | } \ | |
while (YYID (0)) | 514 | 530 | while (YYID (0)) | |
515 | 531 | |||
#endif | 516 | 532 | #endif | |
517 | 533 | |||
/* YYFINAL -- State number of the termination state. */ | 518 | 534 | /* YYFINAL -- State number of the termination state. */ | |
#define YYFINAL 23 | 519 | 535 | #define YYFINAL 23 | |
/* YYLAST -- Last index in YYTABLE. */ | 520 | 536 | /* YYLAST -- Last index in YYTABLE. */ | |
#define YYLAST 386 | 521 | 537 | #define YYLAST 386 | |
522 | 538 | |||
/* YYNTOKENS -- Number of terminals. */ | 523 | 539 | /* YYNTOKENS -- Number of terminals. */ | |
#define YYNTOKENS 75 | 524 | 540 | #define YYNTOKENS 75 | |
/* YYNNTS -- Number of nonterminals. */ | 525 | 541 | /* YYNNTS -- Number of nonterminals. */ | |
#define YYNNTS 37 | 526 | 542 | #define YYNNTS 37 | |
/* YYNRULES -- Number of rules. */ | 527 | 543 | /* YYNRULES -- Number of rules. */ | |
#define YYNRULES 109 | 528 | 544 | #define YYNRULES 109 | |
/* YYNRULES -- Number of states. */ | 529 | 545 | /* YYNRULES -- Number of states. */ | |
#define YYNSTATES 192 | 530 | 546 | #define YYNSTATES 192 | |
531 | 547 | |||
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ | 532 | 548 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ | |
#define YYUNDEFTOK 2 | 533 | 549 | #define YYUNDEFTOK 2 | |
#define YYMAXUTOK 329 | 534 | 550 | #define YYMAXUTOK 329 | |
535 | 551 | |||
#define YYTRANSLATE(YYX) \ | 536 | 552 | #define YYTRANSLATE(YYX) \ | |
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) | 537 | 553 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) | |
538 | 554 | |||
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ | 539 | 555 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ | |
static const yytype_uint8 yytranslate[] = | 540 | 556 | static const yytype_uint8 yytranslate[] = | |
{ | 541 | 557 | { | |
0, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 542 | 558 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 543 | 559 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 544 | 560 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 545 | 561 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 546 | 562 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 547 | 563 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 548 | 564 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 549 | 565 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 550 | 566 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 551 | 567 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 552 | 568 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 553 | 569 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 554 | 570 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 555 | 571 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 556 | 572 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 557 | 573 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 558 | 574 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 559 | 575 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 560 | 576 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 561 | 577 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 562 | 578 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 563 | 579 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 564 | 580 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 565 | 581 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 566 | 582 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | |
2, 2, 2, 2, 2, 2, 1, 2, 3, 4, | 567 | 583 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, | |
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, | 568 | 584 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, | |
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, | 569 | 585 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, | |
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, | 570 | 586 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, | |
35, 36, 37, 38, 39, 40, 41, 42, 43, 44, | 571 | 587 | 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, | |
45, 46, 47, 48, 49, 50, 51, 52, 53, 54, | 572 | 588 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, | |
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, | 573 | 589 | 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, | |
65, 66, 67, 68, 69, 70, 71, 72, 73, 74 | 574 | 590 | 65, 66, 67, 68, 69, 70, 71, 72, 73, 74 | |
}; | 575 | 591 | }; | |
576 | 592 | |||
#if YYDEBUG | 577 | 593 | #if YYDEBUG | |
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in | 578 | 594 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in | |
YYRHS. */ | 579 | 595 | YYRHS. */ | |
static const yytype_uint16 yyprhs[] = | 580 | 596 | static const yytype_uint16 yyprhs[] = | |
{ | 581 | 597 | { | |
0, 0, 3, 5, 8, 10, 12, 15, 18, 21, | 582 | 598 | 0, 0, 3, 5, 8, 10, 12, 15, 18, 21, | |
26, 32, 34, 38, 41, 45, 50, 56, 62, 69, | 583 | 599 | 26, 32, 34, 38, 41, 45, 50, 56, 62, 69, | |
71, 73, 75, 77, 79, 81, 83, 85, 87, 89, | 584 | 600 | 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, | |
91, 93, 95, 97, 99, 102, 106, 108, 111, 113, | 585 | 601 | 91, 93, 95, 97, 99, 102, 106, 108, 111, 113, | |
115, 117, 120, 123, 125, 127, 129, 131, 133, 135, | 586 | 602 | 115, 117, 120, 123, 125, 127, 129, 131, 133, 135, | |
143, 149, 157, 162, 166, 169, 172, 175, 179, 185, | 587 | 603 | 143, 149, 157, 162, 166, 169, 172, 175, 179, 185, | |
195, 197, 199, 201, 203, 207, 210, 213, 217, 220, | 588 | 604 | 195, 197, 199, 201, 203, 207, 210, 213, 217, 220, | |
224, 226, 230, 232, 234, 239, 241, 244, 247, 251, | 589 | 605 | 224, 226, 230, 232, 234, 239, 241, 244, 247, 251, | |
253, 256, 259, 262, 265, 267, 271, 275, 277, 281, | 590 | 606 | 253, 256, 259, 262, 265, 267, 271, 275, 277, 281, | |
285, 287, 291, 295, 299, 303, 305, 309, 313, 315, | 591 | 607 | 285, 287, 291, 295, 299, 303, 305, 309, 313, 315, | |
319, 321, 325, 327, 333, 337, 339, 341, 343, 345 | 592 | 608 | 319, 321, 325, 327, 333, 337, 339, 341, 343, 345 | |
}; | 593 | 609 | }; | |
594 | 610 | |||
/* YYRHS -- A `-1'-separated list of the rules' RHS. */ | 595 | 611 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ | |
static const yytype_int8 yyrhs[] = | 596 | 612 | static const yytype_int8 yyrhs[] = | |
{ | 597 | 613 | { | |
76, 0, -1, 77, -1, 77, 78, -1, 78, -1, | 598 | 614 | 76, 0, -1, 77, -1, 77, 78, -1, 78, -1, | |
79, -1, 80, 86, -1, 80, 47, -1, 82, 47, | 599 | 615 | 79, -1, 80, 86, -1, 80, 47, -1, 82, 47, | |
-1, 85, 68, 38, 39, -1, 85, 68, 38, 81, | 600 | 616 | -1, 85, 68, 38, 39, -1, 85, 68, 38, 81, | |
39, -1, 82, -1, 81, 45, 82, -1, 85, 68, | 601 | 617 | 39, -1, 82, -1, 81, 45, 82, -1, 85, 68, | |
-1, 84, 85, 68, -1, 85, 68, 61, 83, -1, | 602 | 618 | -1, 84, 85, 68, -1, 85, 68, 61, 83, -1, | |
84, 85, 68, 61, 83, -1, 85, 68, 40, 69, | 603 | 619 | 84, 85, 68, 61, 83, -1, 85, 68, 40, 69, | |
41, -1, 84, 85, 68, 40, 69, 41, -1, 110, | 604 | 620 | 41, -1, 84, 85, 68, 40, 69, 41, -1, 110, | |
-1, 34, -1, 35, -1, 36, -1, 37, -1, 5, | 605 | 621 | -1, 34, -1, 35, -1, 36, -1, 37, -1, 5, | |
-1, 3, -1, 6, -1, 4, -1, 17, -1, 18, | 606 | 622 | -1, 3, -1, 6, -1, 4, -1, 17, -1, 18, | |
-1, 19, -1, 20, -1, 21, -1, 22, -1, 42, | 607 | 623 | -1, 19, -1, 20, -1, 21, -1, 22, -1, 42, | |
43, -1, 42, 87, 43, -1, 88, -1, 87, 88, | 608 | 624 | 43, -1, 42, 87, 43, -1, 88, -1, 87, 88, | |
-1, 86, -1, 89, -1, 47, -1, 82, 47, -1, | 609 | 625 | -1, 86, -1, 89, -1, 47, -1, 82, 47, -1, | |
110, 47, -1, 90, -1, 91, -1, 92, -1, 93, | 610 | 626 | 110, 47, -1, 90, -1, 91, -1, 92, -1, 93, | |
-1, 94, -1, 95, -1, 25, 38, 110, 39, 88, | 611 | 627 | -1, 94, -1, 95, -1, 25, 38, 110, 39, 88, | |
26, 88, -1, 25, 38, 110, 39, 88, -1, 31, | 612 | 628 | 26, 88, -1, 25, 38, 110, 39, 88, -1, 31, | |
38, 110, 39, 42, 87, 43, -1, 32, 110, 46, | 613 | 629 | 38, 110, 39, 42, 87, 43, -1, 32, 110, 46, | |
88, -1, 33, 46, 88, -1, 28, 47, -1, 29, | 614 | 630 | 88, -1, 33, 46, 88, -1, 28, 47, -1, 29, | |
47, -1, 27, 47, -1, 27, 110, 47, -1, 23, | 615 | 631 | 47, -1, 27, 47, -1, 27, 110, 47, -1, 23, | |
38, 110, 39, 88, -1, 24, 38, 110, 47, 110, | 616 | 632 | 38, 110, 39, 88, -1, 24, 38, 110, 47, 110, | |
47, 110, 39, 88, -1, 68, -1, 69, -1, 70, | 617 | 633 | 47, 110, 39, 88, -1, 68, -1, 69, -1, 70, | |
-1, 71, -1, 38, 110, 39, -1, 99, 39, -1, | 618 | 634 | -1, 71, -1, 38, 110, 39, -1, 99, 39, -1, | |
98, 39, -1, 101, 38, 3, -1, 101, 38, -1, | 619 | 635 | 98, 39, -1, 101, 38, 3, -1, 101, 38, -1, | |
101, 38, 100, -1, 110, -1, 100, 45, 110, -1, | 620 | 636 | 101, 38, 100, -1, 110, -1, 100, 45, 110, -1, | |
68, -1, 96, -1, 102, 40, 110, 41, -1, 97, | 621 | 637 | 68, -1, 96, -1, 102, 40, 110, 41, -1, 97, | |
-1, 102, 66, -1, 102, 67, -1, 102, 44, 72, | 622 | 638 | -1, 102, 66, -1, 102, 67, -1, 102, 44, 72, | |
-1, 102, -1, 66, 103, -1, 67, 103, -1, 55, | 623 | 639 | -1, 102, -1, 66, 103, -1, 67, 103, -1, 55, | |
103, -1, 64, 103, -1, 103, -1, 104, 56, 103, | 624 | 640 | 103, -1, 64, 103, -1, 103, -1, 104, 56, 103, | |
-1, 104, 65, 103, -1, 104, -1, 105, 55, 104, | 625 | 641 | -1, 104, 65, 103, -1, 104, -1, 105, 55, 104, | |
-1, 105, 64, 104, -1, 105, -1, 106, 62, 105, | 626 | 642 | -1, 105, 64, 104, -1, 105, -1, 106, 62, 105, | |
-1, 106, 63, 105, -1, 106, 50, 105, -1, 106, | 627 | 643 | -1, 106, 63, 105, -1, 106, 50, 105, -1, 106, | |
49, 105, -1, 106, -1, 107, 51, 106, -1, 107, | 628 | 644 | 49, 105, -1, 106, -1, 107, 51, 106, -1, 107, | |
52, 106, -1, 107, -1, 108, 53, 107, -1, 108, | 629 | 645 | 52, 106, -1, 107, -1, 108, 53, 107, -1, 108, | |
-1, 109, 54, 108, -1, 109, -1, 109, 48, 109, | 630 | 646 | -1, 109, 54, 108, -1, 109, -1, 109, 48, 109, | |
46, 109, -1, 103, 111, 110, -1, 61, -1, 59, | 631 | 647 | 46, 109, -1, 103, 111, 110, -1, 61, -1, 59, | |
-1, 60, -1, 57, -1, 58, -1 | 632 | 648 | -1, 60, -1, 57, -1, 58, -1 | |
}; | 633 | 649 | }; | |
634 | 650 | |||
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ | 635 | 651 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ | |
static const yytype_uint16 yyrline[] = | 636 | 652 | static const yytype_uint16 yyrline[] = | |
{ | 637 | 653 | { | |
0, 135, 135, 151, 152, 163, 164, 175, 176, 179, | 638 | 654 | 0, 135, 135, 151, 152, 163, 164, 175, 176, 179, | |
185, 192, 193, 196, 201, 206, 212, 217, 222, 230, | 639 | 655 | 185, 192, 193, 196, 201, 206, 212, 217, 222, 230, | |
233, 234, 235, 236, 239, 240, 241, 242, 243, 244, | 640 | 656 | 233, 234, 235, 236, 239, 240, 241, 242, 243, 244, | |
245, 246, 247, 248, 251, 252, 255, 256, 259, 260, | 641 | 657 | 245, 246, 247, 248, 251, 252, 255, 256, 259, 260, | |
263, 264, 268, 269, 270, 271, 272, 273, 274, 277, | 642 | 658 | 263, 264, 268, 269, 270, 271, 272, 273, 274, 277, | |
281, 287, 292, 293, 296, 297, 298, 299, 302, 305, | 643 | 659 | 281, 287, 292, 293, 296, 297, 298, 299, 302, 305, | |
311, 314, 315, 316, 317, 320, 321, 324, 325, 328, | 644 | 660 | 311, 314, 315, 316, 317, 320, 321, 324, 325, 328, | |
331, 332, 335, 338, 339, 340, 343, 348, 353, 360, | 645 | 661 | 331, 332, 335, 338, 339, 340, 343, 348, 353, 360, | |
361, 366, 371, 376, 383, 384, 389, 396, 397, 402, | 646 | 662 | 361, 366, 371, 376, 383, 384, 389, 396, 397, 402, | |
409, 410, 415, 420, 425, 432, 433, 438, 445, 446, | 647 | 663 | 409, 410, 415, 420, 425, 432, 433, 438, 445, 446, | |
453, 454, 461, 462, 466, 472, 473, 474, 475, 476 | 648 | 664 | 453, 454, 461, 462, 466, 472, 473, 474, 475, 476 | |
}; | 649 | 665 | }; | |
#endif | 650 | 666 | #endif | |
651 | 667 | |||
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE | 652 | 668 | #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE | |
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. | 653 | 669 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. | |
First, the terminals, then, starting at YYNTOKENS, nonterminals. */ | 654 | 670 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ | |
static const char *const yytname[] = | 655 | 671 | static const char *const yytname[] = | |
{ | 656 | 672 | { | |
"$end", "error", "$undefined", "T_Void", "T_Bool", "T_Int", "T_Float", | 657 | 673 | "$end", "error", "$undefined", "T_Void", "T_Bool", "T_Int", "T_Float", | |
"T_Uint", "T_Bvec2", "T_Bvec3", "T_Bvec4", "T_Ivec2", "T_Ivec3", | 658 | 674 | "T_Uint", "T_Bvec2", "T_Bvec3", "T_Bvec4", "T_Ivec2", "T_Ivec3", | |
"T_Ivec4", "T_Uvec2", "T_Uvec3", "T_Uvec4", "T_Vec2", "T_Vec3", "T_Vec4", | 659 | 675 | "T_Ivec4", "T_Uvec2", "T_Uvec3", "T_Uvec4", "T_Vec2", "T_Vec3", "T_Vec4", | |
"T_Mat2", "T_Mat3", "T_Mat4", "T_While", "T_For", "T_If", "T_Else", | 660 | 676 | "T_Mat2", "T_Mat3", "T_Mat4", "T_While", "T_For", "T_If", "T_Else", | |
"T_Return", "T_Break", "T_Continue", "T_Do", "T_Switch", "T_Case", | 661 | 677 | "T_Return", "T_Break", "T_Continue", "T_Do", "T_Switch", "T_Case", | |
"T_Default", "T_In", "T_Out", "T_Const", "T_Uniform", "T_LeftParen", | 662 | 678 | "T_Default", "T_In", "T_Out", "T_Const", "T_Uniform", "T_LeftParen", | |
"T_RightParen", "T_LeftBracket", "T_RightBracket", "T_LeftBrace", | 663 | 679 | "T_RightParen", "T_LeftBracket", "T_RightBracket", "T_LeftBrace", | |
"T_RightBrace", "T_Dot", "T_Comma", "T_Colon", "T_Semicolon", | 664 | 680 | "T_RightBrace", "T_Dot", "T_Comma", "T_Colon", "T_Semicolon", | |
"T_Question", "T_LessEqual", "T_GreaterEqual", "T_EQ", "T_NE", "T_And", | 665 | 681 | "T_Question", "T_LessEqual", "T_GreaterEqual", "T_EQ", "T_NE", "T_And", | |
"T_Or", "T_Plus", "T_Star", "T_MulAssign", "T_DivAssign", "T_AddAssign", | 666 | 682 | "T_Or", "T_Plus", "T_Star", "T_MulAssign", "T_DivAssign", "T_AddAssign", | |
"T_SubAssign", "T_Equal", "T_LeftAngle", "T_RightAngle", "T_Dash", | 667 | 683 | "T_SubAssign", "T_Equal", "T_LeftAngle", "T_RightAngle", "T_Dash", | |
"T_Slash", "T_Inc", "T_Dec", "T_Identifier", "T_IntConstant", | 668 | 684 | "T_Slash", "T_Inc", "T_Dec", "T_Identifier", "T_IntConstant", | |
"T_FloatConstant", "T_BoolConstant", "T_FieldSelection", "LOWEST", | 669 | 685 | "T_FloatConstant", "T_BoolConstant", "T_FieldSelection", "LOWEST", | |
"LOWER_THAN_ELSE", "$accept", "Program", "DeclList", "Decl", | 670 | 686 | "LOWER_THAN_ELSE", "$accept", "Program", "DeclList", "Decl", | |
"Declaration", "FuncDecl", "ParameterList", "SingleDecl", "Initializer", | 671 | 687 | "Declaration", "FuncDecl", "ParameterList", "SingleDecl", "Initializer", | |
"TypeQualify", "TypeDecl", "CompoundStatement", "StatementList", | 672 | 688 | "TypeQualify", "TypeDecl", "CompoundStatement", "StatementList", | |
"Statement", "SingleStatement", "SelectionStmt", "SwitchStmt", | 673 | 689 | "Statement", "SingleStatement", "SelectionStmt", "SwitchStmt", | |
"CaseStmt", "JumpStmt", "WhileStmt", "ForStmt", "PrimaryExpr", | 674 | 690 | "CaseStmt", "JumpStmt", "WhileStmt", "ForStmt", "PrimaryExpr", | |
"FunctionCallExpr", "FunctionCallHeaderNoParameters", | 675 | 691 | "FunctionCallExpr", "FunctionCallHeaderNoParameters", | |
"FunctionCallHeaderWithParameters", "ArgumentList", "FunctionIdentifier", | 676 | 692 | "FunctionCallHeaderWithParameters", "ArgumentList", "FunctionIdentifier", | |
"PostfixExpr", "UnaryExpr", "MultiExpr", "AdditionExpr", "RelationExpr", | 677 | 693 | "PostfixExpr", "UnaryExpr", "MultiExpr", "AdditionExpr", "RelationExpr", | |
"EqualityExpr", "LogicAndExpr", "LogicOrExpr", "Expression", "AssignOp", 0 | 678 | 694 | "EqualityExpr", "LogicAndExpr", "LogicOrExpr", "Expression", "AssignOp", 0 | |
}; | 679 | 695 | }; | |
#endif | 680 | 696 | #endif | |
681 | 697 | |||
# ifdef YYPRINT | 682 | 698 | # ifdef YYPRINT | |
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to | 683 | 699 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to | |
token YYLEX-NUM. */ | 684 | 700 | token YYLEX-NUM. */ | |
static const yytype_uint16 yytoknum[] = | 685 | 701 | static const yytype_uint16 yytoknum[] = | |
{ | 686 | 702 | { | |
0, 256, 257, 258, 259, 260, 261, 262, 263, 264, | 687 | 703 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, | |
265, 266, 267, 268, 269, 270, 271, 272, 273, 274, | 688 | 704 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, | |
275, 276, 277, 278, 279, 280, 281, 282, 283, 284, | 689 | 705 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, | |
285, 286, 287, 288, 289, 290, 291, 292, 293, 294, | 690 | 706 | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, | |
295, 296, 297, 298, 299, 300, 301, 302, 303, 304, | 691 | 707 | 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, | |
305, 306, 307, 308, 309, 310, 311, 312, 313, 314, | 692 | 708 | 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, | |
315, 316, 317, 318, 319, 320, 321, 322, 323, 324, | 693 | 709 | 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, | |
325, 326, 327, 328, 329 | 694 | 710 | 325, 326, 327, 328, 329 | |
}; | 695 | 711 | }; | |
# endif | 696 | 712 | # endif | |
697 | 713 | |||
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ | 698 | 714 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ | |
static const yytype_uint8 yyr1[] = | 699 | 715 | static const yytype_uint8 yyr1[] = | |
{ | 700 | 716 | { | |
0, 75, 76, 77, 77, 78, 78, 79, 79, 80, | 701 | 717 | 0, 75, 76, 77, 77, 78, 78, 79, 79, 80, | |
80, 81, 81, 82, 82, 82, 82, 82, 82, 83, | 702 | 718 | 80, 81, 81, 82, 82, 82, 82, 82, 82, 83, | |
84, 84, 84, 84, 85, 85, 85, 85, 85, 85, | 703 | 719 | 84, 84, 84, 84, 85, 85, 85, 85, 85, 85, | |
85, 85, 85, 85, 86, 86, 87, 87, 88, 88, | 704 | 720 | 85, 85, 85, 85, 86, 86, 87, 87, 88, 88, | |
89, 89, 89, 89, 89, 89, 89, 89, 89, 90, | 705 | 721 | 89, 89, 89, 89, 89, 89, 89, 89, 89, 90, | |
90, 91, 92, 92, 93, 93, 93, 93, 94, 95, | 706 | 722 | 90, 91, 92, 92, 93, 93, 93, 93, 94, 95, | |
96, 96, 96, 96, 96, 97, 97, 98, 98, 99, | 707 | 723 | 96, 96, 96, 96, 96, 97, 97, 98, 98, 99, | |
100, 100, 101, 102, 102, 102, 102, 102, 102, 103, | 708 | 724 | 100, 100, 101, 102, 102, 102, 102, 102, 102, 103, | |
103, 103, 103, 103, 104, 104, 104, 105, 105, 105, | 709 | 725 | 103, 103, 103, 103, 104, 104, 104, 105, 105, 105, | |
106, 106, 106, 106, 106, 107, 107, 107, 108, 108, | 710 | 726 | 106, 106, 106, 106, 106, 107, 107, 107, 108, 108, | |
109, 109, 110, 110, 110, 111, 111, 111, 111, 111 | 711 | 727 | 109, 109, 110, 110, 110, 111, 111, 111, 111, 111 | |
}; | 712 | 728 | }; | |
713 | 729 | |||
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ | 714 | 730 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ | |
static const yytype_uint8 yyr2[] = | 715 | 731 | static const yytype_uint8 yyr2[] = | |
{ | 716 | 732 | { | |
0, 2, 1, 2, 1, 1, 2, 2, 2, 4, | 717 | 733 | 0, 2, 1, 2, 1, 1, 2, 2, 2, 4, | |
5, 1, 3, 2, 3, 4, 5, 5, 6, 1, | 718 | 734 | 5, 1, 3, 2, 3, 4, 5, 5, 6, 1, | |
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | 719 | 735 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |
1, 1, 1, 1, 2, 3, 1, 2, 1, 1, | 720 | 736 | 1, 1, 1, 1, 2, 3, 1, 2, 1, 1, | |
1, 2, 2, 1, 1, 1, 1, 1, 1, 7, | 721 | 737 | 1, 2, 2, 1, 1, 1, 1, 1, 1, 7, | |
5, 7, 4, 3, 2, 2, 2, 3, 5, 9, | 722 | 738 | 5, 7, 4, 3, 2, 2, 2, 3, 5, 9, | |
1, 1, 1, 1, 3, 2, 2, 3, 2, 3, | 723 | 739 | 1, 1, 1, 1, 3, 2, 2, 3, 2, 3, | |
1, 3, 1, 1, 4, 1, 2, 2, 3, 1, | 724 | 740 | 1, 3, 1, 1, 4, 1, 2, 2, 3, 1, | |
2, 2, 2, 2, 1, 3, 3, 1, 3, 3, | 725 | 741 | 2, 2, 2, 2, 1, 3, 3, 1, 3, 3, | |
1, 3, 3, 3, 3, 1, 3, 3, 1, 3, | 726 | 742 | 1, 3, 3, 3, 3, 1, 3, 3, 1, 3, | |
1, 3, 1, 5, 3, 1, 1, 1, 1, 1 | 727 | 743 | 1, 3, 1, 5, 3, 1, 1, 1, 1, 1 | |
}; | 728 | 744 | }; | |
729 | 745 | |||
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state | 730 | 746 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state | |
STATE-NUM when YYTABLE doesn't specify something else to do. Zero | 731 | 747 | STATE-NUM when YYTABLE doesn't specify something else to do. Zero | |
means the default is an error. */ | 732 | 748 | means the default is an error. */ | |
static const yytype_uint8 yydefact[] = | 733 | 749 | static const yytype_uint8 yydefact[] = | |
{ | 734 | 750 | { | |
0, 25, 27, 24, 26, 28, 29, 30, 31, 32, | 735 | 751 | 0, 25, 27, 24, 26, 28, 29, 30, 31, 32, | |
33, 20, 21, 22, 23, 0, 2, 4, 5, 0, | 736 | 752 | 33, 20, 21, 22, 23, 0, 2, 4, 5, 0, | |
0, 0, 0, 1, 3, 0, 7, 6, 8, 0, | 737 | 753 | 0, 0, 0, 1, 3, 0, 7, 6, 8, 0, | |
13, 0, 0, 0, 0, 0, 0, 0, 0, 0, | 738 | 754 | 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
0, 34, 40, 0, 0, 0, 0, 60, 61, 62, | 739 | 755 | 0, 34, 40, 0, 0, 0, 0, 60, 61, 62, | |
63, 0, 0, 38, 0, 36, 39, 43, 44, 45, | 740 | 756 | 63, 0, 0, 38, 0, 36, 39, 43, 44, 45, | |
46, 47, 48, 73, 75, 0, 0, 0, 79, 84, | 741 | 757 | 46, 47, 48, 73, 75, 0, 0, 0, 79, 84, | |
87, 90, 95, 98, 100, 102, 0, 14, 0, 0, | 742 | 758 | 87, 90, 95, 98, 100, 102, 0, 14, 0, 0, | |
0, 0, 0, 0, 56, 0, 54, 55, 0, 0, | 743 | 759 | 0, 0, 0, 0, 56, 0, 54, 55, 0, 0, | |
0, 0, 82, 83, 80, 81, 41, 13, 35, 37, | 744 | 760 | 0, 0, 82, 83, 80, 81, 41, 13, 35, 37, | |
66, 65, 68, 0, 0, 76, 77, 108, 109, 106, | 745 | 761 | 66, 65, 68, 0, 0, 76, 77, 108, 109, 106, | |
107, 105, 0, 0, 0, 0, 0, 0, 0, 0, | 746 | 762 | 107, 105, 0, 0, 0, 0, 0, 0, 0, 0, | |
0, 0, 0, 0, 0, 0, 42, 0, 0, 9, | 747 | 763 | 0, 0, 0, 0, 0, 0, 42, 0, 0, 9, | |
0, 11, 0, 15, 19, 0, 0, 0, 57, 0, | 748 | 764 | 0, 11, 0, 15, 19, 0, 0, 0, 57, 0, | |
0, 53, 64, 67, 69, 70, 0, 78, 104, 85, | 749 | 765 | 0, 53, 64, 67, 69, 70, 0, 78, 104, 85, | |
86, 84, 88, 89, 94, 93, 91, 92, 96, 97, | 750 | 766 | 86, 84, 88, 89, 94, 93, 91, 92, 96, 97, | |
99, 0, 101, 0, 16, 10, 0, 17, 0, 0, | 751 | 767 | 99, 0, 101, 0, 16, 10, 0, 17, 0, 0, | |
0, 0, 52, 0, 74, 0, 18, 12, 58, 0, | 752 | 768 | 0, 0, 52, 0, 74, 0, 18, 12, 58, 0, | |
50, 0, 71, 103, 0, 0, 0, 0, 49, 51, | 753 | 769 | 50, 0, 71, 103, 0, 0, 0, 0, 49, 51, | |
0, 59 | 754 | 770 | 0, 59 | |
}; | 755 | 771 | }; | |
756 | 772 | |||
/* YYDEFGOTO[NTERM-NUM]. */ | 757 | 773 | /* YYDEFGOTO[NTERM-NUM]. */ | |
static const yytype_int16 yydefgoto[] = | 758 | 774 | static const yytype_int16 yydefgoto[] = | |
{ | 759 | 775 | { | |
-1, 15, 16, 17, 18, 19, 130, 51, 133, 21, | 760 | 776 | -1, 15, 16, 17, 18, 19, 130, 51, 133, 21, | |
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, | 761 | 777 | 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, | |
62, 63, 64, 65, 66, 144, 67, 68, 69, 70, | 762 | 778 | 62, 63, 64, 65, 66, 144, 67, 68, 69, 70, | |
71, 72, 73, 74, 75, 76, 112 | 763 | 779 | 71, 72, 73, 74, 75, 76, 112 | |
}; | 764 | 780 | }; | |
765 | 781 | |||
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing | 766 | 782 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing | |
STATE-NUM. */ | 767 | 783 | STATE-NUM. */ | |
#define YYPACT_NINF -119 | 768 | 784 | #define YYPACT_NINF -119 | |
static const yytype_int16 yypact[] = | 769 | 785 | static const yytype_int16 yypact[] = | |
{ | 770 | 786 | { | |
107, -119, -119, -119, -119, -119, -119, -119, -119, -119, | 771 | 787 | 107, -119, -119, -119, -119, -119, -119, -119, -119, -119, | |
-119, -119, -119, -119, -119, 12, 107, -119, -119, 21, | 772 | 788 | -119, -119, -119, -119, -119, 12, 107, -119, -119, 21, | |
-5, 355, -12, -119, -119, 150, -119, -119, -119, 13, | 773 | 789 | -5, 355, -12, -119, -119, 150, -119, -119, -119, 13, | |
-30, 76, 79, 92, -34, 46, 85, 97, 93, 91, | 774 | 790 | -30, 76, 79, 92, -34, 46, 85, 97, 93, 91, | |
93, -119, -119, 93, 93, 93, 93, 101, -119, -119, | 775 | 791 | 93, -119, -119, 93, 93, 93, 93, 101, -119, -119, | |
-119, 100, 82, -119, 205, -119, -119, -119, -119, -119, | 776 | 792 | -119, 100, 82, -119, 205, -119, -119, -119, -119, -119, | |
-119, -119, -119, -119, -119, 110, 113, 127, -26, 62, | 777 | 793 | -119, -119, -119, -119, -119, 110, 113, 127, -26, 62, | |
-45, -2, 2, -6, 123, -39, 133, -37, 55, 120, | 778 | 794 | -45, -2, 2, -6, 123, -39, 133, -37, 55, 120, | |
93, 93, 93, 93, -119, 143, -119, -119, 93, 145, | 779 | 795 | 93, 93, 93, 93, -119, 143, -119, -119, 93, 145, | |
315, 155, -119, -119, -119, -119, -119, -18, -119, -119, | 780 | 796 | 315, 155, -119, -119, -119, -119, -119, -18, -119, -119, | |
-119, -119, 16, 93, 124, -119, -119, -119, -119, -119, | 781 | 797 | -119, -119, 16, 93, 124, -119, -119, -119, -119, -119, | |
-119, -119, 93, 93, 93, 93, 93, 93, 93, 93, | 782 | 798 | -119, -119, 93, 93, 93, 93, 93, 93, 93, 93, | |
93, 93, 93, 93, 93, 93, -119, 126, 93, -119, | 783 | 799 | 93, 93, 93, 93, 93, 93, -119, 126, 93, -119, | |
70, -119, 161, -119, -119, 164, 157, 167, -119, 168, | 784 | 800 | 70, -119, 161, -119, -119, 164, 157, 167, -119, 168, | |
315, -119, -119, -119, 170, -119, 171, -119, -119, -119, | 785 | 801 | 315, -119, -119, -119, 170, -119, 171, -119, -119, -119, | |
-119, -119, -45, -45, -2, -2, -2, -2, 2, 2, | 786 | 802 | -119, -119, -45, -45, -2, -2, -2, -2, 2, 2, | |
-6, -29, 123, 172, -119, -119, 107, -119, 315, 93, | 787 | 803 | -6, -29, 123, 172, -119, -119, 107, -119, 315, 93, | |
315, 189, -119, 93, -119, 93, -119, -119, -119, 188, | 788 | 804 | 315, 189, -119, 93, -119, 93, -119, -119, -119, 188, | |
218, 315, -119, 191, 93, 315, 260, 207, -119, -119, | 789 | 805 | 218, 315, -119, 191, 93, 315, 260, 207, -119, -119, | |
315, -119 | 790 | 806 | 315, -119 | |
}; | 791 | 807 | }; | |
792 | 808 | |||
/* YYPGOTO[NTERM-NUM]. */ | 793 | 809 | /* YYPGOTO[NTERM-NUM]. */ | |
static const yytype_int16 yypgoto[] = | 794 | 810 | static const yytype_int16 yypgoto[] = | |
{ | 795 | 811 | { | |
-119, -119, -119, 233, -119, -119, -119, 0, 122, -119, | 796 | 812 | -119, -119, -119, 233, -119, -119, -119, 0, 122, -119, | |
23, 232, 72, -52, -119, -119, -119, -119, -119, -119, | 797 | 813 | 23, 232, 72, -52, -119, -119, -119, -119, -119, -119, | |
-119, -119, -119, -119, -119, -119, -119, -119, -17, -49, | 798 | 814 | -119, -119, -119, -119, -119, -119, -119, -119, -17, -49, | |
81, 24, 131, 130, -118, -33, -119 | 799 | 815 | 81, 24, 131, 130, -118, -33, -119 | |
}; | 800 | 816 | }; | |
801 | 817 | |||
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If | 802 | 818 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If | |
positive, shift that token. If negative, reduce the rule which | 803 | 819 | positive, shift that token. If negative, reduce the rule which | |
number is the opposite. If zero, do what YYDEFACT says. | 804 | 820 | number is the opposite. If zero, do what YYDEFACT says. | |
If YYTABLE_NINF, syntax error. */ | 805 | 821 | If YYTABLE_NINF, syntax error. */ | |
#define YYTABLE_NINF -73 | 806 | 822 | #define YYTABLE_NINF -73 | |
static const yytype_int16 yytable[] = | 807 | 823 | static const yytype_int16 yytable[] = | |
{ | 808 | 824 | { | |
20, 85, 99, 127, 40, 89, 161, 91, 78, 124, | 809 | 825 | 20, 85, 99, 127, 40, 89, 161, 91, 78, 124, | |
79, 113, 23, 84, 103, 125, 20, 175, 104, 143, | 810 | 826 | 79, 113, 23, 84, 103, 125, 20, 175, 104, 143, | |
114, 43, 79, 22, 128, 125, 92, 93, 94, 95, | 811 | 827 | 114, 43, 79, 22, 128, 125, 92, 93, 94, 95, | |
44, 80, 45, 46, 47, 48, 49, 50, 141, 22, | 812 | 828 | 44, 80, 45, 46, 47, 48, 49, 50, 141, 22, | |
105, 106, 28, 80, 29, 121, 122, 134, 135, 136, | 813 | 829 | 105, 106, 28, 80, 29, 121, 122, 134, 135, 136, | |
137, 117, 118, 115, 40, 139, 30, 183, 1, 2, | 814 | 830 | 137, 117, 118, 115, 40, 139, 30, 183, 1, 2, | |
3, 4, 116, 25, 119, 120, 152, 153, 26, 145, | 815 | 831 | 3, 4, 116, 25, 119, 120, 152, 153, 26, 145, | |
146, 43, 5, 6, 7, 8, 9, 10, 131, 148, | 816 | 832 | 146, 43, 5, 6, 7, 8, 9, 10, 131, 148, | |
44, 77, 45, 46, 47, 48, 49, 50, 172, 11, | 817 | 833 | 44, 77, 45, 46, 47, 48, 49, 50, 172, 11, | |
12, 13, 14, 86, 129, 134, 149, 150, 151, 151, | 818 | 834 | 12, 13, 14, 86, 129, 134, 149, 150, 151, 151, | |
151, 151, 151, 151, 151, 151, 151, 151, 151, 165, | 819 | 835 | 151, 151, 151, 151, 151, 151, 151, 151, 151, 165, | |
1, 2, 3, 4, 81, 166, 178, 82, 180, 107, | 820 | 836 | 1, 2, 3, 4, 81, 166, 178, 82, 180, 107, | |
108, 109, 110, 111, 5, 6, 7, 8, 9, 10, | 821 | 837 | 108, 109, 110, 111, 5, 6, 7, 8, 9, 10, | |
83, 40, 87, 188, 99, 88, 179, 90, 191, -72, | 822 | 838 | 83, 40, 87, 188, 99, 88, 179, 90, 191, -72, | |
182, 11, 12, 13, 14, 158, 159, 96, 43, 100, | 823 | 839 | 182, 11, 12, 13, 14, 158, 159, 96, 43, 100, | |
97, 187, 101, 1, 2, 3, 4, 44, 151, 45, | 824 | 840 | 97, 187, 101, 1, 2, 3, 4, 44, 151, 45, | |
46, 47, 48, 49, 50, 102, 177, 5, 6, 7, | 825 | 841 | 46, 47, 48, 49, 50, 102, 177, 5, 6, 7, | |
8, 9, 10, 31, 32, 33, 123, 34, 35, 36, | 826 | 842 | 8, 9, 10, 31, 32, 33, 123, 34, 35, 36, | |
126, 37, 38, 39, 11, 12, 13, 14, 40, 132, | 827 | 843 | 126, 37, 38, 39, 11, 12, 13, 14, 40, 132, | |
138, 140, 25, 41, 142, 163, 147, 42, 154, 155, | 828 | 844 | 138, 140, 25, 41, 142, 163, 147, 42, 154, 155, | |
156, 157, 167, 168, 169, 43, 170, 171, 1, 2, | 829 | 845 | 156, 157, 167, 168, 169, 43, 170, 171, 1, 2, | |
3, 4, 174, 176, 44, 173, 45, 46, 47, 48, | 830 | 846 | 3, 4, 174, 176, 44, 173, 45, 46, 47, 48, | |
49, 50, 5, 6, 7, 8, 9, 10, 31, 32, | 831 | 847 | 49, 50, 5, 6, 7, 8, 9, 10, 31, 32, | |
33, 181, 34, 35, 36, 184, 37, 38, 39, 11, | 832 | 848 | 33, 181, 34, 35, 36, 184, 37, 38, 39, 11, | |
12, 13, 14, 40, 185, 125, 190, 25, 98, 24, | 833 | 849 | 12, 13, 14, 40, 185, 125, 190, 25, 98, 24, | |
164, 27, 42, 186, 160, 162, 0, 0, 0, 0, | 834 | 850 | 164, 27, 42, 186, 160, 162, 0, 0, 0, 0, | |
43, 0, 0, 1, 2, 3, 4, 0, 0, 44, | 835 | 851 | 43, 0, 0, 1, 2, 3, 4, 0, 0, 44, | |
0, 45, 46, 47, 48, 49, 50, 5, 6, 7, | 836 | 852 | 0, 45, 46, 47, 48, 49, 50, 5, 6, 7, | |
8, 9, 10, 31, 32, 33, 0, 34, 35, 36, | 837 | 853 | 8, 9, 10, 31, 32, 33, 0, 34, 35, 36, | |
0, 37, 38, 39, 11, 12, 13, 14, 40, 0, | 838 | 854 | 0, 37, 38, 39, 11, 12, 13, 14, 40, 0, | |
0, 0, 25, 189, 0, 0, 0, 42, 0, 0, | 839 | 855 | 0, 0, 25, 189, 0, 0, 0, 42, 0, 0, | |
0, 0, 0, 0, 0, 43, 0, 0, 1, 2, | 840 | 856 | 0, 0, 0, 0, 0, 43, 0, 0, 1, 2, | |
3, 4, 0, 0, 44, 0, 45, 46, 47, 48, | 841 | 857 | 3, 4, 0, 0, 44, 0, 45, 46, 47, 48, | |
49, 50, 5, 6, 7, 8, 9, 10, 31, 32, | 842 | 858 | 49, 50, 5, 6, 7, 8, 9, 10, 31, 32, | |
33, 0, 34, 35, 36, 0, 37, 38, 39, 11, | 843 | 859 | 33, 0, 34, 35, 36, 0, 37, 38, 39, 11, | |
12, 13, 14, 40, 0, 0, 0, 25, 1, 2, | 844 | 860 | 12, 13, 14, 40, 0, 0, 0, 25, 1, 2, | |
3, 4, 42, 0, 0, 0, 0, 0, 0, 0, | 845 | 861 | 3, 4, 42, 0, 0, 0, 0, 0, 0, 0, | |
43, 0, 5, 6, 7, 8, 9, 10, 0, 44, | 846 | 862 | 43, 0, 5, 6, 7, 8, 9, 10, 0, 44, | |
0, 45, 46, 47, 48, 49, 50 | 847 | 863 | 0, 45, 46, 47, 48, 49, 50 | |
}; | 848 | 864 | }; | |
849 | 865 | |||
static const yytype_int16 yycheck[] = | 850 | 866 | static const yytype_int16 yycheck[] = | |
{ | 851 | 867 | { | |
0, 34, 54, 40, 38, 38, 124, 40, 38, 48, | 852 | 868 | 0, 34, 54, 40, 38, 38, 124, 40, 38, 48, | |
40, 56, 0, 47, 40, 54, 16, 46, 44, 3, | 853 | 869 | 40, 56, 0, 47, 40, 54, 16, 46, 44, 3, | |
65, 55, 40, 0, 61, 54, 43, 44, 45, 46, | 854 | 870 | 65, 55, 40, 0, 61, 54, 43, 44, 45, 46, | |
64, 61, 66, 67, 68, 69, 70, 71, 90, 16, | 855 | 871 | 64, 61, 66, 67, 68, 69, 70, 71, 90, 16, | |
66, 67, 47, 61, 21, 51, 52, 80, 81, 82, | 856 | 872 | 66, 67, 47, 61, 21, 51, 52, 80, 81, 82, | |
83, 49, 50, 55, 38, 88, 68, 175, 3, 4, | 857 | 873 | 83, 49, 50, 55, 38, 88, 68, 175, 3, 4, | |
5, 6, 64, 42, 62, 63, 115, 116, 47, 102, | 858 | 874 | 5, 6, 64, 42, 62, 63, 115, 116, 47, 102, | |
103, 55, 17, 18, 19, 20, 21, 22, 78, 112, | 859 | 875 | 103, 55, 17, 18, 19, 20, 21, 22, 78, 112, | |
64, 68, 66, 67, 68, 69, 70, 71, 140, 34, | 860 | 876 | 64, 68, 66, 67, 68, 69, 70, 71, 140, 34, | |
35, 36, 37, 47, 39, 128, 113, 114, 115, 116, | 861 | 877 | 35, 36, 37, 47, 39, 128, 113, 114, 115, 116, | |
117, 118, 119, 120, 121, 122, 123, 124, 125, 39, | 862 | 878 | 117, 118, 119, 120, 121, 122, 123, 124, 125, 39, | |
3, 4, 5, 6, 38, 45, 168, 38, 170, 57, | 863 | 879 | 3, 4, 5, 6, 38, 45, 168, 38, 170, 57, | |
58, 59, 60, 61, 17, 18, 19, 20, 21, 22, | 864 | 880 | 58, 59, 60, 61, 17, 18, 19, 20, 21, 22, | |
38, 38, 47, 185, 186, 38, 169, 46, 190, 38, | 865 | 881 | 38, 38, 47, 185, 186, 38, 169, 46, 190, 38, | |
173, 34, 35, 36, 37, 121, 122, 47, 55, 39, | 866 | 882 | 173, 34, 35, 36, 37, 121, 122, 47, 55, 39, | |
68, 184, 39, 3, 4, 5, 6, 64, 175, 66, | 867 | 883 | 68, 184, 39, 3, 4, 5, 6, 64, 175, 66, | |
67, 68, 69, 70, 71, 38, 166, 17, 18, 19, | 868 | 884 | 67, 68, 69, 70, 71, 38, 166, 17, 18, 19, | |
20, 21, 22, 23, 24, 25, 53, 27, 28, 29, | 869 | 885 | 20, 21, 22, 23, 24, 25, 53, 27, 28, 29, | |
47, 31, 32, 33, 34, 35, 36, 37, 38, 69, | 870 | 886 | 47, 31, 32, 33, 34, 35, 36, 37, 38, 69, | |
47, 46, 42, 43, 39, 69, 72, 47, 117, 118, | 871 | 887 | 47, 46, 42, 43, 39, 69, 72, 47, 117, 118, | |
119, 120, 41, 39, 47, 55, 39, 39, 3, 4, | 872 | 888 | 119, 120, 41, 39, 47, 55, 39, 39, 3, 4, | |
5, 6, 41, 41, 64, 45, 66, 67, 68, 69, | 873 | 889 | 5, 6, 41, 41, 64, 45, 66, 67, 68, 69, | |
70, 71, 17, 18, 19, 20, 21, 22, 23, 24, | 874 | 890 | 70, 71, 17, 18, 19, 20, 21, 22, 23, 24, | |
25, 42, 27, 28, 29, 47, 31, 32, 33, 34, | 875 | 891 | 25, 42, 27, 28, 29, 47, 31, 32, 33, 34, | |
35, 36, 37, 38, 26, 54, 39, 42, 43, 16, | 876 | 892 | 35, 36, 37, 38, 26, 54, 39, 42, 43, 16, | |
128, 19, 47, 181, 123, 125, -1, -1, -1, -1, | 877 | 893 | 128, 19, 47, 181, 123, 125, -1, -1, -1, -1, | |
55, -1, -1, 3, 4, 5, 6, -1, -1, 64, | 878 | 894 | 55, -1, -1, 3, 4, 5, 6, -1, -1, 64, | |
-1, 66, 67, 68, 69, 70, 71, 17, 18, 19, | 879 | 895 | -1, 66, 67, 68, 69, 70, 71, 17, 18, 19, | |
20, 21, 22, 23, 24, 25, -1, 27, 28, 29, | 880 | 896 | 20, 21, 22, 23, 24, 25, -1, 27, 28, 29, | |
-1, 31, 32, 33, 34, 35, 36, 37, 38, -1, | 881 | 897 | -1, 31, 32, 33, 34, 35, 36, 37, 38, -1, | |
-1, -1, 42, 43, -1, -1, -1, 47, -1, -1, | 882 | 898 | -1, -1, 42, 43, -1, -1, -1, 47, -1, -1, | |
-1, -1, -1, -1, -1, 55, -1, -1, 3, 4, | 883 | 899 | -1, -1, -1, -1, -1, 55, -1, -1, 3, 4, | |
5, 6, -1, -1, 64, -1, 66, 67, 68, 69, | 884 | 900 | 5, 6, -1, -1, 64, -1, 66, 67, 68, 69, | |
70, 71, 17, 18, 19, 20, 21, 22, 23, 24, | 885 | 901 | 70, 71, 17, 18, 19, 20, 21, 22, 23, 24, | |
25, -1, 27, 28, 29, -1, 31, 32, 33, 34, | 886 | 902 | 25, -1, 27, 28, 29, -1, 31, 32, 33, 34, | |
35, 36, 37, 38, -1, -1, -1, 42, 3, 4, | 887 | 903 | 35, 36, 37, 38, -1, -1, -1, 42, 3, 4, | |
5, 6, 47, -1, -1, -1, -1, -1, -1, -1, | 888 | 904 | 5, 6, 47, -1, -1, -1, -1, -1, -1, -1, | |
55, -1, 17, 18, 19, 20, 21, 22, -1, 64, | 889 | 905 | 55, -1, 17, 18, 19, 20, 21, 22, -1, 64, | |
-1, 66, 67, 68, 69, 70, 71 | 890 | 906 | -1, 66, 67, 68, 69, 70, 71 | |
}; | 891 | 907 | }; | |
892 | 908 | |||
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing | 893 | 909 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing | |
symbol of state STATE-NUM. */ | 894 | 910 | symbol of state STATE-NUM. */ | |
static const yytype_uint8 yystos[] = | 895 | 911 | static const yytype_uint8 yystos[] = | |
{ | 896 | 912 | { | |
0, 3, 4, 5, 6, 17, 18, 19, 20, 21, | 897 | 913 | 0, 3, 4, 5, 6, 17, 18, 19, 20, 21, | |
22, 34, 35, 36, 37, 76, 77, 78, 79, 80, | 898 | 914 | 22, 34, 35, 36, 37, 76, 77, 78, 79, 80, | |
82, 84, 85, 0, 78, 42, 47, 86, 47, 85, | 899 | 915 | 82, 84, 85, 0, 78, 42, 47, 86, 47, 85, | |
68, 23, 24, 25, 27, 28, 29, 31, 32, 33, | 900 | 916 | 68, 23, 24, 25, 27, 28, 29, 31, 32, 33, | |
38, 43, 47, 55, 64, 66, 67, 68, 69, 70, | 901 | 917 | 38, 43, 47, 55, 64, 66, 67, 68, 69, 70, | |
71, 82, 85, 86, 87, 88, 89, 90, 91, 92, | 902 | 918 | 71, 82, 85, 86, 87, 88, 89, 90, 91, 92, | |
93, 94, 95, 96, 97, 98, 99, 101, 102, 103, | 903 | 919 | 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, | |
104, 105, 106, 107, 108, 109, 110, 68, 38, 40, | 904 | 920 | 104, 105, 106, 107, 108, 109, 110, 68, 38, 40, | |
61, 38, 38, 38, 47, 110, 47, 47, 38, 110, | 905 | 921 | 61, 38, 38, 38, 47, 110, 47, 47, 38, 110, | |
46, 110, 103, 103, 103, 103, 47, 68, 43, 88, | 906 | 922 | 46, 110, 103, 103, 103, 103, 47, 68, 43, 88, | |
39, 39, 38, 40, 44, 66, 67, 57, 58, 59, | 907 | 923 | 39, 39, 38, 40, 44, 66, 67, 57, 58, 59, | |
60, 61, 111, 56, 65, 55, 64, 49, 50, 62, | 908 | 924 | 60, 61, 111, 56, 65, 55, 64, 49, 50, 62, | |
63, 51, 52, 53, 48, 54, 47, 40, 61, 39, | 909 | 925 | 63, 51, 52, 53, 48, 54, 47, 40, 61, 39, | |
81, 82, 69, 83, 110, 110, 110, 110, 47, 110, | 910 | 926 | 81, 82, 69, 83, 110, 110, 110, 110, 47, 110, | |
46, 88, 39, 3, 100, 110, 110, 72, 110, 103, | 911 | 927 | 46, 88, 39, 3, 100, 110, 110, 72, 110, 103, | |
103, 103, 104, 104, 105, 105, 105, 105, 106, 106, | 912 | 928 | 103, 103, 104, 104, 105, 105, 105, 105, 106, 106, | |
107, 109, 108, 69, 83, 39, 45, 41, 39, 47, | 913 | 929 | 107, 109, 108, 69, 83, 39, 45, 41, 39, 47, | |
39, 39, 88, 45, 41, 46, 41, 82, 88, 110, | 914 | 930 | 39, 39, 88, 45, 41, 46, 41, 82, 88, 110, | |
88, 42, 110, 109, 47, 26, 87, 110, 88, 43, | 915 | 931 | 88, 42, 110, 109, 47, 26, 87, 110, 88, 43, | |
39, 88 | 916 | 932 | 39, 88 | |
}; | 917 | 933 | }; | |
918 | 934 | |||
#define yyerrok (yyerrstatus = 0) | 919 | 935 | #define yyerrok (yyerrstatus = 0) | |
#define yyclearin (yychar = YYEMPTY) | 920 | 936 | #define yyclearin (yychar = YYEMPTY) | |
#define YYEMPTY (-2) | 921 | 937 | #define YYEMPTY (-2) | |
#define YYEOF 0 | 922 | 938 | #define YYEOF 0 | |
923 | 939 | |||
#define YYACCEPT goto yyacceptlab | 924 | 940 | #define YYACCEPT goto yyacceptlab | |
#define YYABORT goto yyabortlab | 925 | 941 | #define YYABORT goto yyabortlab | |
#define YYERROR goto yyerrorlab | 926 | 942 | #define YYERROR goto yyerrorlab | |
927 | 943 | |||
928 | 944 | |||
/* Like YYERROR except do call yyerror. This remains here temporarily | 929 | 945 | /* Like YYERROR except do call yyerror. This remains here temporarily | |
to ease the transition to the new meaning of YYERROR, for GCC. | 930 | 946 | to ease the transition to the new meaning of YYERROR, for GCC. | |
Once GCC version 2 has supplanted version 1, this can go. */ | 931 | 947 | Once GCC version 2 has supplanted version 1, this can go. */ | |
932 | 948 | |||
#define YYFAIL goto yyerrlab | 933 | 949 | #define YYFAIL goto yyerrlab | |
934 | 950 | |||
#define YYRECOVERING() (!!yyerrstatus) | 935 | 951 | #define YYRECOVERING() (!!yyerrstatus) | |
936 | 952 | |||
#define YYBACKUP(Token, Value) \ | 937 | 953 | #define YYBACKUP(Token, Value) \ | |
do \ | 938 | 954 | do \ | |
if (yychar == YYEMPTY && yylen == 1) \ | 939 | 955 | if (yychar == YYEMPTY && yylen == 1) \ | |
{ \ | 940 | 956 | { \ | |
yychar = (Token); \ | 941 | 957 | yychar = (Token); \ | |
yylval = (Value); \ | 942 | 958 | yylval = (Value); \ | |
yytoken = YYTRANSLATE (yychar); \ | 943 | 959 | yytoken = YYTRANSLATE (yychar); \ | |
YYPOPSTACK (1); \ | 944 | 960 | YYPOPSTACK (1); \ | |
goto yybackup; \ | 945 | 961 | goto yybackup; \ | |
} \ | 946 | 962 | } \ | |
else \ | 947 | 963 | else \ | |
{ \ | 948 | 964 | { \ | |
yyerror (YY_("syntax error: cannot back up")); \ | 949 | 965 | yyerror (YY_("syntax error: cannot back up")); \ | |
YYERROR; \ | 950 | 966 | YYERROR; \ | |
} \ | 951 | 967 | } \ | |
while (YYID (0)) | 952 | 968 | while (YYID (0)) | |
953 | 969 | |||
954 | 970 | |||
#define YYTERROR 1 | 955 | 971 | #define YYTERROR 1 | |
#define YYERRCODE 256 | 956 | 972 | #define YYERRCODE 256 | |
957 | 973 | |||
958 | 974 | |||
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. | 959 | 975 | /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. | |
If N is 0, then set CURRENT to the empty location which ends | 960 | 976 | If N is 0, then set CURRENT to the empty location which ends | |
the previous symbol: RHS[0] (always defined). */ | 961 | 977 | the previous symbol: RHS[0] (always defined). */ | |
962 | 978 | |||
#define YYRHSLOC(Rhs, K) ((Rhs)[K]) | 963 | 979 | #define YYRHSLOC(Rhs, K) ((Rhs)[K]) | |
#ifndef YYLLOC_DEFAULT | 964 | 980 | #ifndef YYLLOC_DEFAULT | |
# define YYLLOC_DEFAULT(Current, Rhs, N) \ | 965 | 981 | # define YYLLOC_DEFAULT(Current, Rhs, N) \ | |
do \ | 966 | 982 | do \ | |
if (YYID (N)) \ | 967 | 983 | if (YYID (N)) \ | |
{ \ | 968 | 984 | { \ | |
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ | 969 | 985 | (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ | |
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ | 970 | 986 | (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ | |
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \ | 971 | 987 | (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ | |
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \ | 972 | 988 | (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ | |
} \ | 973 | 989 | } \ | |
else \ | 974 | 990 | else \ | |
{ \ | 975 | 991 | { \ | |
(Current).first_line = (Current).last_line = \ | 976 | 992 | (Current).first_line = (Current).last_line = \ | |
YYRHSLOC (Rhs, 0).last_line; \ | 977 | 993 | YYRHSLOC (Rhs, 0).last_line; \ | |
(Current).first_column = (Current).last_column = \ | 978 | 994 | (Current).first_column = (Current).last_column = \ | |
YYRHSLOC (Rhs, 0).last_column; \ | 979 | 995 | YYRHSLOC (Rhs, 0).last_column; \ | |
} \ | 980 | 996 | } \ | |
while (YYID (0)) | 981 | 997 | while (YYID (0)) | |
#endif | 982 | 998 | #endif | |
983 | 999 | |||
984 | 1000 | |||
/* YY_LOCATION_PRINT -- Print the location on the stream. | 985 | 1001 | /* YY_LOCATION_PRINT -- Print the location on the stream. | |
This macro was not mandated originally: define only if we know | 986 | 1002 | This macro was not mandated originally: define only if we know | |
we won't break user code: when these are the locations we know. */ | 987 | 1003 | we won't break user code: when these are the locations we know. */ | |
988 | 1004 | |||
#ifndef YY_LOCATION_PRINT | 989 | 1005 | #ifndef YY_LOCATION_PRINT | |
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL | 990 | 1006 | # if YYLTYPE_IS_TRIVIAL | |
# define YY_LOCATION_PRINT(File, Loc) \ | 991 | 1007 | # define YY_LOCATION_PRINT(File, Loc) \ | |
fprintf (File, "%d.%d-%d.%d", \ | 992 | 1008 | fprintf (File, "%d.%d-%d.%d", \ | |
(Loc).first_line, (Loc).first_column, \ | 993 | 1009 | (Loc).first_line, (Loc).first_column, \ | |
(Loc).last_line, (Loc).last_column) | 994 | 1010 | (Loc).last_line, (Loc).last_column) | |
# else | 995 | 1011 | # else | |
# define YY_LOCATION_PRINT(File, Loc) ((void) 0) | 996 | 1012 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) | |
# endif | 997 | 1013 | # endif | |
#endif | 998 | 1014 | #endif | |
999 | 1015 | |||
1000 | 1016 | |||
/* YYLEX -- calling `yylex' with the right arguments. */ | 1001 | 1017 | /* YYLEX -- calling `yylex' with the right arguments. */ | |
1002 | 1018 | |||
#ifdef YYLEX_PARAM | 1003 | 1019 | #ifdef YYLEX_PARAM | |
# define YYLEX yylex (YYLEX_PARAM) | 1004 | 1020 | # define YYLEX yylex (YYLEX_PARAM) | |
#else | 1005 | 1021 | #else | |
# define YYLEX yylex () | 1006 | 1022 | # define YYLEX yylex () | |
#endif | 1007 | 1023 | #endif | |
1008 | 1024 | |||
/* Enable debugging if requested. */ | 1009 | 1025 | /* Enable debugging if requested. */ | |
#if YYDEBUG | 1010 | 1026 | #if YYDEBUG | |
1011 | 1027 | |||
# ifndef YYFPRINTF | 1012 | 1028 | # ifndef YYFPRINTF | |
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ | 1013 | 1029 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ | |
# define YYFPRINTF fprintf | 1014 | 1030 | # define YYFPRINTF fprintf | |
# endif | 1015 | 1031 | # endif | |
1016 | 1032 | |||
# define YYDPRINTF(Args) \ | 1017 | 1033 | # define YYDPRINTF(Args) \ | |
do { \ | 1018 | 1034 | do { \ | |
if (yydebug) \ | 1019 | 1035 | if (yydebug) \ | |
YYFPRINTF Args; \ | 1020 | 1036 | YYFPRINTF Args; \ | |
} while (YYID (0)) | 1021 | 1037 | } while (YYID (0)) | |
1022 | 1038 | |||
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ | 1023 | 1039 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ | |
do { \ | 1024 | 1040 | do { \ | |
if (yydebug) \ | 1025 | 1041 | if (yydebug) \ | |
{ \ | 1026 | 1042 | { \ | |
YYFPRINTF (stderr, "%s ", Title); \ | 1027 | 1043 | YYFPRINTF (stderr, "%s ", Title); \ | |
yy_symbol_print (stderr, \ | 1028 | 1044 | yy_symbol_print (stderr, \ | |
Type, Value, Location); \ | 1029 | 1045 | Type, Value, Location); \ | |
YYFPRINTF (stderr, "\n"); \ | 1030 | 1046 | YYFPRINTF (stderr, "\n"); \ | |
} \ | 1031 | 1047 | } \ | |
} while (YYID (0)) | 1032 | 1048 | } while (YYID (0)) | |
1033 | 1049 | |||
1034 | 1050 | |||
/*--------------------------------. | 1035 | 1051 | /*--------------------------------. | |
| Print this symbol on YYOUTPUT. | | 1036 | 1052 | | Print this symbol on YYOUTPUT. | | |
`--------------------------------*/ | 1037 | 1053 | `--------------------------------*/ | |
1038 | 1054 | |||
/*ARGSUSED*/ | 1039 | 1055 | /*ARGSUSED*/ | |
#if (defined __STDC__ || defined __C99__FUNC__ \ | 1040 | 1056 | #if (defined __STDC__ || defined __C99__FUNC__ \ | |
|| defined __cplusplus || defined _MSC_VER) | 1041 | 1057 | || defined __cplusplus || defined _MSC_VER) | |
static void | 1042 | 1058 | static void | |
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) | 1043 | 1059 | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) | |
#else | 1044 | 1060 | #else | |
static void | 1045 | 1061 | static void | |
yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp) | 1046 | 1062 | yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp) | |
FILE *yyoutput; | 1047 | 1063 | FILE *yyoutput; | |
int yytype; | 1048 | 1064 | int yytype; | |
YYSTYPE const * const yyvaluep; | 1049 | 1065 | YYSTYPE const * const yyvaluep; | |
YYLTYPE const * const yylocationp; | 1050 | 1066 | YYLTYPE const * const yylocationp; | |
#endif | 1051 | 1067 | #endif | |
{ | 1052 | 1068 | { | |
if (!yyvaluep) | 1053 | 1069 | if (!yyvaluep) | |
return; | 1054 | 1070 | return; | |
YYUSE (yylocationp); | 1055 | 1071 | YYUSE (yylocationp); | |
# ifdef YYPRINT | 1056 | 1072 | # ifdef YYPRINT | |
if (yytype < YYNTOKENS) | 1057 | 1073 | if (yytype < YYNTOKENS) | |
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); | 1058 | 1074 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); | |
# else | 1059 | 1075 | # else | |
YYUSE (yyoutput); | 1060 | 1076 | YYUSE (yyoutput); | |
# endif | 1061 | 1077 | # endif | |
switch (yytype) | 1062 | 1078 | switch (yytype) | |
{ | 1063 | 1079 | { | |
default: | 1064 | 1080 | default: | |
break; | 1065 | 1081 | break; | |
} | 1066 | 1082 | } | |
} | 1067 | 1083 | } | |
1068 | 1084 | |||
1069 | 1085 | |||
/*--------------------------------. | 1070 | 1086 | /*--------------------------------. | |
| Print this symbol on YYOUTPUT. | | 1071 | 1087 | | Print this symbol on YYOUTPUT. | | |
`--------------------------------*/ | 1072 | 1088 | `--------------------------------*/ | |
1073 | 1089 | |||
#if (defined __STDC__ || defined __C99__FUNC__ \ | 1074 | 1090 | #if (defined __STDC__ || defined __C99__FUNC__ \ | |
|| defined __cplusplus || defined _MSC_VER) | 1075 | 1091 | || defined __cplusplus || defined _MSC_VER) | |
static void | 1076 | 1092 | static void | |
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) | 1077 | 1093 | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) | |
#else | 1078 | 1094 | #else | |
static void | 1079 | 1095 | static void | |
yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) | 1080 | 1096 | yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) | |
FILE *yyoutput; | 1081 | 1097 | FILE *yyoutput; | |
int yytype; | 1082 | 1098 | int yytype; | |
YYSTYPE const * const yyvaluep; | 1083 | 1099 | YYSTYPE const * const yyvaluep; | |
YYLTYPE const * const yylocationp; | 1084 | 1100 | YYLTYPE const * const yylocationp; | |
#endif | 1085 | 1101 | #endif | |
{ | 1086 | 1102 | { | |
if (yytype < YYNTOKENS) | 1087 | 1103 | if (yytype < YYNTOKENS) | |
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); | 1088 | 1104 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); | |
else | 1089 | 1105 | else | |
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); | 1090 | 1106 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); | |
1091 | 1107 | |||
YY_LOCATION_PRINT (yyoutput, *yylocationp); | 1092 | 1108 | YY_LOCATION_PRINT (yyoutput, *yylocationp); | |
YYFPRINTF (yyoutput, ": "); | 1093 | 1109 | YYFPRINTF (yyoutput, ": "); | |
yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp); | 1094 | 1110 | yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp); | |
YYFPRINTF (yyoutput, ")"); | 1095 | 1111 | YYFPRINTF (yyoutput, ")"); | |
} | 1096 | 1112 | } | |
1097 | 1113 | |||
/*------------------------------------------------------------------. | 1098 | 1114 | /*------------------------------------------------------------------. | |
| yy_stack_print -- Print the state stack from its BOTTOM up to its | | 1099 | 1115 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | | |
| TOP (included). | | 1100 | 1116 | | TOP (included). | | |
`------------------------------------------------------------------*/ | 1101 | 1117 | `------------------------------------------------------------------*/ | |
1102 | 1118 | |||
#if (defined __STDC__ || defined __C99__FUNC__ \ | 1103 | 1119 | #if (defined __STDC__ || defined __C99__FUNC__ \ | |
|| defined __cplusplus || defined _MSC_VER) | 1104 | 1120 | || defined __cplusplus || defined _MSC_VER) | |
static void | 1105 | 1121 | static void | |
yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) | 1106 | 1122 | yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) | |
#else | 1107 | 1123 | #else | |
static void | 1108 | 1124 | static void | |
yy_stack_print (bottom, top) | 1109 | 1125 | yy_stack_print (yybottom, yytop) | |
yytype_int16 *bottom; | 1110 | 1126 | yytype_int16 *yybottom; | |
yytype_int16 *top; | 1111 | 1127 | yytype_int16 *yytop; | |
#endif | 1112 | 1128 | #endif | |
{ | 1113 | 1129 | { | |
YYFPRINTF (stderr, "Stack now"); | 1114 | 1130 | YYFPRINTF (stderr, "Stack now"); | |
for (; bottom <= top; ++bottom) | 1115 | 1131 | for (; yybottom <= yytop; yybottom++) | |
YYFPRINTF (stderr, " %d", *bottom); | 1116 | 1132 | { | |
1133 | int yybot = *yybottom; | |||
1134 | YYFPRINTF (stderr, " %d", yybot); | |||
1135 | } | |||
YYFPRINTF (stderr, "\n"); | 1117 | 1136 | YYFPRINTF (stderr, "\n"); | |
} | 1118 | 1137 | } | |
1119 | 1138 | |||
# define YY_STACK_PRINT(Bottom, Top) \ | 1120 | 1139 | # define YY_STACK_PRINT(Bottom, Top) \ | |
do { \ | 1121 | 1140 | do { \ | |
if (yydebug) \ | 1122 | 1141 | if (yydebug) \ | |
yy_stack_print ((Bottom), (Top)); \ | 1123 | 1142 | yy_stack_print ((Bottom), (Top)); \ | |
} while (YYID (0)) | 1124 | 1143 | } while (YYID (0)) | |
1125 | 1144 | |||
1126 | 1145 | |||
/*------------------------------------------------. | 1127 | 1146 | /*------------------------------------------------. | |
| Report that the YYRULE is going to be reduced. | | 1128 | 1147 | | Report that the YYRULE is going to be reduced. | | |
`------------------------------------------------*/ | 1129 | 1148 | `------------------------------------------------*/ | |
1130 | 1149 | |||
#if (defined __STDC__ || defined __C99__FUNC__ \ | 1131 | 1150 | #if (defined __STDC__ || defined __C99__FUNC__ \ | |
|| defined __cplusplus || defined _MSC_VER) | 1132 | 1151 | || defined __cplusplus || defined _MSC_VER) | |
static void | 1133 | 1152 | static void | |
yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) | 1134 | 1153 | yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) | |
#else | 1135 | 1154 | #else | |
static void | 1136 | 1155 | static void | |
yy_reduce_print (yyvsp, yylsp, yyrule) | 1137 | 1156 | yy_reduce_print (yyvsp, yylsp, yyrule) | |
YYSTYPE *yyvsp; | 1138 | 1157 | YYSTYPE *yyvsp; | |
YYLTYPE *yylsp; | 1139 | 1158 | YYLTYPE *yylsp; | |
int yyrule; | 1140 | 1159 | int yyrule; | |
#endif | 1141 | 1160 | #endif | |
{ | 1142 | 1161 | { | |
int yynrhs = yyr2[yyrule]; | 1143 | 1162 | int yynrhs = yyr2[yyrule]; | |
int yyi; | 1144 | 1163 | int yyi; | |
unsigned long int yylno = yyrline[yyrule]; | 1145 | 1164 | unsigned long int yylno = yyrline[yyrule]; | |
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", | 1146 | 1165 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", | |
yyrule - 1, yylno); | 1147 | 1166 | yyrule - 1, yylno); | |
/* The symbols being reduced. */ | 1148 | 1167 | /* The symbols being reduced. */ | |
for (yyi = 0; yyi < yynrhs; yyi++) | 1149 | 1168 | for (yyi = 0; yyi < yynrhs; yyi++) | |
{ | 1150 | 1169 | { | |
fprintf (stderr, " $%d = ", yyi + 1); | 1151 | 1170 | YYFPRINTF (stderr, " $%d = ", yyi + 1); | |
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], | 1152 | 1171 | yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], | |
&(yyvsp[(yyi + 1) - (yynrhs)]) | 1153 | 1172 | &(yyvsp[(yyi + 1) - (yynrhs)]) | |
, &(yylsp[(yyi + 1) - (yynrhs)]) ); | 1154 | 1173 | , &(yylsp[(yyi + 1) - (yynrhs)]) ); | |
fprintf (stderr, "\n"); | 1155 | 1174 | YYFPRINTF (stderr, "\n"); | |
} | 1156 | 1175 | } | |
} | 1157 | 1176 | } | |
1158 | 1177 | |||
# define YY_REDUCE_PRINT(Rule) \ | 1159 | 1178 | # define YY_REDUCE_PRINT(Rule) \ | |
do { \ | 1160 | 1179 | do { \ | |
if (yydebug) \ | 1161 | 1180 | if (yydebug) \ | |
yy_reduce_print (yyvsp, yylsp, Rule); \ | 1162 | 1181 | yy_reduce_print (yyvsp, yylsp, Rule); \ | |
} while (YYID (0)) | 1163 | 1182 | } while (YYID (0)) | |
1164 | 1183 | |||
/* Nonzero means print parse trace. It is left uninitialized so that | 1165 | 1184 | /* Nonzero means print parse trace. It is left uninitialized so that | |
multiple parsers can coexist. */ | 1166 | 1185 | multiple parsers can coexist. */ | |
int yydebug; | 1167 | 1186 | int yydebug; | |
#else /* !YYDEBUG */ | 1168 | 1187 | #else /* !YYDEBUG */ | |
# define YYDPRINTF(Args) | 1169 | 1188 | # define YYDPRINTF(Args) | |
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) | 1170 | 1189 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) | |
# define YY_STACK_PRINT(Bottom, Top) | 1171 | 1190 | # define YY_STACK_PRINT(Bottom, Top) | |
# define YY_REDUCE_PRINT(Rule) | 1172 | 1191 | # define YY_REDUCE_PRINT(Rule) | |
#endif /* !YYDEBUG */ | 1173 | 1192 | #endif /* !YYDEBUG */ | |
1174 | 1193 | |||
1175 | 1194 | |||
/* YYINITDEPTH -- initial size of the parser's stacks. */ | 1176 | 1195 | /* YYINITDEPTH -- initial size of the parser's stacks. */ | |
#ifndef YYINITDEPTH | 1177 | 1196 | #ifndef YYINITDEPTH | |
# define YYINITDEPTH 200 | 1178 | 1197 | # define YYINITDEPTH 200 | |
#endif | 1179 | 1198 | #endif | |
1180 | 1199 | |||
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only | 1181 | 1200 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only | |
if the built-in stack extension method is used). | 1182 | 1201 | if the built-in stack extension method is used). | |
1183 | 1202 | |||
Do not make this value too large; the results are undefined if | 1184 | 1203 | Do not make this value too large; the results are undefined if | |
YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) | 1185 | 1204 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) | |
evaluated with infinite-precision integer arithmetic. */ | 1186 | 1205 | evaluated with infinite-precision integer arithmetic. */ | |
1187 | 1206 | |||
#ifndef YYMAXDEPTH | 1188 | 1207 | #ifndef YYMAXDEPTH | |
# define YYMAXDEPTH 10000 | 1189 | 1208 | # define YYMAXDEPTH 10000 | |
#endif | 1190 | 1209 | #endif | |
1191 | 1210 | |||
1192 | 1211 | |||
1193 | 1212 | |||
#if YYERROR_VERBOSE | 1194 | 1213 | #if YYERROR_VERBOSE | |
1195 | 1214 | |||
# ifndef yystrlen | 1196 | 1215 | # ifndef yystrlen | |
# if defined __GLIBC__ && defined _STRING_H | 1197 | 1216 | # if defined __GLIBC__ && defined _STRING_H | |
# define yystrlen strlen | 1198 | 1217 | # define yystrlen strlen | |
# else | 1199 | 1218 | # else | |
/* Return the length of YYSTR. */ | 1200 | 1219 | /* Return the length of YYSTR. */ | |
#if (defined __STDC__ || defined __C99__FUNC__ \ | 1201 | 1220 | #if (defined __STDC__ || defined __C99__FUNC__ \ | |
|| defined __cplusplus || defined _MSC_VER) | 1202 | 1221 | || defined __cplusplus || defined _MSC_VER) | |
static YYSIZE_T | 1203 | 1222 | static YYSIZE_T | |
yystrlen (const char *yystr) | 1204 | 1223 | yystrlen (const char *yystr) | |
#else | 1205 | 1224 | #else | |
static YYSIZE_T | 1206 | 1225 | static YYSIZE_T | |
yystrlen (yystr) | 1207 | 1226 | yystrlen (yystr) | |
const char *yystr; | 1208 | 1227 | const char *yystr; | |
#endif | 1209 | 1228 | #endif | |
{ | 1210 | 1229 | { | |
YYSIZE_T yylen; | 1211 | 1230 | YYSIZE_T yylen; | |
for (yylen = 0; yystr[yylen]; yylen++) | 1212 | 1231 | for (yylen = 0; yystr[yylen]; yylen++) | |
continue; | 1213 | 1232 | continue; | |
return yylen; | 1214 | 1233 | return yylen; | |
} | 1215 | 1234 | } | |
# endif | 1216 | 1235 | # endif | |
# endif | 1217 | 1236 | # endif | |
1218 | 1237 | |||
# ifndef yystpcpy | 1219 | 1238 | # ifndef yystpcpy | |
# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE | 1220 | 1239 | # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE | |
# define yystpcpy stpcpy | 1221 | 1240 | # define yystpcpy stpcpy | |
# else | 1222 | 1241 | # else | |
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in | 1223 | 1242 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in | |
YYDEST. */ | 1224 | 1243 | YYDEST. */ | |
#if (defined __STDC__ || defined __C99__FUNC__ \ | 1225 | 1244 | #if (defined __STDC__ || defined __C99__FUNC__ \ | |
|| defined __cplusplus || defined _MSC_VER) | 1226 | 1245 | || defined __cplusplus || defined _MSC_VER) | |
static char * | 1227 | 1246 | static char * | |
yystpcpy (char *yydest, const char *yysrc) | 1228 | 1247 | yystpcpy (char *yydest, const char *yysrc) | |
#else | 1229 | 1248 | #else | |
static char * | 1230 | 1249 | static char * | |
yystpcpy (yydest, yysrc) | 1231 | 1250 | yystpcpy (yydest, yysrc) | |
char *yydest; | 1232 | 1251 | char *yydest; | |
const char *yysrc; | 1233 | 1252 | const char *yysrc; | |
#endif | 1234 | 1253 | #endif | |
{ | 1235 | 1254 | { | |
char *yyd = yydest; | 1236 | 1255 | char *yyd = yydest; | |
const char *yys = yysrc; | 1237 | 1256 | const char *yys = yysrc; | |
1238 | 1257 | |||
while ((*yyd++ = *yys++) != '\0') | 1239 | 1258 | while ((*yyd++ = *yys++) != '\0') | |
continue; | 1240 | 1259 | continue; | |
1241 | 1260 | |||
return yyd - 1; | 1242 | 1261 | return yyd - 1; | |
} | 1243 | 1262 | } | |
# endif | 1244 | 1263 | # endif | |
# endif | 1245 | 1264 | # endif | |
1246 | 1265 | |||
# ifndef yytnamerr | 1247 | 1266 | # ifndef yytnamerr | |
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary | 1248 | 1267 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary | |
quotes and backslashes, so that it's suitable for yyerror. The | 1249 | 1268 | quotes and backslashes, so that it's suitable for yyerror. The | |
heuristic is that double-quoting is unnecessary unless the string | 1250 | 1269 | heuristic is that double-quoting is unnecessary unless the string | |
contains an apostrophe, a comma, or backslash (other than | 1251 | 1270 | contains an apostrophe, a comma, or backslash (other than | |
backslash-backslash). YYSTR is taken from yytname. If YYRES is | 1252 | 1271 | backslash-backslash). YYSTR is taken from yytname. If YYRES is | |
null, do not copy; instead, return the length of what the result | 1253 | 1272 | null, do not copy; instead, return the length of what the result | |
would have been. */ | 1254 | 1273 | would have been. */ | |
static YYSIZE_T | 1255 | 1274 | static YYSIZE_T | |
yytnamerr (char *yyres, const char *yystr) | 1256 | 1275 | yytnamerr (char *yyres, const char *yystr) | |
{ | 1257 | 1276 | { | |
if (*yystr == '"') | 1258 | 1277 | if (*yystr == '"') | |
{ | 1259 | 1278 | { | |
YYSIZE_T yyn = 0; | 1260 | 1279 | YYSIZE_T yyn = 0; | |
char const *yyp = yystr; | 1261 | 1280 | char const *yyp = yystr; | |
1262 | 1281 | |||
for (;;) | 1263 | 1282 | for (;;) | |
switch (*++yyp) | 1264 | 1283 | switch (*++yyp) | |
{ | 1265 | 1284 | { | |
case '\'': | 1266 | 1285 | case '\'': | |
case ',': | 1267 | 1286 | case ',': | |
goto do_not_strip_quotes; | 1268 | 1287 | goto do_not_strip_quotes; | |
1269 | 1288 | |||
case '\\': | 1270 | 1289 | case '\\': | |
if (*++yyp != '\\') | 1271 | 1290 | if (*++yyp != '\\') | |
goto do_not_strip_quotes; | 1272 | 1291 | goto do_not_strip_quotes; | |
/* Fall through. */ | 1273 | 1292 | /* Fall through. */ | |
default: | 1274 | 1293 | default: | |
if (yyres) | 1275 | 1294 | if (yyres) | |
yyres[yyn] = *yyp; | 1276 | 1295 | yyres[yyn] = *yyp; | |
yyn++; | 1277 | 1296 | yyn++; | |
break; | 1278 | 1297 | break; | |
1279 | 1298 | |||
case '"': | 1280 | 1299 | case '"': | |
if (yyres) | 1281 | 1300 | if (yyres) | |
yyres[yyn] = '\0'; | 1282 | 1301 | yyres[yyn] = '\0'; | |
return yyn; | 1283 | 1302 | return yyn; | |
} | 1284 | 1303 | } | |
do_not_strip_quotes: ; | 1285 | 1304 | do_not_strip_quotes: ; | |
} | 1286 | 1305 | } | |
1287 | 1306 | |||
if (! yyres) | 1288 | 1307 | if (! yyres) | |
return yystrlen (yystr); | 1289 | 1308 | return yystrlen (yystr); | |
1290 | 1309 | |||
return yystpcpy (yyres, yystr) - yyres; | 1291 | 1310 | return yystpcpy (yyres, yystr) - yyres; | |
} | 1292 | 1311 | } | |
# endif | 1293 | 1312 | # endif | |
1294 | 1313 | |||
/* Copy into YYRESULT an error message about the unexpected token | 1295 | 1314 | /* Copy into YYRESULT an error message about the unexpected token | |
YYCHAR while in state YYSTATE. Return the number of bytes copied, | 1296 | 1315 | YYCHAR while in state YYSTATE. Return the number of bytes copied, | |
including the terminating null byte. If YYRESULT is null, do not | 1297 | 1316 | including the terminating null byte. If YYRESULT is null, do not | |
copy anything; just return the number of bytes that would be | 1298 | 1317 | copy anything; just return the number of bytes that would be | |
copied. As a special case, return 0 if an ordinary "syntax error" | 1299 | 1318 | copied. As a special case, return 0 if an ordinary "syntax error" | |
message will do. Return YYSIZE_MAXIMUM if overflow occurs during | 1300 | 1319 | message will do. Return YYSIZE_MAXIMUM if overflow occurs during | |
size calculation. */ | 1301 | 1320 | size calculation. */ | |
static YYSIZE_T | 1302 | 1321 | static YYSIZE_T | |
yysyntax_error (char *yyresult, int yystate, int yychar) | 1303 | 1322 | yysyntax_error (char *yyresult, int yystate, int yychar) | |
{ | 1304 | 1323 | { | |
int yyn = yypact[yystate]; | 1305 | 1324 | int yyn = yypact[yystate]; | |
1306 | 1325 | |||
if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) | 1307 | 1326 | if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) | |
return 0; | 1308 | 1327 | return 0; | |
else | 1309 | 1328 | else | |
{ | 1310 | 1329 | { | |
int yytype = YYTRANSLATE (yychar); | 1311 | 1330 | int yytype = YYTRANSLATE (yychar); | |
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); | 1312 | 1331 | YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); | |
YYSIZE_T yysize = yysize0; | 1313 | 1332 | YYSIZE_T yysize = yysize0; | |
YYSIZE_T yysize1; | 1314 | 1333 | YYSIZE_T yysize1; | |
int yysize_overflow = 0; | 1315 | 1334 | int yysize_overflow = 0; | |
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; | 1316 | 1335 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; | |
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; | 1317 | 1336 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; | |
int yyx; | 1318 | 1337 | int yyx; | |
1319 | 1338 | |||
# if 0 | 1320 | 1339 | # if 0 | |
/* This is so xgettext sees the translatable formats that are | 1321 | 1340 | /* This is so xgettext sees the translatable formats that are | |
constructed on the fly. */ | 1322 | 1341 | constructed on the fly. */ | |
YY_("syntax error, unexpected %s"); | 1323 | 1342 | YY_("syntax error, unexpected %s"); | |
YY_("syntax error, unexpected %s, expecting %s"); | 1324 | 1343 | YY_("syntax error, unexpected %s, expecting %s"); | |
YY_("syntax error, unexpected %s, expecting %s or %s"); | 1325 | 1344 | YY_("syntax error, unexpected %s, expecting %s or %s"); | |
YY_("syntax error, unexpected %s, expecting %s or %s or %s"); | 1326 | 1345 | YY_("syntax error, unexpected %s, expecting %s or %s or %s"); | |
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); | 1327 | 1346 | YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); | |
# endif | 1328 | 1347 | # endif | |
char *yyfmt; | 1329 | 1348 | char *yyfmt; | |
char const *yyf; | 1330 | 1349 | char const *yyf; | |
static char const yyunexpected[] = "syntax error, unexpected %s"; | 1331 | 1350 | static char const yyunexpected[] = "syntax error, unexpected %s"; | |
static char const yyexpecting[] = ", expecting %s"; | 1332 | 1351 | static char const yyexpecting[] = ", expecting %s"; | |
static char const yyor[] = " or %s"; | 1333 | 1352 | static char const yyor[] = " or %s"; | |
char yyformat[sizeof yyunexpected | 1334 | 1353 | char yyformat[sizeof yyunexpected | |
+ sizeof yyexpecting - 1 | 1335 | 1354 | + sizeof yyexpecting - 1 | |
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) | 1336 | 1355 | + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) | |
* (sizeof yyor - 1))]; | 1337 | 1356 | * (sizeof yyor - 1))]; | |
char const *yyprefix = yyexpecting; | 1338 | 1357 | char const *yyprefix = yyexpecting; | |
1339 | 1358 | |||
/* Start YYX at -YYN if negative to avoid negative indexes in | 1340 | 1359 | /* Start YYX at -YYN if negative to avoid negative indexes in | |
YYCHECK. */ | 1341 | 1360 | YYCHECK. */ | |
int yyxbegin = yyn < 0 ? -yyn : 0; | 1342 | 1361 | int yyxbegin = yyn < 0 ? -yyn : 0; | |
1343 | 1362 | |||
/* Stay within bounds of both yycheck and yytname. */ | 1344 | 1363 | /* Stay within bounds of both yycheck and yytname. */ | |
int yychecklim = YYLAST - yyn + 1; | 1345 | 1364 | int yychecklim = YYLAST - yyn + 1; | |
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; | 1346 | 1365 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; | |
int yycount = 1; | 1347 | 1366 | int yycount = 1; | |
1348 | 1367 | |||
yyarg[0] = yytname[yytype]; | 1349 | 1368 | yyarg[0] = yytname[yytype]; | |
yyfmt = yystpcpy (yyformat, yyunexpected); | 1350 | 1369 | yyfmt = yystpcpy (yyformat, yyunexpected); | |
1351 | 1370 | |||
for (yyx = yyxbegin; yyx < yyxend; ++yyx) | 1352 | 1371 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) | |
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) | 1353 | 1372 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) | |
{ | 1354 | 1373 | { | |
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) | 1355 | 1374 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) | |
{ | 1356 | 1375 | { | |
yycount = 1; | 1357 | 1376 | yycount = 1; | |
yysize = yysize0; | 1358 | 1377 | yysize = yysize0; | |
yyformat[sizeof yyunexpected - 1] = '\0'; | 1359 | 1378 | yyformat[sizeof yyunexpected - 1] = '\0'; | |
break; | 1360 | 1379 | break; | |
} | 1361 | 1380 | } | |
yyarg[yycount++] = yytname[yyx]; | 1362 | 1381 | yyarg[yycount++] = yytname[yyx]; | |
yysize1 = yysize + yytnamerr (0, yytname[yyx]); | 1363 | 1382 | yysize1 = yysize + yytnamerr (0, yytname[yyx]); | |
yysize_overflow |= (yysize1 < yysize); | 1364 | 1383 | yysize_overflow |= (yysize1 < yysize); | |
yysize = yysize1; | 1365 | 1384 | yysize = yysize1; | |
yyfmt = yystpcpy (yyfmt, yyprefix); | 1366 | 1385 | yyfmt = yystpcpy (yyfmt, yyprefix); | |
yyprefix = yyor; | 1367 | 1386 | yyprefix = yyor; | |
} | 1368 | 1387 | } | |
1369 | 1388 | |||
yyf = YY_(yyformat); | 1370 | 1389 | yyf = YY_(yyformat); | |
yysize1 = yysize + yystrlen (yyf); | 1371 | 1390 | yysize1 = yysize + yystrlen (yyf); | |
yysize_overflow |= (yysize1 < yysize); | 1372 | 1391 | yysize_overflow |= (yysize1 < yysize); | |
yysize = yysize1; | 1373 | 1392 | yysize = yysize1; | |
1374 | 1393 | |||
if (yysize_overflow) | 1375 | 1394 | if (yysize_overflow) | |
return YYSIZE_MAXIMUM; | 1376 | 1395 | return YYSIZE_MAXIMUM; | |
1377 | 1396 | |||
if (yyresult) | 1378 | 1397 | if (yyresult) | |
{ | 1379 | 1398 | { | |
/* Avoid sprintf, as that infringes on the user's name space. | 1380 | 1399 | /* Avoid sprintf, as that infringes on the user's name space. | |
Don't have undefined behavior even if the translation | 1381 | 1400 | Don't have undefined behavior even if the translation | |
produced a string with the wrong number of "%s"s. */ | 1382 | 1401 | produced a string with the wrong number of "%s"s. */ | |
char *yyp = yyresult; | 1383 | 1402 | char *yyp = yyresult; | |
int yyi = 0; | 1384 | 1403 | int yyi = 0; | |
while ((*yyp = *yyf) != '\0') | 1385 | 1404 | while ((*yyp = *yyf) != '\0') | |
{ | 1386 | 1405 | { | |
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) | 1387 | 1406 | if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) | |
{ | 1388 | 1407 | { | |
yyp += yytnamerr (yyp, yyarg[yyi++]); | 1389 | 1408 | yyp += yytnamerr (yyp, yyarg[yyi++]); | |
yyf += 2; | 1390 | 1409 | yyf += 2; | |
} | 1391 | 1410 | } | |
else | 1392 | 1411 | else | |
{ | 1393 | 1412 | { | |
yyp++; | 1394 | 1413 | yyp++; | |
yyf++; | 1395 | 1414 | yyf++; | |
} | 1396 | 1415 | } | |
} | 1397 | 1416 | } | |
} | 1398 | 1417 | } | |
return yysize; | 1399 | 1418 | return yysize; | |
} | 1400 | 1419 | } | |
} | 1401 | 1420 | } | |
#endif /* YYERROR_VERBOSE */ | 1402 | 1421 | #endif /* YYERROR_VERBOSE */ | |
1403 | 1422 | |||
1404 | 1423 | |||
/*-----------------------------------------------. | 1405 | 1424 | /*-----------------------------------------------. | |
| Release the memory associated to this symbol. | | 1406 | 1425 | | Release the memory associated to this symbol. | | |
`-----------------------------------------------*/ | 1407 | 1426 | `-----------------------------------------------*/ | |
1408 | 1427 | |||
/*ARGSUSED*/ | 1409 | 1428 | /*ARGSUSED*/ | |
#if (defined __STDC__ || defined __C99__FUNC__ \ | 1410 | 1429 | #if (defined __STDC__ || defined __C99__FUNC__ \ | |
|| defined __cplusplus || defined _MSC_VER) | 1411 | 1430 | || defined __cplusplus || defined _MSC_VER) | |
static void | 1412 | 1431 | static void | |
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp) | 1413 | 1432 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp) | |
#else | 1414 | 1433 | #else | |
static void | 1415 | 1434 | static void | |
yydestruct (yymsg, yytype, yyvaluep, yylocationp) | 1416 | 1435 | yydestruct (yymsg, yytype, yyvaluep, yylocationp) | |
const char *yymsg; | 1417 | 1436 | const char *yymsg; | |
int yytype; | 1418 | 1437 | int yytype; | |
YYSTYPE *yyvaluep; | 1419 | 1438 | YYSTYPE *yyvaluep; | |
YYLTYPE *yylocationp; | 1420 | 1439 | YYLTYPE *yylocationp; | |
#endif | 1421 | 1440 | #endif | |
{ | 1422 | 1441 | { | |
YYUSE (yyvaluep); | 1423 | 1442 | YYUSE (yyvaluep); | |
YYUSE (yylocationp); | 1424 | 1443 | YYUSE (yylocationp); | |
1425 | 1444 | |||
if (!yymsg) | 1426 | 1445 | if (!yymsg) | |
yymsg = "Deleting"; | 1427 | 1446 | yymsg = "Deleting"; | |
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); | 1428 | 1447 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); | |
1429 | 1448 | |||
switch (yytype) | 1430 | 1449 | switch (yytype) | |
{ | 1431 | 1450 | { | |
1432 | 1451 | |||
default: | 1433 | 1452 | default: | |
break; | 1434 | 1453 | break; | |
} | 1435 | 1454 | } | |
} | 1436 | 1455 | } | |
1437 | ||||
1438 | 1456 | |||
/* Prevent warnings from -Wmissing-prototypes. */ | 1439 | 1457 | /* Prevent warnings from -Wmissing-prototypes. */ | |
1440 | ||||
#ifdef YYPARSE_PARAM | 1441 | 1458 | #ifdef YYPARSE_PARAM | |
#if defined __STDC__ || defined __cplusplus | 1442 | 1459 | #if defined __STDC__ || defined __cplusplus | |
int yyparse (void *YYPARSE_PARAM); | 1443 | 1460 | int yyparse (void *YYPARSE_PARAM); | |
#else | 1444 | 1461 | #else | |
int yyparse (); | 1445 | 1462 | int yyparse (); | |
#endif | 1446 | 1463 | #endif | |
#else /* ! YYPARSE_PARAM */ | 1447 | 1464 | #else /* ! YYPARSE_PARAM */ | |
#if defined __STDC__ || defined __cplusplus | 1448 | 1465 | #if defined __STDC__ || defined __cplusplus | |
int yyparse (void); | 1449 | 1466 | int yyparse (void); | |
#else | 1450 | 1467 | #else | |
int yyparse (); | 1451 | 1468 | int yyparse (); | |
#endif | 1452 | 1469 | #endif | |
#endif /* ! YYPARSE_PARAM */ | 1453 | 1470 | #endif /* ! YYPARSE_PARAM */ | |
1454 | 1471 | |||
1455 | 1472 | |||
1456 | 1473 | /* The lookahead symbol. */ | ||
/* The look-ahead symbol. */ | 1457 | |||
int yychar; | 1458 | 1474 | int yychar; | |
1459 | 1475 | |||
/* The semantic value of the look-ahead symbol. */ | 1460 | 1476 | /* The semantic value of the lookahead symbol. */ | |
YYSTYPE yylval; | 1461 | 1477 | YYSTYPE yylval; | |
1462 | 1478 | |||
1479 | /* Location data for the lookahead symbol. */ | |||
1480 | YYLTYPE yylloc; | |||
1481 | ||||
/* Number of syntax errors so far. */ | 1463 | 1482 | /* Number of syntax errors so far. */ | |
int yynerrs; | 1464 | 1483 | int yynerrs; | |
/* Location data for the look-ahead symbol. */ | 1465 | |||
YYLTYPE yylloc; | 1466 | |||
1467 | 1484 | |||
1468 | 1485 | |||
1469 | 1486 | |||
/*----------. | 1470 | 1487 | /*-------------------------. | |
| yyparse. | | 1471 | 1488 | | yyparse or yypush_parse. | | |
`----------*/ | 1472 | 1489 | `-------------------------*/ | |
1473 | 1490 | |||
#ifdef YYPARSE_PARAM | 1474 | 1491 | #ifdef YYPARSE_PARAM | |
#if (defined __STDC__ || defined __C99__FUNC__ \ | 1475 | 1492 | #if (defined __STDC__ || defined __C99__FUNC__ \ | |
|| defined __cplusplus || defined _MSC_VER) | 1476 | 1493 | || defined __cplusplus || defined _MSC_VER) | |
int | 1477 | 1494 | int | |
yyparse (void *YYPARSE_PARAM) | 1478 | 1495 | yyparse (void *YYPARSE_PARAM) | |
#else | 1479 | 1496 | #else | |
int | 1480 | 1497 | int | |
yyparse (YYPARSE_PARAM) | 1481 | 1498 | yyparse (YYPARSE_PARAM) | |
void *YYPARSE_PARAM; | 1482 | 1499 | void *YYPARSE_PARAM; | |
#endif | 1483 | 1500 | #endif | |
#else /* ! YYPARSE_PARAM */ | 1484 | 1501 | #else /* ! YYPARSE_PARAM */ | |
#if (defined __STDC__ || defined __C99__FUNC__ \ | 1485 | 1502 | #if (defined __STDC__ || defined __C99__FUNC__ \ | |
|| defined __cplusplus || defined _MSC_VER) | 1486 | 1503 | || defined __cplusplus || defined _MSC_VER) | |
int | 1487 | 1504 | int | |
yyparse (void) | 1488 | 1505 | yyparse (void) | |
#else | 1489 | 1506 | #else | |
int | 1490 | 1507 | int | |
yyparse () | 1491 | 1508 | yyparse () | |
1492 | 1509 | |||
#endif | 1493 | 1510 | #endif | |
#endif | 1494 | 1511 | #endif | |
{ | 1495 | 1512 | { | |
1496 | ||||
int yystate; | 1497 | |||
int yyn; | 1498 | |||
int yyresult; | 1499 | |||
/* Number of tokens to shift before error messages enabled. */ | 1500 | |||
int yyerrstatus; | 1501 | |||
/* Look-ahead token as an internal (translated) token number. */ | 1502 | |||
int yytoken = 0; | 1503 | |||
#if YYERROR_VERBOSE | 1504 | |||
/* Buffer for error messages, and its allocated size. */ | 1505 | |||
char yymsgbuf[128]; | 1506 | |||
char *yymsg = yymsgbuf; | 1507 | |||
YYSIZE_T yymsg_alloc = sizeof yymsgbuf; | 1508 | |||
#endif | 1509 | |||
1510 | 1513 | |||
/* Three stacks and their tools: | 1511 | |||
`yyss': related to states, | 1512 | |||
`yyvs': related to semantic values, | 1513 | |||
`yyls': related to locations. | 1514 | |||
1515 | 1514 | |||
Refer to the stacks thru separate pointers, to allow yyoverflow | 1516 | 1515 | int yystate; | |
to reallocate them elsewhere. */ | 1517 | 1516 | /* Number of tokens to shift before error messages enabled. */ | |
1517 | int yyerrstatus; | |||
1518 | 1518 | |||
/* The state stack. */ | 1519 | 1519 | /* The stacks and their tools: | |
yytype_int16 yyssa[YYINITDEPTH]; | 1520 | 1520 | `yyss': related to states. | |
yytype_int16 *yyss = yyssa; | 1521 | 1521 | `yyvs': related to semantic values. | |
yytype_int16 *yyssp; | 1522 | 1522 | `yyls': related to locations. | |
1523 | 1523 | |||
/* The semantic value stack. */ | 1524 | 1524 | Refer to the stacks thru separate pointers, to allow yyoverflow | |
YYSTYPE yyvsa[YYINITDEPTH]; | 1525 | 1525 | to reallocate them elsewhere. */ | |
YYSTYPE *yyvs = yyvsa; | 1526 | |||
YYSTYPE *yyvsp; | 1527 | |||
1528 | 1526 | |||
/* The location stack. */ | 1529 | 1527 | /* The state stack. */ | |
YYLTYPE yylsa[YYINITDEPTH]; | 1530 | 1528 | yytype_int16 yyssa[YYINITDEPTH]; | |
YYLTYPE *yyls = yylsa; | 1531 | 1529 | yytype_int16 *yyss; | |
YYLTYPE *yylsp; | 1532 | 1530 | yytype_int16 *yyssp; | |
/* The locations where the error started and ended. */ | 1533 | |||
YYLTYPE yyerror_range[2]; | 1534 | |||
1535 | 1531 | |||
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) | 1536 | 1532 | /* The semantic value stack. */ | |
1533 | YYSTYPE yyvsa[YYINITDEPTH]; | |||
1534 | YYSTYPE *yyvs; | |||
1535 | YYSTYPE *yyvsp; | |||
1537 | 1536 | |||
YYSIZE_T yystacksize = YYINITDEPTH; | 1538 | 1537 | /* The location stack. */ | |
1538 | YYLTYPE yylsa[YYINITDEPTH]; | |||
1539 | YYLTYPE *yyls; | |||
1540 | YYLTYPE *yylsp; | |||
1539 | 1541 | |||
1542 | /* The locations where the error started and ended. */ | |||
1543 | YYLTYPE yyerror_range[2]; | |||
1544 | ||||
1545 | YYSIZE_T yystacksize; | |||
1546 | ||||
1547 | int yyn; | |||
1548 | int yyresult; | |||
1549 | /* Lookahead token as an internal (translated) token number. */ | |||
1550 | int yytoken; | |||
/* The variables used to return semantic value and location from the | 1540 | 1551 | /* The variables used to return semantic value and location from the | |
action routines. */ | 1541 | 1552 | action routines. */ | |
YYSTYPE yyval; | 1542 | 1553 | YYSTYPE yyval; | |
YYLTYPE yyloc; | 1543 | 1554 | YYLTYPE yyloc; | |
1544 | 1555 | |||
1556 | #if YYERROR_VERBOSE | |||
1557 | /* Buffer for error messages, and its allocated size. */ | |||
1558 | char yymsgbuf[128]; | |||
1559 | char *yymsg = yymsgbuf; | |||
1560 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; | |||
1561 | #endif | |||
1562 | ||||
1563 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) | |||
1564 | ||||
/* The number of symbols on the RHS of the reduced rule. | 1545 | 1565 | /* The number of symbols on the RHS of the reduced rule. | |
Keep to zero when no symbol should be popped. */ | 1546 | 1566 | Keep to zero when no symbol should be popped. */ | |
int yylen = 0; | 1547 | 1567 | int yylen = 0; | |
1548 | 1568 | |||
1569 | yytoken = 0; | |||
1570 | yyss = yyssa; | |||
1571 | yyvs = yyvsa; | |||
1572 | yyls = yylsa; | |||
1573 | yystacksize = YYINITDEPTH; | |||
1574 | ||||
YYDPRINTF ((stderr, "Starting parse\n")); | 1549 | 1575 | YYDPRINTF ((stderr, "Starting parse\n")); | |
1550 | 1576 | |||
yystate = 0; | 1551 | 1577 | yystate = 0; | |
yyerrstatus = 0; | 1552 | 1578 | yyerrstatus = 0; | |
yynerrs = 0; | 1553 | 1579 | yynerrs = 0; | |
yychar = YYEMPTY; /* Cause a token to be read. */ | 1554 | 1580 | yychar = YYEMPTY; /* Cause a token to be read. */ | |
1555 | 1581 | |||
/* Initialize stack pointers. | 1556 | 1582 | /* Initialize stack pointers. | |
Waste one element of value and location stack | 1557 | 1583 | Waste one element of value and location stack | |
so that they stay on the same level as the state stack. | 1558 | 1584 | so that they stay on the same level as the state stack. | |
The wasted elements are never initialized. */ | 1559 | 1585 | The wasted elements are never initialized. */ | |
1560 | ||||
yyssp = yyss; | 1561 | 1586 | yyssp = yyss; | |
yyvsp = yyvs; | 1562 | 1587 | yyvsp = yyvs; | |
yylsp = yyls; | 1563 | 1588 | yylsp = yyls; | |
#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL | 1564 | 1589 | ||
1590 | #if YYLTYPE_IS_TRIVIAL | |||
/* Initialize the default location before parsing starts. */ | 1565 | 1591 | /* Initialize the default location before parsing starts. */ | |
yylloc.first_line = yylloc.last_line = 1; | 1566 | 1592 | yylloc.first_line = yylloc.last_line = 1; | |
yylloc.first_column = yylloc.last_column = 0; | 1567 | 1593 | yylloc.first_column = yylloc.last_column = 1; | |
#endif | 1568 | 1594 | #endif | |
1569 | 1595 | |||
goto yysetstate; | 1570 | 1596 | goto yysetstate; | |
1571 | 1597 | |||
/*------------------------------------------------------------. | 1572 | 1598 | /*------------------------------------------------------------. | |
| yynewstate -- Push a new state, which is found in yystate. | | 1573 | 1599 | | yynewstate -- Push a new state, which is found in yystate. | | |
`------------------------------------------------------------*/ | 1574 | 1600 | `------------------------------------------------------------*/ | |
yynewstate: | 1575 | 1601 | yynewstate: | |
/* In all cases, when you get here, the value and location stacks | 1576 | 1602 | /* In all cases, when you get here, the value and location stacks | |
have just been pushed. So pushing a state here evens the stacks. */ | 1577 | 1603 | have just been pushed. So pushing a state here evens the stacks. */ | |
yyssp++; | 1578 | 1604 | yyssp++; | |
1579 | 1605 | |||
yysetstate: | 1580 | 1606 | yysetstate: | |
*yyssp = yystate; | 1581 | 1607 | *yyssp = yystate; | |
1582 | 1608 | |||
if (yyss + yystacksize - 1 <= yyssp) | 1583 | 1609 | if (yyss + yystacksize - 1 <= yyssp) | |
{ | 1584 | 1610 | { | |
/* Get the current used size of the three stacks, in elements. */ | 1585 | 1611 | /* Get the current used size of the three stacks, in elements. */ | |
YYSIZE_T yysize = yyssp - yyss + 1; | 1586 | 1612 | YYSIZE_T yysize = yyssp - yyss + 1; | |
1587 | 1613 | |||
#ifdef yyoverflow | 1588 | 1614 | #ifdef yyoverflow | |
{ | 1589 | 1615 | { | |
/* Give user a chance to reallocate the stack. Use copies of | 1590 | 1616 | /* Give user a chance to reallocate the stack. Use copies of | |
these so that the &'s don't force the real ones into | 1591 | 1617 | these so that the &'s don't force the real ones into | |
memory. */ | 1592 | 1618 | memory. */ | |
YYSTYPE *yyvs1 = yyvs; | 1593 | 1619 | YYSTYPE *yyvs1 = yyvs; | |
yytype_int16 *yyss1 = yyss; | 1594 | 1620 | yytype_int16 *yyss1 = yyss; | |
YYLTYPE *yyls1 = yyls; | 1595 | 1621 | YYLTYPE *yyls1 = yyls; | |
1596 | 1622 | |||
/* Each stack pointer address is followed by the size of the | 1597 | 1623 | /* Each stack pointer address is followed by the size of the | |
data in use in that stack, in bytes. This used to be a | 1598 | 1624 | data in use in that stack, in bytes. This used to be a | |
conditional around just the two extra args, but that might | 1599 | 1625 | conditional around just the two extra args, but that might | |
be undefined if yyoverflow is a macro. */ | 1600 | 1626 | be undefined if yyoverflow is a macro. */ | |
yyoverflow (YY_("memory exhausted"), | 1601 | 1627 | yyoverflow (YY_("memory exhausted"), | |
&yyss1, yysize * sizeof (*yyssp), | 1602 | 1628 | &yyss1, yysize * sizeof (*yyssp), | |
&yyvs1, yysize * sizeof (*yyvsp), | 1603 | 1629 | &yyvs1, yysize * sizeof (*yyvsp), | |
&yyls1, yysize * sizeof (*yylsp), | 1604 | 1630 | &yyls1, yysize * sizeof (*yylsp), | |
&yystacksize); | 1605 | 1631 | &yystacksize); | |
1632 | ||||
yyls = yyls1; | 1606 | 1633 | yyls = yyls1; | |
yyss = yyss1; | 1607 | 1634 | yyss = yyss1; | |
yyvs = yyvs1; | 1608 | 1635 | yyvs = yyvs1; | |
} | 1609 | 1636 | } | |
#else /* no yyoverflow */ | 1610 | 1637 | #else /* no yyoverflow */ | |
# ifndef YYSTACK_RELOCATE | 1611 | 1638 | # ifndef YYSTACK_RELOCATE | |
goto yyexhaustedlab; | 1612 | 1639 | goto yyexhaustedlab; | |
# else | 1613 | 1640 | # else | |
/* Extend the stack our own way. */ | 1614 | 1641 | /* Extend the stack our own way. */ | |
if (YYMAXDEPTH <= yystacksize) | 1615 | 1642 | if (YYMAXDEPTH <= yystacksize) | |
goto yyexhaustedlab; | 1616 | 1643 | goto yyexhaustedlab; | |
yystacksize *= 2; | 1617 | 1644 | yystacksize *= 2; | |
if (YYMAXDEPTH < yystacksize) | 1618 | 1645 | if (YYMAXDEPTH < yystacksize) | |
yystacksize = YYMAXDEPTH; | 1619 | 1646 | yystacksize = YYMAXDEPTH; | |
1620 | 1647 | |||
{ | 1621 | 1648 | { | |
yytype_int16 *yyss1 = yyss; | 1622 | 1649 | yytype_int16 *yyss1 = yyss; | |
union yyalloc *yyptr = | 1623 | 1650 | union yyalloc *yyptr = | |
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); | 1624 | 1651 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); | |
if (! yyptr) | 1625 | 1652 | if (! yyptr) | |
goto yyexhaustedlab; | 1626 | 1653 | goto yyexhaustedlab; | |
YYSTACK_RELOCATE (yyss); | 1627 | 1654 | YYSTACK_RELOCATE (yyss_alloc, yyss); | |
YYSTACK_RELOCATE (yyvs); | 1628 | 1655 | YYSTACK_RELOCATE (yyvs_alloc, yyvs); | |
YYSTACK_RELOCATE (yyls); | 1629 | 1656 | YYSTACK_RELOCATE (yyls_alloc, yyls); | |
# undef YYSTACK_RELOCATE | 1630 | 1657 | # undef YYSTACK_RELOCATE | |
if (yyss1 != yyssa) | 1631 | 1658 | if (yyss1 != yyssa) | |
YYSTACK_FREE (yyss1); | 1632 | 1659 | YYSTACK_FREE (yyss1); | |
} | 1633 | 1660 | } | |
# endif | 1634 | 1661 | # endif | |
#endif /* no yyoverflow */ | 1635 | 1662 | #endif /* no yyoverflow */ | |
1636 | 1663 | |||
yyssp = yyss + yysize - 1; | 1637 | 1664 | yyssp = yyss + yysize - 1; | |
yyvsp = yyvs + yysize - 1; | 1638 | 1665 | yyvsp = yyvs + yysize - 1; | |
yylsp = yyls + yysize - 1; | 1639 | 1666 | yylsp = yyls + yysize - 1; | |
1640 | 1667 | |||
YYDPRINTF ((stderr, "Stack size increased to %lu\n", | 1641 | 1668 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", | |
(unsigned long int) yystacksize)); | 1642 | 1669 | (unsigned long int) yystacksize)); | |
1643 | 1670 | |||
if (yyss + yystacksize - 1 <= yyssp) | 1644 | 1671 | if (yyss + yystacksize - 1 <= yyssp) | |
YYABORT; | 1645 | 1672 | YYABORT; | |
} | 1646 | 1673 | } | |
1647 | 1674 | |||
YYDPRINTF ((stderr, "Entering state %d\n", yystate)); | 1648 | 1675 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); | |
1649 | 1676 | |||
1677 | if (yystate == YYFINAL) | |||
1678 | YYACCEPT; | |||
1679 | ||||
goto yybackup; | 1650 | 1680 | goto yybackup; | |
1651 | 1681 | |||
/*-----------. | 1652 | 1682 | /*-----------. | |
| yybackup. | | 1653 | 1683 | | yybackup. | | |
`-----------*/ | 1654 | 1684 | `-----------*/ | |
yybackup: | 1655 | 1685 | yybackup: | |
1656 | 1686 | |||
/* Do appropriate processing given the current state. Read a | 1657 | 1687 | /* Do appropriate processing given the current state. Read a | |
look-ahead token if we need one and don't already have one. */ | 1658 | 1688 | lookahead token if we need one and don't already have one. */ | |
1659 | 1689 | |||
/* First try to decide what to do without reference to look-ahead token. */ | 1660 | 1690 | /* First try to decide what to do without reference to lookahead token. */ | |
yyn = yypact[yystate]; | 1661 | 1691 | yyn = yypact[yystate]; | |
if (yyn == YYPACT_NINF) | 1662 | 1692 | if (yyn == YYPACT_NINF) | |
goto yydefault; | 1663 | 1693 | goto yydefault; | |
1664 | 1694 | |||
/* Not known => get a look-ahead token if don't already have one. */ | 1665 | 1695 | /* Not known => get a lookahead token if don't already have one. */ | |
1666 | 1696 | |||
/* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ | 1667 | 1697 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ | |
if (yychar == YYEMPTY) | 1668 | 1698 | if (yychar == YYEMPTY) | |
{ | 1669 | 1699 | { | |
YYDPRINTF ((stderr, "Reading a token: ")); | 1670 | 1700 | YYDPRINTF ((stderr, "Reading a token: ")); | |
yychar = YYLEX; | 1671 | 1701 | yychar = YYLEX; | |
} | 1672 | 1702 | } | |
1673 | 1703 | |||
if (yychar <= YYEOF) | 1674 | 1704 | if (yychar <= YYEOF) | |
{ | 1675 | 1705 | { | |
yychar = yytoken = YYEOF; | 1676 | 1706 | yychar = yytoken = YYEOF; | |
YYDPRINTF ((stderr, "Now at end of input.\n")); | 1677 | 1707 | YYDPRINTF ((stderr, "Now at end of input.\n")); | |
} | 1678 | 1708 | } | |
else | 1679 | 1709 | else | |
{ | 1680 | 1710 | { | |
yytoken = YYTRANSLATE (yychar); | 1681 | 1711 | yytoken = YYTRANSLATE (yychar); | |
YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); | 1682 | 1712 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); | |
} | 1683 | 1713 | } | |
1684 | 1714 | |||
/* If the proper action on seeing token YYTOKEN is to reduce or to | 1685 | 1715 | /* If the proper action on seeing token YYTOKEN is to reduce or to | |
detect an error, take that action. */ | 1686 | 1716 | detect an error, take that action. */ | |
yyn += yytoken; | 1687 | 1717 | yyn += yytoken; | |
if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | 1688 | 1718 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | |
goto yydefault; | 1689 | 1719 | goto yydefault; | |
yyn = yytable[yyn]; | 1690 | 1720 | yyn = yytable[yyn]; | |
if (yyn <= 0) | 1691 | 1721 | if (yyn <= 0) | |
{ | 1692 | 1722 | { | |
if (yyn == 0 || yyn == YYTABLE_NINF) | 1693 | 1723 | if (yyn == 0 || yyn == YYTABLE_NINF) | |
goto yyerrlab; | 1694 | 1724 | goto yyerrlab; | |
yyn = -yyn; | 1695 | 1725 | yyn = -yyn; | |
goto yyreduce; | 1696 | 1726 | goto yyreduce; | |
} | 1697 | 1727 | } | |
1698 | 1728 | |||
if (yyn == YYFINAL) | 1699 | |||
YYACCEPT; | 1700 | |||
1701 | ||||
/* Count tokens shifted since error; after three, turn off error | 1702 | 1729 | /* Count tokens shifted since error; after three, turn off error | |
status. */ | 1703 | 1730 | status. */ | |
if (yyerrstatus) | 1704 | 1731 | if (yyerrstatus) | |
yyerrstatus--; | 1705 | 1732 | yyerrstatus--; | |
1706 | 1733 | |||
/* Shift the look-ahead token. */ | 1707 | 1734 | /* Shift the lookahead token. */ | |
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); | 1708 | 1735 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); | |
1709 | 1736 | |||
/* Discard the shifted token unless it is eof. */ | 1710 | 1737 | /* Discard the shifted token. */ | |
if (yychar != YYEOF) | 1711 | 1738 | yychar = YYEMPTY; | |
yychar = YYEMPTY; | 1712 | |||
1713 | 1739 | |||
yystate = yyn; | 1714 | 1740 | yystate = yyn; | |
*++yyvsp = yylval; | 1715 | 1741 | *++yyvsp = yylval; | |
*++yylsp = yylloc; | 1716 | 1742 | *++yylsp = yylloc; | |
goto yynewstate; | 1717 | 1743 | goto yynewstate; | |
1718 | 1744 | |||
1719 | 1745 | |||
/*-----------------------------------------------------------. | 1720 | 1746 | /*-----------------------------------------------------------. | |
| yydefault -- do the default action for the current state. | | 1721 | 1747 | | yydefault -- do the default action for the current state. | | |
`-----------------------------------------------------------*/ | 1722 | 1748 | `-----------------------------------------------------------*/ | |
yydefault: | 1723 | 1749 | yydefault: | |
yyn = yydefact[yystate]; | 1724 | 1750 | yyn = yydefact[yystate]; | |
if (yyn == 0) | 1725 | 1751 | if (yyn == 0) | |
goto yyerrlab; | 1726 | 1752 | goto yyerrlab; | |
goto yyreduce; | 1727 | 1753 | goto yyreduce; | |
1728 | 1754 | |||
1729 | 1755 | |||
/*-----------------------------. | 1730 | 1756 | /*-----------------------------. | |
| yyreduce -- Do a reduction. | | 1731 | 1757 | | yyreduce -- Do a reduction. | | |
`-----------------------------*/ | 1732 | 1758 | `-----------------------------*/ | |
yyreduce: | 1733 | 1759 | yyreduce: | |
/* yyn is the number of a rule to reduce with. */ | 1734 | 1760 | /* yyn is the number of a rule to reduce with. */ | |
yylen = yyr2[yyn]; | 1735 | 1761 | yylen = yyr2[yyn]; | |
1736 | 1762 | |||
/* If YYLEN is nonzero, implement the default value of the action: | 1737 | 1763 | /* If YYLEN is nonzero, implement the default value of the action: | |
`$$ = $1'. | 1738 | 1764 | `$$ = $1'. | |
1739 | 1765 | |||
Otherwise, the following line sets YYVAL to garbage. | 1740 | 1766 | Otherwise, the following line sets YYVAL to garbage. | |
This behavior is undocumented and Bison | 1741 | 1767 | This behavior is undocumented and Bison | |
users should not rely upon it. Assigning to YYVAL | 1742 | 1768 | users should not rely upon it. Assigning to YYVAL | |
unconditionally makes the parser a bit smaller, and it avoids a | 1743 | 1769 | unconditionally makes the parser a bit smaller, and it avoids a | |
GCC warning that YYVAL may be used uninitialized. */ | 1744 | 1770 | GCC warning that YYVAL may be used uninitialized. */ | |
yyval = yyvsp[1-yylen]; | 1745 | 1771 | yyval = yyvsp[1-yylen]; | |
1746 | 1772 | |||
/* Default location. */ | 1747 | 1773 | /* Default location. */ | |
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); | 1748 | 1774 | YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); | |
YY_REDUCE_PRINT (yyn); | 1749 | 1775 | YY_REDUCE_PRINT (yyn); | |
switch (yyn) | 1750 | 1776 | switch (yyn) | |
{ | 1751 | 1777 | { | |
case 2: | 1752 | 1778 | case 2: | |
1779 | ||||
1780 | /* Line 1455 of yacc.c */ | |||
#line 135 "parser.y" | 1753 | 1781 | #line 135 "parser.y" | |
{ | 1754 | 1782 | { | |
(yylsp[(1) - (1)]); | 1755 | 1783 | (yylsp[(1) - (1)]); | |
/* pp2: The @1 is needed to convince | 1756 | 1784 | /* pp2: The @1 is needed to convince | |
* yacc to set up yylloc. You can remove | 1757 | 1785 | * yacc to set up yylloc. You can remove | |
* it once you have other uses of @n*/ | 1758 | 1786 | * it once you have other uses of @n*/ | |
Program *program = new Program((yyvsp[(1) - (1)].declList)); | 1759 | 1787 | Program *program = new Program((yyvsp[(1) - (1)].declList)); | |
// if no errors, advance to next phase | 1760 | 1788 | // if no errors, advance to next phase | |
if (ReportError::NumErrors() == 0) { | 1761 | 1789 | if (ReportError::NumErrors() == 0) { | |
if ( IsDebugOn("dumpAST") ) { | 1762 | 1790 | if ( IsDebugOn("dumpAST") ) { | |
program->Print(0); | 1763 | 1791 | program->Print(0); | |
} | 1764 | 1792 | } | |
program->Emit(); | 1765 | 1793 | program->Emit(); | |
} | 1766 | 1794 | } | |
} | 1767 | 1795 | } | |
break; | 1768 | 1796 | break; | |
1769 | 1797 | |||
case 3: | 1770 | 1798 | case 3: | |
1799 | ||||
1800 | /* Line 1455 of yacc.c */ | |||
#line 151 "parser.y" | 1771 | 1801 | #line 151 "parser.y" | |
{ ((yyval.declList)=(yyvsp[(1) - (2)].declList))->Append((yyvsp[(2) - (2)].decl)); } | 1772 | 1802 | { ((yyval.declList)=(yyvsp[(1) - (2)].declList))->Append((yyvsp[(2) - (2)].decl)); } | |
break; | 1773 | 1803 | break; | |
1774 | 1804 | |||
case 4: | 1775 | 1805 | case 4: | |
1806 | ||||
1807 | /* Line 1455 of yacc.c */ | |||
#line 152 "parser.y" | 1776 | 1808 | #line 152 "parser.y" | |
{ ((yyval.declList) = new List<Decl*>)->Append((yyvsp[(1) - (1)].decl)); } | 1777 | 1809 | { ((yyval.declList) = new List<Decl*>)->Append((yyvsp[(1) - (1)].decl)); } | |
break; | 1778 | 1810 | break; | |
1779 | 1811 | |||
case 5: | 1780 | 1812 | case 5: | |
1813 | ||||
1814 | /* Line 1455 of yacc.c */ | |||
#line 163 "parser.y" | 1781 | 1815 | #line 163 "parser.y" | |
{ (yyval.decl) = (yyvsp[(1) - (1)].decl); } | 1782 | 1816 | { (yyval.decl) = (yyvsp[(1) - (1)].decl); } | |
break; | 1783 | 1817 | break; | |
1784 | 1818 | |||
case 6: | 1785 | 1819 | case 6: | |
1820 | ||||
1821 | /* Line 1455 of yacc.c */ | |||
#line 164 "parser.y" | 1786 | 1822 | #line 164 "parser.y" | |
{ (yyvsp[(1) - (2)].funcDecl)->SetFunctionBody((yyvsp[(2) - (2)].stmt)); (yyval.decl) = (yyvsp[(1) - (2)].funcDecl); } | 1787 | 1823 | { (yyvsp[(1) - (2)].funcDecl)->SetFunctionBody((yyvsp[(2) - (2)].stmt)); (yyval.decl) = (yyvsp[(1) - (2)].funcDecl); } | |
break; | 1788 | 1824 | break; | |
1789 | 1825 | |||
case 7: | 1790 | 1826 | case 7: | |
1827 | ||||
1828 | /* Line 1455 of yacc.c */ | |||
#line 175 "parser.y" | 1791 | 1829 | #line 175 "parser.y" | |
{ (yyval.decl) = (yyvsp[(1) - (2)].funcDecl); } | 1792 | 1830 | { (yyval.decl) = (yyvsp[(1) - (2)].funcDecl); } | |
break; | 1793 | 1831 | break; | |
1794 | 1832 | |||
case 8: | 1795 | 1833 | case 8: | |
1834 | ||||
1835 | /* Line 1455 of yacc.c */ | |||
#line 176 "parser.y" | 1796 | 1836 | #line 176 "parser.y" | |
{ (yyval.decl) = (yyvsp[(1) - (2)].varDecl); } | 1797 | 1837 | { (yyval.decl) = (yyvsp[(1) - (2)].varDecl); } | |
break; | 1798 | 1838 | break; | |
1799 | 1839 | |||
case 9: | 1800 | 1840 | case 9: | |
1841 | ||||
1842 | /* Line 1455 of yacc.c */ | |||
#line 180 "parser.y" | 1801 | 1843 | #line 180 "parser.y" | |
{ | 1802 | 1844 | { | |
Identifier *id = new Identifier(yylloc, (const char *)(yyvsp[(2) - (4)].identifier)); | 1803 | 1845 | Identifier *id = new Identifier(yylloc, (const char *)(yyvsp[(2) - (4)].identifier)); | |
List<VarDecl *> *formals = new List<VarDecl *>; | 1804 | 1846 | List<VarDecl *> *formals = new List<VarDecl *>; | |
(yyval.funcDecl) = new FnDecl(id, (yyvsp[(1) - (4)].typeDecl), formals); | 1805 | 1847 | (yyval.funcDecl) = new FnDecl(id, (yyvsp[(1) - (4)].typeDecl), formals); | |
} | 1806 | 1848 | } | |
break; | 1807 | 1849 | break; | |
1808 | 1850 | |||
case 10: | 1809 | 1851 | case 10: | |
1852 | ||||
1853 | /* Line 1455 of yacc.c */ | |||
#line 186 "parser.y" | 1810 | 1854 | #line 186 "parser.y" | |
{ | 1811 | 1855 | { | |
Identifier *id = new Identifier(yylloc, (const char *)(yyvsp[(2) - (5)].identifier)); | 1812 | 1856 | Identifier *id = new Identifier(yylloc, (const char *)(yyvsp[(2) - (5)].identifier)); | |
(yyval.funcDecl) = new FnDecl(id, (yyvsp[(1) - (5)].typeDecl), (yyvsp[(4) - (5)].varDeclList)); | 1813 | 1857 | (yyval.funcDecl) = new FnDecl(id, (yyvsp[(1) - (5)].typeDecl), (yyvsp[(4) - (5)].varDeclList)); | |
} | 1814 | 1858 | } | |
break; | 1815 | 1859 | break; | |
1816 | 1860 | |||
case 11: | 1817 | 1861 | case 11: | |
1862 | ||||
1863 | /* Line 1455 of yacc.c */ | |||
#line 192 "parser.y" | 1818 | 1864 | #line 192 "parser.y" | |
{ ((yyval.varDeclList) = new List<VarDecl *>)->Append((yyvsp[(1) - (1)].varDecl)); } | 1819 | 1865 | { ((yyval.varDeclList) = new List<VarDecl *>)->Append((yyvsp[(1) - (1)].varDecl)); } | |
break; | 1820 | 1866 | break; | |
1821 | 1867 | |||
case 12: | 1822 | 1868 | case 12: | |
1869 | ||||
1870 | /* Line 1455 of yacc.c */ | |||
#line 193 "parser.y" | 1823 | 1871 | #line 193 "parser.y" | |
{ ((yyval.varDeclList) = (yyvsp[(1) - (3)].varDeclList))->Append((yyvsp[(3) - (3)].varDecl)); } | 1824 | 1872 | { ((yyval.varDeclList) = (yyvsp[(1) - (3)].varDeclList))->Append((yyvsp[(3) - (3)].varDecl)); } | |
break; | 1825 | 1873 | break; | |
1826 | 1874 | |||
case 13: | 1827 | 1875 | case 13: | |
1876 | ||||
1877 | /* Line 1455 of yacc.c */ | |||
#line 197 "parser.y" | 1828 | 1878 | #line 197 "parser.y" | |
{ | 1829 | 1879 | { | |
Identifier *id = new Identifier(yylloc, (const char *)(yyvsp[(2) - (2)].identifier)); | 1830 | 1880 | Identifier *id = new Identifier(yylloc, (const char *)(yyvsp[(2) - (2)].identifier)); | |
(yyval.varDecl) = new VarDecl(id, (yyvsp[(1) - (2)].typeDecl)); | 1831 | 1881 | (yyval.varDecl) = new VarDecl(id, (yyvsp[(1) - (2)].typeDecl)); | |
} | 1832 | 1882 | } | |
break; | 1833 | 1883 | break; | |
1834 | 1884 | |||
case 14: | 1835 | 1885 | case 14: | |
1886 | ||||
1887 | /* Line 1455 of yacc.c */ | |||
#line 202 "parser.y" | 1836 | 1888 | #line 202 "parser.y" | |
{ | 1837 | 1889 | { | |
Identifier *id = new Identifier(yylloc, (const char *)(yyvsp[(3) - (3)].identifier)); | 1838 | 1890 | Identifier *id = new Identifier(yylloc, (const char *)(yyvsp[(3) - (3)].identifier)); | |
(yyval.varDecl) = new VarDecl(id, (yyvsp[(2) - (3)].typeDecl), (yyvsp[(1) - (3)].typeQualifier)); | 1839 | 1891 | (yyval.varDecl) = new VarDecl(id, (yyvsp[(2) - (3)].typeDecl), (yyvsp[(1) - (3)].typeQualifier)); | |
} | 1840 | 1892 | } | |
break; | 1841 | 1893 | break; | |
1842 | 1894 | |||
case 15: | 1843 | 1895 | case 15: | |
1896 | ||||
1897 | /* Line 1455 of yacc.c */ | |||
#line 207 "parser.y" | 1844 | 1898 | #line 207 "parser.y" | |
{ | 1845 | 1899 | { | |
// incomplete: drop the initializer here | 1846 | 1900 | // incomplete: drop the initializer here | |
Identifier *id = new Identifier(yylloc, (const char *)(yyvsp[(2) - (4)].identifier)); | 1847 | 1901 | Identifier *id = new Identifier(yylloc, (const char *)(yyvsp[(2) - (4)].identifier)); | |
(yyval.varDecl) = new VarDecl(id, (yyvsp[(1) - (4)].typeDecl), (yyvsp[(4) - (4)].expression)); | 1848 | 1902 | (yyval.varDecl) = new VarDecl(id, (yyvsp[(1) - (4)].typeDecl), (yyvsp[(4) - (4)].expression)); | |
} | 1849 | 1903 | } | |
break; | 1850 | 1904 | break; | |
1851 | 1905 | |||
case 16: | 1852 | 1906 | case 16: | |
1907 | ||||
1908 | /* Line 1455 of yacc.c */ | |||
#line 213 "parser.y" | 1853 | 1909 | #line 213 "parser.y" | |
{ | 1854 | 1910 | { | |
Identifier *id = new Identifier(yylloc, (const char *)(yyvsp[(3) - (5)].identifier)); | 1855 | 1911 | Identifier *id = new Identifier(yylloc, (const char *)(yyvsp[(3) - (5)].identifier)); | |
(yyval.varDecl) = new VarDecl(id, (yyvsp[(2) - (5)].typeDecl), (yyvsp[(1) - (5)].typeQualifier), (yyvsp[(5) - (5)].expression)); | 1856 | 1912 | (yyval.varDecl) = new VarDecl(id, (yyvsp[(2) - (5)].typeDecl), (yyvsp[(1) - (5)].typeQualifier), (yyvsp[(5) - (5)].expression)); | |
} | 1857 | 1913 | } | |
break; | 1858 | 1914 | break; | |
1859 | 1915 | |||
case 17: | 1860 | 1916 | case 17: | |
1917 | ||||
1918 | /* Line 1455 of yacc.c */ | |||
#line 218 "parser.y" | 1861 | 1919 | #line 218 "parser.y" | |
{ | 1862 | 1920 | { | |
Identifier *id = new Identifier((yylsp[(2) - (5)]), (const char *)(yyvsp[(2) - (5)].identifier)); | 1863 | 1921 | Identifier *id = new Identifier((yylsp[(2) - (5)]), (const char *)(yyvsp[(2) - (5)].identifier)); | |
(yyval.varDecl) = new VarDecl(id, new ArrayType((yylsp[(1) - (5)]), (yyvsp[(1) - (5)].typeDecl), (yyvsp[(4) - (5)].integerConstant))); | 1864 | 1922 | (yyval.varDecl) = new VarDecl(id, new ArrayType((yylsp[(1) - (5)]), (yyvsp[(1) - (5)].typeDecl), (yyvsp[(4) - (5)].integerConstant))); | |
} | 1865 | 1923 | } | |
break; | 1866 | 1924 | break; | |
1867 | 1925 | |||
case 18: | 1868 | 1926 | case 18: | |
1927 | ||||
1928 | /* Line 1455 of yacc.c */ | |||
#line 223 "parser.y" | 1869 | 1929 | #line 223 "parser.y" | |
{ | 1870 | 1930 | { | |
Identifier *id = new Identifier((yylsp[(3) - (6)]), (yyvsp[(3) - (6)].identifier)); | 1871 | 1931 | Identifier *id = new Identifier((yylsp[(3) - (6)]), (yyvsp[(3) - (6)].identifier)); | |
(yyval.varDecl) = new VarDecl(id, new ArrayType((yylsp[(2) - (6)]), (yyvsp[(2) - (6)].typeDecl), (yyvsp[(5) - (6)].integerConstant)), (yyvsp[(1) - (6)].typeQualifier)); | 1872 | 1932 | (yyval.varDecl) = new VarDecl(id, new ArrayType((yylsp[(2) - (6)]), (yyvsp[(2) - (6)].typeDecl), (yyvsp[(5) - (6)].integerConstant)), (yyvsp[(1) - (6)].typeQualifier)); | |
} | 1873 | 1933 | } | |
break; | 1874 | 1934 | break; | |
1875 | 1935 | |||
case 19: | 1876 | 1936 | case 19: | |
1937 | ||||
1938 | /* Line 1455 of yacc.c */ | |||
#line 230 "parser.y" | 1877 | 1939 | #line 230 "parser.y" | |
{ (yyval.expression) = (yyvsp[(1) - (1)].expression); } | 1878 | 1940 | { (yyval.expression) = (yyvsp[(1) - (1)].expression); } | |
break; | 1879 | 1941 | break; | |
1880 | 1942 | |||
case 20: | 1881 | 1943 | case 20: | |
1944 | ||||
1945 | /* Line 1455 of yacc.c */ | |||
#line 233 "parser.y" | 1882 | 1946 | #line 233 "parser.y" | |
{(yyval.typeQualifier) = TypeQualifier::inTypeQualifier;} | 1883 | 1947 | {(yyval.typeQualifier) = TypeQualifier::inTypeQualifier;} | |
break; | 1884 | 1948 | break; | |
1885 | 1949 | |||
case 21: | 1886 | 1950 | case 21: | |
1951 | ||||
1952 | /* Line 1455 of yacc.c */ | |||
#line 234 "parser.y" | 1887 | 1953 | #line 234 "parser.y" | |
{(yyval.typeQualifier) = TypeQualifier::outTypeQualifier;} | 1888 | 1954 | {(yyval.typeQualifier) = TypeQualifier::outTypeQualifier;} | |
break; | 1889 | 1955 | break; | |
1890 | 1956 | |||
case 22: | 1891 | 1957 | case 22: | |
1958 | ||||
1959 | /* Line 1455 of yacc.c */ | |||
#line 235 "parser.y" | 1892 | 1960 | #line 235 "parser.y" | |
{(yyval.typeQualifier) = TypeQualifier::constTypeQualifier;} | 1893 | 1961 | {(yyval.typeQualifier) = TypeQualifier::constTypeQualifier;} | |
break; | 1894 | 1962 | break; | |
1895 | 1963 | |||
case 23: | 1896 | 1964 | case 23: | |
1965 | ||||
1966 | /* Line 1455 of yacc.c */ | |||
#line 236 "parser.y" | 1897 | 1967 | #line 236 "parser.y" | |
{(yyval.typeQualifier) = TypeQualifier::uniformTypeQualifier;} | 1898 | 1968 | {(yyval.typeQualifier) = TypeQualifier::uniformTypeQualifier;} | |
break; | 1899 | 1969 | break; | |
1900 | 1970 | |||
case 24: | 1901 | 1971 | case 24: | |
1972 | ||||
1973 | /* Line 1455 of yacc.c */ | |||
#line 239 "parser.y" | 1902 | 1974 | #line 239 "parser.y" | |
{ (yyval.typeDecl) = Type::intType; } | 1903 | 1975 | { (yyval.typeDecl) = Type::intType; } | |
break; | 1904 | 1976 | break; | |
1905 | 1977 | |||
case 25: | 1906 | 1978 | case 25: | |
1979 | ||||
1980 | /* Line 1455 of yacc.c */ | |||
#line 240 "parser.y" | 1907 | 1981 | #line 240 "parser.y" | |
{ (yyval.typeDecl) = Type::voidType; } | 1908 | 1982 | { (yyval.typeDecl) = Type::voidType; } | |
break; | 1909 | 1983 | break; | |
1910 | 1984 | |||
case 26: | 1911 | 1985 | case 26: | |
1986 | ||||
1987 | /* Line 1455 of yacc.c */ | |||
#line 241 "parser.y" | 1912 | 1988 | #line 241 "parser.y" | |
{ (yyval.typeDecl) = Type::floatType; } | 1913 | 1989 | { (yyval.typeDecl) = Type::floatType; } | |
break; | 1914 | 1990 | break; | |
1915 | 1991 | |||
case 27: | 1916 | 1992 | case 27: | |
1993 | ||||
1994 | /* Line 1455 of yacc.c */ | |||
#line 242 "parser.y" | 1917 | 1995 | #line 242 "parser.y" | |
{ (yyval.typeDecl) = Type::boolType; } | 1918 | 1996 | { (yyval.typeDecl) = Type::boolType; } | |
break; | 1919 | 1997 | break; | |
1920 | 1998 | |||
case 28: | 1921 | 1999 | case 28: | |
2000 | ||||
2001 | /* Line 1455 of yacc.c */ | |||
#line 243 "parser.y" | 1922 | 2002 | #line 243 "parser.y" | |
{ (yyval.typeDecl) = Type::vec2Type; } | 1923 | 2003 | { (yyval.typeDecl) = Type::vec2Type; } | |
break; | 1924 | 2004 | break; | |
1925 | 2005 | |||
case 29: | 1926 | 2006 | case 29: | |
2007 | ||||
2008 | /* Line 1455 of yacc.c */ | |||
#line 244 "parser.y" | 1927 | 2009 | #line 244 "parser.y" | |
{ (yyval.typeDecl) = Type::vec3Type; } | 1928 | 2010 | { (yyval.typeDecl) = Type::vec3Type; } | |
break; | 1929 | 2011 | break; | |
1930 | 2012 | |||
case 30: | 1931 | 2013 | case 30: | |
2014 | ||||
2015 | /* Line 1455 of yacc.c */ | |||
#line 245 "parser.y" | 1932 | 2016 | #line 245 "parser.y" | |
{ (yyval.typeDecl) = Type::vec4Type; } | 1933 | 2017 | { (yyval.typeDecl) = Type::vec4Type; } | |
break; | 1934 | 2018 | break; | |
1935 | 2019 | |||
case 31: | 1936 | 2020 | case 31: | |
2021 | ||||
2022 | /* Line 1455 of yacc.c */ | |||
#line 246 "parser.y" | 1937 | 2023 | #line 246 "parser.y" | |
{ (yyval.typeDecl) = Type::mat2Type; } | 1938 | 2024 | { (yyval.typeDecl) = Type::mat2Type; } | |
break; | 1939 | 2025 | break; | |
1940 | 2026 | |||
case 32: | 1941 | 2027 | case 32: | |
2028 | ||||
2029 | /* Line 1455 of yacc.c */ | |||
#line 247 "parser.y" | 1942 | 2030 | #line 247 "parser.y" | |
{ (yyval.typeDecl) = Type::mat3Type; } | 1943 | 2031 | { (yyval.typeDecl) = Type::mat3Type; } | |
break; | 1944 | 2032 | break; | |
1945 | 2033 | |||
case 33: | 1946 | 2034 | case 33: | |
2035 | ||||
2036 | /* Line 1455 of yacc.c */ | |||
#line 248 "parser.y" | 1947 | 2037 | #line 248 "parser.y" | |
{ (yyval.typeDecl) = Type::mat4Type; } | 1948 | 2038 | { (yyval.typeDecl) = Type::mat4Type; } | |
break; | 1949 | 2039 | break; | |
1950 | 2040 | |||
case 34: | 1951 | 2041 | case 34: | |
2042 | ||||
2043 | /* Line 1455 of yacc.c */ | |||
#line 251 "parser.y" | 1952 | 2044 | #line 251 "parser.y" | |
{ (yyval.stmt) = new StmtBlock(new List<VarDecl*>, new List<Stmt *>); } | 1953 | 2045 | { (yyval.stmt) = new StmtBlock(new List<VarDecl*>, new List<Stmt *>); } | |
break; | 1954 | 2046 | break; | |
1955 | 2047 | |||
case 35: | 1956 | 2048 | case 35: | |
2049 | ||||
2050 | /* Line 1455 of yacc.c */ | |||
#line 252 "parser.y" | 1957 | 2051 | #line 252 "parser.y" | |
{ (yyval.stmt) = new StmtBlock(new List<VarDecl*>, (yyvsp[(2) - (3)].stmtList)); } | 1958 | 2052 | { (yyval.stmt) = new StmtBlock(new List<VarDecl*>, (yyvsp[(2) - (3)].stmtList)); } | |
break; | 1959 | 2053 | break; | |
1960 | 2054 | |||
case 36: | 1961 | 2055 | case 36: | |
2056 | ||||
2057 | /* Line 1455 of yacc.c */ | |||
#line 255 "parser.y" | 1962 | 2058 | #line 255 "parser.y" | |
{ ((yyval.stmtList) = new List<Stmt*>)->Append((yyvsp[(1) - (1)].stmt)); } | 1963 | 2059 | { ((yyval.stmtList) = new List<Stmt*>)->Append((yyvsp[(1) - (1)].stmt)); } | |
break; | 1964 | 2060 | break; | |
1965 | 2061 | |||
case 37: | 1966 | 2062 | case 37: | |
2063 | ||||
2064 | /* Line 1455 of yacc.c */ | |||
#line 256 "parser.y" | 1967 | 2065 | #line 256 "parser.y" | |
{ ((yyval.stmtList) = (yyvsp[(1) - (2)].stmtList))->Append((yyvsp[(2) - (2)].stmt)); } | 1968 | 2066 | { ((yyval.stmtList) = (yyvsp[(1) - (2)].stmtList))->Append((yyvsp[(2) - (2)].stmt)); } | |
break; | 1969 | 2067 | break; | |
1970 | 2068 | |||
case 38: | 1971 | 2069 | case 38: | |
2070 | ||||
2071 | /* Line 1455 of yacc.c */ | |||
#line 259 "parser.y" | 1972 | 2072 | #line 259 "parser.y" | |
{ (yyval.stmt) = (yyvsp[(1) - (1)].stmt); } | 1973 | 2073 | { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); } | |
break; | 1974 | 2074 | break; | |
1975 | 2075 | |||
case 39: | 1976 | 2076 | case 39: | |
2077 | ||||
2078 | /* Line 1455 of yacc.c */ | |||
#line 260 "parser.y" | 1977 | 2079 | #line 260 "parser.y" | |
{ (yyval.stmt) = (yyvsp[(1) - (1)].stmt); } | 1978 | 2080 | { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); } | |
break; | 1979 | 2081 | break; | |
1980 | 2082 | |||
case 40: | 1981 | 2083 | case 40: | |
2084 | ||||
2085 | /* Line 1455 of yacc.c */ | |||
#line 263 "parser.y" | 1982 | 2086 | #line 263 "parser.y" | |
{ (yyval.stmt) = new EmptyExpr(); } | 1983 | 2087 | { (yyval.stmt) = new EmptyExpr(); } | |
break; | 1984 | 2088 | break; | |
1985 | 2089 | |||
case 41: | 1986 | 2090 | case 41: | |
2091 | ||||
2092 | /* Line 1455 of yacc.c */ | |||
#line 265 "parser.y" | 1987 | 2093 | #line 265 "parser.y" | |
{ | 1988 | 2094 | { | |
(yyval.stmt) = new DeclStmt((yyvsp[(1) - (2)].varDecl)); | 1989 | 2095 | (yyval.stmt) = new DeclStmt((yyvsp[(1) - (2)].varDecl)); | |
} | 1990 | 2096 | } | |
break; | 1991 | 2097 | break; | |
1992 | 2098 | |||
case 42: | 1993 | 2099 | case 42: | |
2100 | ||||
2101 | /* Line 1455 of yacc.c */ | |||
#line 268 "parser.y" | 1994 | 2102 | #line 268 "parser.y" | |
{ (yyval.stmt) = (yyvsp[(1) - (2)].expression); } | 1995 | 2103 | { (yyval.stmt) = (yyvsp[(1) - (2)].expression); } | |
break; | 1996 | 2104 | break; | |
1997 | 2105 | |||
case 43: | 1998 | 2106 | case 43: | |
2107 | ||||
2108 | /* Line 1455 of yacc.c */ | |||
#line 269 "parser.y" | 1999 | 2109 | #line 269 "parser.y" | |
{ (yyval.stmt) = (yyvsp[(1) - (1)].stmt); } | 2000 | 2110 | { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); } | |
break; | 2001 | 2111 | break; | |
2002 | 2112 | |||
case 44: | 2003 | 2113 | case 44: | |
2114 | ||||
2115 | /* Line 1455 of yacc.c */ | |||
#line 270 "parser.y" | 2004 | 2116 | #line 270 "parser.y" | |
{ (yyval.stmt) = (yyvsp[(1) - (1)].stmt); } | 2005 | 2117 | { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); } | |
break; | 2006 | 2118 | break; | |
2007 | 2119 | |||
case 45: | 2008 | 2120 | case 45: | |
2121 | ||||
2122 | /* Line 1455 of yacc.c */ | |||
#line 271 "parser.y" | 2009 | 2123 | #line 271 "parser.y" | |
{ (yyval.stmt) = (yyvsp[(1) - (1)].stmt); } | 2010 | 2124 | { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); } | |
break; | 2011 | 2125 | break; | |
2012 | 2126 | |||
case 46: | 2013 | 2127 | case 46: | |
2128 | ||||
2129 | /* Line 1455 of yacc.c */ | |||
#line 272 "parser.y" | 2014 | 2130 | #line 272 "parser.y" | |
{ (yyval.stmt) = (yyvsp[(1) - (1)].stmt); } | 2015 | 2131 | { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); } | |
break; | 2016 | 2132 | break; | |
2017 | 2133 | |||
case 47: | 2018 | 2134 | case 47: | |
2135 | ||||
2136 | /* Line 1455 of yacc.c */ | |||
#line 273 "parser.y" | 2019 | 2137 | #line 273 "parser.y" | |
{ (yyval.stmt) = (yyvsp[(1) - (1)].stmt); } | 2020 | 2138 | { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); } | |
break; | 2021 | 2139 | break; | |
2022 | 2140 | |||
case 48: | 2023 | 2141 | case 48: | |
2142 | ||||
2143 | /* Line 1455 of yacc.c */ | |||
#line 274 "parser.y" | 2024 | 2144 | #line 274 "parser.y" | |
{ (yyval.stmt) = (yyvsp[(1) - (1)].stmt); } | 2025 | 2145 | { (yyval.stmt) = (yyvsp[(1) - (1)].stmt); } | |
break; | 2026 | 2146 | break; | |
2027 | 2147 | |||
case 49: | 2028 | 2148 | case 49: | |
2149 | ||||
2150 | /* Line 1455 of yacc.c */ | |||
#line 278 "parser.y" | 2029 | 2151 | #line 278 "parser.y" | |
{ | 2030 | 2152 | { | |
(yyval.stmt) = new IfStmt((yyvsp[(3) - (7)].expression), (yyvsp[(5) - (7)].stmt), (yyvsp[(7) - (7)].stmt)); | 2031 | 2153 | (yyval.stmt) = new IfStmt((yyvsp[(3) - (7)].expression), (yyvsp[(5) - (7)].stmt), (yyvsp[(7) - (7)].stmt)); | |
} | 2032 | 2154 | } | |
break; | 2033 | 2155 | break; | |
2034 | 2156 | |||
case 50: | 2035 | 2157 | case 50: | |
2158 | ||||
2159 | /* Line 1455 of yacc.c */ | |||
#line 282 "parser.y" | 2036 | 2160 | #line 282 "parser.y" | |
{ | 2037 | 2161 | { | |
(yyval.stmt) = new IfStmt((yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].stmt), NULL); | 2038 | 2162 | (yyval.stmt) = new IfStmt((yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].stmt), NULL); | |
} | 2039 | 2163 | } | |
break; | 2040 | 2164 | break; | |
2041 | 2165 | |||
case 51: | 2042 | 2166 | case 51: | |
2167 | ||||
2168 | /* Line 1455 of yacc.c */ | |||
#line 288 "parser.y" | 2043 | 2169 | #line 288 "parser.y" | |
{ | 2044 | 2170 | { | |
(yyval.stmt) = new SwitchStmt((yyvsp[(3) - (7)].expression), (yyvsp[(6) - (7)].stmtList), NULL); | 2045 | 2171 | (yyval.stmt) = new SwitchStmt((yyvsp[(3) - (7)].expression), (yyvsp[(6) - (7)].stmtList), NULL); | |
} | 2046 | 2172 | } | |
break; | 2047 | 2173 | break; | |
2048 | 2174 | |||
case 52: | 2049 | 2175 | case 52: | |
2176 | ||||
2177 | /* Line 1455 of yacc.c */ | |||
#line 292 "parser.y" | 2050 | 2178 | #line 292 "parser.y" | |
{ (yyval.stmt) = new Case((yyvsp[(2) - (4)].expression), (yyvsp[(4) - (4)].stmt)); } | 2051 | 2179 | { (yyval.stmt) = new Case((yyvsp[(2) - (4)].expression), (yyvsp[(4) - (4)].stmt)); } | |
break; | 2052 | 2180 | break; | |
2053 | 2181 | |||
case 53: | 2054 | 2182 | case 53: | |
2183 | ||||
2184 | /* Line 1455 of yacc.c */ | |||
#line 293 "parser.y" | 2055 | 2185 | #line 293 "parser.y" | |
{ (yyval.stmt) = new Default((yyvsp[(3) - (3)].stmt)); } | 2056 | 2186 | { (yyval.stmt) = new Default((yyvsp[(3) - (3)].stmt)); } | |
break; | 2057 | 2187 | break; | |
2058 | 2188 | |||
case 54: | 2059 | 2189 | case 54: | |
2190 | ||||
2191 | /* Line 1455 of yacc.c */ | |||
#line 296 "parser.y" | 2060 | 2192 | #line 296 "parser.y" | |
{ (yyval.stmt) = new BreakStmt(yylloc); } | 2061 | 2193 | { (yyval.stmt) = new BreakStmt(yylloc); } | |
break; | 2062 | 2194 | break; | |
2063 | 2195 | |||
case 55: | 2064 | 2196 | case 55: | |
2197 | ||||
2198 | /* Line 1455 of yacc.c */ | |||
#line 297 "parser.y" | 2065 | 2199 | #line 297 "parser.y" | |
{ (yyval.stmt) = new ContinueStmt(yylloc); } | 2066 | 2200 | { (yyval.stmt) = new ContinueStmt(yylloc); } | |
break; | 2067 | 2201 | break; | |
2068 | 2202 | |||
case 56: | 2069 | 2203 | case 56: | |
2204 | ||||
2205 | /* Line 1455 of yacc.c */ | |||
#line 298 "parser.y" | 2070 | 2206 | #line 298 "parser.y" | |
{ (yyval.stmt) = new ReturnStmt(yylloc); } | 2071 | 2207 | { (yyval.stmt) = new ReturnStmt(yylloc); } | |
break; | 2072 | 2208 | break; | |
2073 | 2209 | |||
case 57: | 2074 | 2210 | case 57: | |
2211 | ||||
2212 | /* Line 1455 of yacc.c */ | |||
#line 299 "parser.y" | 2075 | 2213 | #line 299 "parser.y" | |
{ (yyval.stmt) = new ReturnStmt(yyloc, (yyvsp[(2) - (3)].expression)); } | 2076 | 2214 | { (yyval.stmt) = new ReturnStmt(yyloc, (yyvsp[(2) - (3)].expression)); } | |
break; | 2077 | 2215 | break; | |
2078 | 2216 | |||
case 58: | 2079 | 2217 | case 58: | |
2218 | ||||
2219 | /* Line 1455 of yacc.c */ | |||
#line 302 "parser.y" | 2080 | 2220 | #line 302 "parser.y" | |
{ (yyval.stmt) = new WhileStmt((yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].stmt)); } | 2081 | 2221 | { (yyval.stmt) = new WhileStmt((yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].stmt)); } | |
break; | 2082 | 2222 | break; | |
2083 | 2223 | |||
case 59: | 2084 | 2224 | case 59: | |
2225 | ||||
2226 | /* Line 1455 of yacc.c */ | |||
#line 306 "parser.y" | 2085 | 2227 | #line 306 "parser.y" | |
{ | 2086 | 2228 | { | |
(yyval.stmt) = new ForStmt((yyvsp[(3) - (9)].expression), (yyvsp[(5) - (9)].expression), (yyvsp[(7) - (9)].expression), (yyvsp[(9) - (9)].stmt)); | 2087 | 2229 | (yyval.stmt) = new ForStmt((yyvsp[(3) - (9)].expression), (yyvsp[(5) - (9)].expression), (yyvsp[(7) - (9)].expression), (yyvsp[(9) - (9)].stmt)); | |
} | 2088 | 2230 | } | |
break; | 2089 | 2231 | break; | |
2090 | 2232 | |||
case 60: | 2091 | 2233 | case 60: | |
2234 | ||||
2235 | /* Line 1455 of yacc.c */ | |||
#line 311 "parser.y" | 2092 | 2236 | #line 311 "parser.y" | |
{ Identifier *id = new Identifier(yylloc, (const char*)(yyvsp[(1) - (1)].identifier)); | 2093 | 2237 | { Identifier *id = new Identifier(yylloc, (const char*)(yyvsp[(1) - (1)].identifier)); | |
(yyval.expression) = new VarExpr(yyloc, id); | 2094 | 2238 | (yyval.expression) = new VarExpr(yyloc, id); | |
} | 2095 | 2239 | } | |
break; | 2096 | 2240 | break; | |
2097 | 2241 | |||
case 61: | 2098 | 2242 | case 61: | |
2243 | ||||
2244 | /* Line 1455 of yacc.c */ | |||
#line 314 "parser.y" | 2099 | 2245 | #line 314 "parser.y" | |
{ (yyval.expression) = new IntConstant(yylloc, (yyvsp[(1) - (1)].integerConstant)); } | 2100 | 2246 | { (yyval.expression) = new IntConstant(yylloc, (yyvsp[(1) - (1)].integerConstant)); } | |
break; | 2101 | 2247 | break; | |
2102 | 2248 | |||
case 62: | 2103 | 2249 | case 62: | |
2250 | ||||
2251 | /* Line 1455 of yacc.c */ | |||
#line 315 "parser.y" | 2104 | 2252 | #line 315 "parser.y" | |
{ (yyval.expression) = new FloatConstant(yylloc, (yyvsp[(1) - (1)].floatConstant)); } | 2105 | 2253 | { (yyval.expression) = new FloatConstant(yylloc, (yyvsp[(1) - (1)].floatConstant)); } | |
break; | 2106 | 2254 | break; | |
2107 | 2255 | |||
case 63: | 2108 | 2256 | case 63: | |
2257 | ||||
2258 | /* Line 1455 of yacc.c */ | |||
#line 316 "parser.y" | 2109 | 2259 | #line 316 "parser.y" | |
{ (yyval.expression) = new BoolConstant(yylloc, (yyvsp[(1) - (1)].boolConstant)); } | 2110 | 2260 | { (yyval.expression) = new BoolConstant(yylloc, (yyvsp[(1) - (1)].boolConstant)); } | |
break; | 2111 | 2261 | break; | |
2112 | 2262 | |||
case 64: | 2113 | 2263 | case 64: | |
2264 | ||||
2265 | /* Line 1455 of yacc.c */ | |||
#line 317 "parser.y" | 2114 | 2266 | #line 317 "parser.y" | |
{ (yyval.expression) = (yyvsp[(2) - (3)].expression);} | 2115 | 2267 | { (yyval.expression) = (yyvsp[(2) - (3)].expression);} | |
break; | 2116 | 2268 | break; | |
2117 | 2269 | |||
case 65: | 2118 | 2270 | case 65: | |
2271 | ||||
2272 | /* Line 1455 of yacc.c */ | |||
#line 320 "parser.y" | 2119 | 2273 | #line 320 "parser.y" | |
{ (yyval.expression) = (yyvsp[(1) - (2)].expression); } | 2120 | 2274 | { (yyval.expression) = (yyvsp[(1) - (2)].expression); } | |
break; | 2121 | 2275 | break; | |
2122 | 2276 | |||
case 66: | 2123 | 2277 | case 66: | |
2278 | ||||
2279 | /* Line 1455 of yacc.c */ | |||
#line 321 "parser.y" | 2124 | 2280 | #line 321 "parser.y" | |
{ (yyval.expression) = (yyvsp[(1) - (2)].expression); } | 2125 | 2281 | { (yyval.expression) = (yyvsp[(1) - (2)].expression); } | |
break; | 2126 | 2282 | break; | |
2127 | 2283 | |||
case 67: | 2128 | 2284 | case 67: | |
2285 | ||||
2286 | /* Line 1455 of yacc.c */ | |||
#line 324 "parser.y" | 2129 | 2287 | #line 324 "parser.y" | |
{ (yyval.expression) = new Call((yylsp[(1) - (3)]), NULL, (yyvsp[(1) - (3)].funcId), new List<Expr*>); } | 2130 | 2288 | { (yyval.expression) = new Call((yylsp[(1) - (3)]), NULL, (yyvsp[(1) - (3)].funcId), new List<Expr*>); } | |
break; | 2131 | 2289 | break; | |
2132 | 2290 | |||
case 68: | 2133 | 2291 | case 68: | |
2292 | ||||
2293 | /* Line 1455 of yacc.c */ | |||
#line 325 "parser.y" | 2134 | 2294 | #line 325 "parser.y" | |
{ (yyval.expression) = new Call((yylsp[(1) - (2)]), NULL, (yyvsp[(1) - (2)].funcId), new List<Expr*>); } | 2135 | 2295 | { (yyval.expression) = new Call((yylsp[(1) - (2)]), NULL, (yyvsp[(1) - (2)].funcId), new List<Expr*>); } | |
break; | 2136 | 2296 | break; | |
2137 | 2297 | |||
case 69: | 2138 | 2298 | case 69: | |
2299 | ||||
2300 | /* Line 1455 of yacc.c */ | |||
#line 328 "parser.y" | 2139 | 2301 | #line 328 "parser.y" | |
{ (yyval.expression) = new Call((yylsp[(1) - (3)]), NULL, (yyvsp[(1) - (3)].funcId), (yyvsp[(3) - (3)].argList));} | 2140 | 2302 | { (yyval.expression) = new Call((yylsp[(1) - (3)]), NULL, (yyvsp[(1) - (3)].funcId), (yyvsp[(3) - (3)].argList));} | |
break; | 2141 | 2303 | break; | |
2142 | 2304 | |||
case 70: | 2143 | 2305 | case 70: | |
2306 | ||||
2307 | /* Line 1455 of yacc.c */ | |||
#line 331 "parser.y" | 2144 | 2308 | #line 331 "parser.y" | |
{ ((yyval.argList) = new List<Expr*>)->Append((yyvsp[(1) - (1)].expression));} | 2145 | 2309 | { ((yyval.argList) = new List<Expr*>)->Append((yyvsp[(1) - (1)].expression));} | |
break; | 2146 | 2310 | break; | |
2147 | 2311 | |||
case 71: | 2148 | 2312 | case 71: | |
2313 | ||||
2314 | /* Line 1455 of yacc.c */ | |||
#line 332 "parser.y" | 2149 | 2315 | #line 332 "parser.y" | |
{ ((yyval.argList) = (yyvsp[(1) - (3)].argList))->Append((yyvsp[(3) - (3)].expression));} | 2150 | 2316 | { ((yyval.argList) = (yyvsp[(1) - (3)].argList))->Append((yyvsp[(3) - (3)].expression));} | |
break; | 2151 | 2317 | break; | |
2152 | 2318 | |||
case 72: | 2153 | 2319 | case 72: | |
2320 | ||||
2321 | /* Line 1455 of yacc.c */ | |||
#line 335 "parser.y" | 2154 | 2322 | #line 335 "parser.y" | |
{ (yyval.funcId) = new Identifier((yylsp[(1) - (1)]), (yyvsp[(1) - (1)].identifier)); } | 2155 | 2323 | { (yyval.funcId) = new Identifier((yylsp[(1) - (1)]), (yyvsp[(1) - (1)].identifier)); } | |
break; | 2156 | 2324 | break; | |
2157 | 2325 | |||
case 73: | 2158 | 2326 | case 73: | |
2327 | ||||
2328 | /* Line 1455 of yacc.c */ | |||
#line 338 "parser.y" | 2159 | 2329 | #line 338 "parser.y" | |
{ (yyval.expression) = (yyvsp[(1) - (1)].expression); } | 2160 | 2330 | { (yyval.expression) = (yyvsp[(1) - (1)].expression); } | |
break; | 2161 | 2331 | break; | |
2162 | 2332 | |||
case 74: | 2163 | 2333 | case 74: | |
2334 | ||||
2335 | /* Line 1455 of yacc.c */ | |||
#line 339 "parser.y" | 2164 | 2336 | #line 339 "parser.y" | |
{ (yyval.expression) = new ArrayAccess((yylsp[(1) - (4)]), (yyvsp[(1) - (4)].expression), (yyvsp[(3) - (4)].expression)); } | 2165 | 2337 | { (yyval.expression) = new ArrayAccess((yylsp[(1) - (4)]), (yyvsp[(1) - (4)].expression), (yyvsp[(3) - (4)].expression)); } | |
break; | 2166 | 2338 | break; | |
2167 | 2339 | |||
case 75: | 2168 | 2340 | case 75: | |
2341 | ||||
2342 | /* Line 1455 of yacc.c */ | |||
#line 341 "parser.y" | 2169 | 2343 | #line 341 "parser.y" | |
{ | 2170 | 2344 | { | |
} | 2171 | 2345 | } | |
break; | 2172 | 2346 | break; | |
2173 | 2347 | |||
case 76: | 2174 | 2348 | case 76: | |
2349 | ||||
2350 | /* Line 1455 of yacc.c */ | |||
#line 344 "parser.y" | 2175 | 2351 | #line 344 "parser.y" | |
{ | 2176 | 2352 | { | |
Operator *op = new Operator(yylloc, (const char *)(yyvsp[(2) - (2)].identifier)); | 2177 | 2353 | Operator *op = new Operator(yylloc, (const char *)(yyvsp[(2) - (2)].identifier)); | |
(yyval.expression) = new PostfixExpr((yyvsp[(1) - (2)].expression), op); | 2178 | 2354 | (yyval.expression) = new PostfixExpr((yyvsp[(1) - (2)].expression), op); | |
} | 2179 | 2355 | } | |
break; | 2180 | 2356 | break; | |
2181 | 2357 | |||
case 77: | 2182 | 2358 | case 77: | |
2359 | ||||
2360 | /* Line 1455 of yacc.c */ | |||
#line 349 "parser.y" | 2183 | 2361 | #line 349 "parser.y" | |
{ | 2184 | 2362 | { | |
Operator *op = new Operator(yylloc, (const char *)(yyvsp[(2) - (2)].identifier)); | 2185 | 2363 | Operator *op = new Operator(yylloc, (const char *)(yyvsp[(2) - (2)].identifier)); | |
(yyval.expression) = new PostfixExpr((yyvsp[(1) - (2)].expression), op); | 2186 | 2364 | (yyval.expression) = new PostfixExpr((yyvsp[(1) - (2)].expression), op); | |
} | 2187 | 2365 | } | |
break; | 2188 | 2366 | break; | |
2189 | 2367 | |||
case 78: | 2190 | 2368 | case 78: | |
2369 | ||||
2370 | /* Line 1455 of yacc.c */ | |||
#line 354 "parser.y" | 2191 | 2371 | #line 354 "parser.y" | |
{ | 2192 | 2372 | { | |
Identifier *id = new Identifier(yylloc, (const char *)(yyvsp[(3) - (3)].identifier)); | 2193 | 2373 | Identifier *id = new Identifier(yylloc, (const char *)(yyvsp[(3) - (3)].identifier)); | |
(yyval.expression) = new FieldAccess((yyvsp[(1) - (3)].expression), id); | 2194 | 2374 | (yyval.expression) = new FieldAccess((yyvsp[(1) - (3)].expression), id); | |
} | 2195 | 2375 | } | |
break; | 2196 | 2376 | break; | |
2197 | 2377 | |||
case 79: | 2198 | 2378 | case 79: | |
2379 | ||||
2380 | /* Line 1455 of yacc.c */ | |||
#line 360 "parser.y" | 2199 | 2381 | #line 360 "parser.y" | |
{ (yyval.expression) = (yyvsp[(1) - (1)].expression); } | 2200 | 2382 | { (yyval.expression) = (yyvsp[(1) - (1)].expression); } | |
break; | 2201 | 2383 | break; | |
2202 | 2384 | |||
case 80: | 2203 | 2385 | case 80: | |
2386 | ||||
2387 | /* Line 1455 of yacc.c */ | |||
#line 362 "parser.y" | 2204 | 2388 | #line 362 "parser.y" | |
{ | 2205 | 2389 | { | |
Operator *op = new Operator(yylloc, (yyvsp[(1) - (2)].identifier)); | 2206 | 2390 | Operator *op = new Operator(yylloc, (yyvsp[(1) - (2)].identifier)); | |
(yyval.expression) = new ArithmeticExpr(op, (yyvsp[(2) - (2)].expression)); | 2207 | 2391 | (yyval.expression) = new ArithmeticExpr(op, (yyvsp[(2) - (2)].expression)); | |
} | 2208 | 2392 | } | |
break; | 2209 | 2393 | break; | |
2210 | 2394 | |||
case 81: | 2211 | 2395 | case 81: | |
2396 | ||||
2397 | /* Line 1455 of yacc.c */ | |||
#line 367 "parser.y" | 2212 | 2398 | #line 367 "parser.y" | |
{ | 2213 | 2399 | { | |
Operator *op = new Operator(yylloc, (yyvsp[(1) - (2)].identifier)); | 2214 | 2400 | Operator *op = new Operator(yylloc, (yyvsp[(1) - (2)].identifier)); | |
(yyval.expression) = new ArithmeticExpr(op, (yyvsp[(2) - (2)].expression)); | 2215 | 2401 | (yyval.expression) = new ArithmeticExpr(op, (yyvsp[(2) - (2)].expression)); | |
} | 2216 | 2402 | } | |
break; | 2217 | 2403 | break; | |
2218 | 2404 | |||
case 82: | 2219 | 2405 | case 82: | |
2406 | ||||
2407 | /* Line 1455 of yacc.c */ | |||
#line 372 "parser.y" | 2220 | 2408 | #line 372 "parser.y" | |
{ | 2221 | 2409 | { | |
Operator *op = new Operator(yylloc, (yyvsp[(1) - (2)].identifier)); | 2222 | 2410 | Operator *op = new Operator(yylloc, (yyvsp[(1) - (2)].identifier)); | |
(yyval.expression) = new ArithmeticExpr(op, (yyvsp[(2) - (2)].expression)); | 2223 | 2411 | (yyval.expression) = new ArithmeticExpr(op, (yyvsp[(2) - (2)].expression)); | |
} | 2224 | 2412 | } | |
break; | 2225 | 2413 | break; | |
2226 | 2414 | |||
case 83: | 2227 | 2415 | case 83: | |
2416 | ||||
2417 | /* Line 1455 of yacc.c */ | |||
#line 377 "parser.y" | 2228 | 2418 | #line 377 "parser.y" | |
{ | 2229 | 2419 | { | |
Operator *op = new Operator(yylloc, (yyvsp[(1) - (2)].identifier)); | 2230 | 2420 | Operator *op = new Operator(yylloc, (yyvsp[(1) - (2)].identifier)); | |
(yyval.expression) = new ArithmeticExpr(op, (yyvsp[(2) - (2)].expression)); | 2231 | 2421 | (yyval.expression) = new ArithmeticExpr(op, (yyvsp[(2) - (2)].expression)); | |
} | 2232 | 2422 | } | |
break; | 2233 | 2423 | break; | |
2234 | 2424 | |||
case 84: | 2235 | 2425 | case 84: | |
2426 | ||||
2427 | /* Line 1455 of yacc.c */ | |||
#line 383 "parser.y" | 2236 | 2428 | #line 383 "parser.y" | |
{ (yyval.expression) = (yyvsp[(1) - (1)].expression); } | 2237 | 2429 | { (yyval.expression) = (yyvsp[(1) - (1)].expression); } | |
break; | 2238 | 2430 | break; | |
2239 | 2431 | |||
case 85: | 2240 | 2432 | case 85: | |
2433 | ||||
2434 | /* Line 1455 of yacc.c */ | |||
#line 385 "parser.y" | 2241 | 2435 | #line 385 "parser.y" | |
{ | 2242 | 2436 | { | |
Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | 2243 | 2437 | Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | |
(yyval.expression) = new ArithmeticExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | 2244 | 2438 | (yyval.expression) = new ArithmeticExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | |
} | 2245 | 2439 | } | |
break; | 2246 | 2440 | break; | |
2247 | 2441 | |||
case 86: | 2248 | 2442 | case 86: | |
2443 | ||||
2444 | /* Line 1455 of yacc.c */ | |||
#line 390 "parser.y" | 2249 | 2445 | #line 390 "parser.y" | |
{ | 2250 | 2446 | { | |
Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | 2251 | 2447 | Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | |
(yyval.expression) = new ArithmeticExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | 2252 | 2448 | (yyval.expression) = new ArithmeticExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | |
} | 2253 | 2449 | } | |
break; | 2254 | 2450 | break; | |
2255 | 2451 | |||
case 87: | 2256 | 2452 | case 87: | |
2453 | ||||
2454 | /* Line 1455 of yacc.c */ | |||
#line 396 "parser.y" | 2257 | 2455 | #line 396 "parser.y" | |
{ (yyval.expression) = (yyvsp[(1) - (1)].expression); } | 2258 | 2456 | { (yyval.expression) = (yyvsp[(1) - (1)].expression); } | |
break; | 2259 | 2457 | break; | |
2260 | 2458 | |||
case 88: | 2261 | 2459 | case 88: | |
2460 | ||||
2461 | /* Line 1455 of yacc.c */ | |||
#line 398 "parser.y" | 2262 | 2462 | #line 398 "parser.y" | |
{ | 2263 | 2463 | { | |
Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | 2264 | 2464 | Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | |
(yyval.expression) = new ArithmeticExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | 2265 | 2465 | (yyval.expression) = new ArithmeticExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | |
} | 2266 | 2466 | } | |
break; | 2267 | 2467 | break; | |
2268 | 2468 | |||
case 89: | 2269 | 2469 | case 89: | |
2470 | ||||
2471 | /* Line 1455 of yacc.c */ | |||
#line 403 "parser.y" | 2270 | 2472 | #line 403 "parser.y" | |
{ | 2271 | 2473 | { | |
Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | 2272 | 2474 | Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | |
(yyval.expression) = new ArithmeticExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | 2273 | 2475 | (yyval.expression) = new ArithmeticExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | |
} | 2274 | 2476 | } | |
break; | 2275 | 2477 | break; | |
2276 | 2478 | |||
case 90: | 2277 | 2479 | case 90: | |
2480 | ||||
2481 | /* Line 1455 of yacc.c */ | |||
#line 409 "parser.y" | 2278 | 2482 | #line 409 "parser.y" | |
{ (yyval.expression) = (yyvsp[(1) - (1)].expression); } | 2279 | 2483 | { (yyval.expression) = (yyvsp[(1) - (1)].expression); } | |
break; | 2280 | 2484 | break; | |
2281 | 2485 | |||
case 91: | 2282 | 2486 | case 91: | |
2487 | ||||
2488 | /* Line 1455 of yacc.c */ | |||
#line 411 "parser.y" | 2283 | 2489 | #line 411 "parser.y" | |
{ | 2284 | 2490 | { | |
Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | 2285 | 2491 | Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | |
(yyval.expression) = new RelationalExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | 2286 | 2492 | (yyval.expression) = new RelationalExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | |
} | 2287 | 2493 | } | |
break; | 2288 | 2494 | break; | |
2289 | 2495 | |||
case 92: | 2290 | 2496 | case 92: | |
2497 | ||||
2498 | /* Line 1455 of yacc.c */ | |||
#line 416 "parser.y" | 2291 | 2499 | #line 416 "parser.y" | |
{ | 2292 | 2500 | { | |
Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | 2293 | 2501 | Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | |
(yyval.expression) = new RelationalExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | 2294 | 2502 | (yyval.expression) = new RelationalExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | |
} | 2295 | 2503 | } | |
break; | 2296 | 2504 | break; | |
2297 | 2505 | |||
case 93: | 2298 | 2506 | case 93: | |
2507 | ||||
2508 | /* Line 1455 of yacc.c */ | |||
#line 421 "parser.y" | 2299 | 2509 | #line 421 "parser.y" | |
{ | 2300 | 2510 | { | |
Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | 2301 | 2511 | Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | |
(yyval.expression) = new RelationalExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | 2302 | 2512 | (yyval.expression) = new RelationalExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | |
} | 2303 | 2513 | } | |
break; | 2304 | 2514 | break; | |
2305 | 2515 | |||
case 94: | 2306 | 2516 | case 94: | |
2517 | ||||
2518 | /* Line 1455 of yacc.c */ | |||
#line 426 "parser.y" | 2307 | 2519 | #line 426 "parser.y" | |
{ | 2308 | 2520 | { | |
Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | 2309 | 2521 | Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | |
(yyval.expression) = new RelationalExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | 2310 | 2522 | (yyval.expression) = new RelationalExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | |
} | 2311 | 2523 | } | |
break; | 2312 | 2524 | break; | |
2313 | 2525 | |||
case 95: | 2314 | 2526 | case 95: | |
2527 | ||||
2528 | /* Line 1455 of yacc.c */ | |||
#line 432 "parser.y" | 2315 | 2529 | #line 432 "parser.y" | |
{ (yyval.expression) = (yyvsp[(1) - (1)].expression); } | 2316 | 2530 | { (yyval.expression) = (yyvsp[(1) - (1)].expression); } | |
break; | 2317 | 2531 | break; | |
2318 | 2532 | |||
case 96: | 2319 | 2533 | case 96: | |
2534 | ||||
2535 | /* Line 1455 of yacc.c */ | |||
#line 434 "parser.y" | 2320 | 2536 | #line 434 "parser.y" | |
{ | 2321 | 2537 | { | |
Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | 2322 | 2538 | Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | |
(yyval.expression) = new ArithmeticExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | 2323 | 2539 | (yyval.expression) = new EqualityExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | |
} | 2324 | 2540 | } | |
break; | 2325 | 2541 | break; | |
2326 | 2542 | |||
case 97: | 2327 | 2543 | case 97: | |
2544 | ||||
2545 | /* Line 1455 of yacc.c */ | |||
#line 439 "parser.y" | 2328 | 2546 | #line 439 "parser.y" | |
{ | 2329 | 2547 | { | |
Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | 2330 | 2548 | Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | |
(yyval.expression) = new ArithmeticExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | 2331 | 2549 | (yyval.expression) = new EqualityExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | |
} | 2332 | 2550 | } | |
break; | 2333 | 2551 | break; | |
2334 | 2552 | |||
case 98: | 2335 | 2553 | case 98: | |
2554 | ||||
2555 | /* Line 1455 of yacc.c */ | |||
#line 445 "parser.y" | 2336 | 2556 | #line 445 "parser.y" | |
{ (yyval.expression) = (yyvsp[(1) - (1)].expression); } | 2337 | 2557 | { (yyval.expression) = (yyvsp[(1) - (1)].expression); } | |
break; | 2338 | 2558 | break; | |
2339 | 2559 | |||
case 99: | 2340 | 2560 | case 99: | |
2561 | ||||
2562 | /* Line 1455 of yacc.c */ | |||
#line 447 "parser.y" | 2341 | 2563 | #line 447 "parser.y" | |
{ | 2342 | 2564 | { | |
Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | 2343 | 2565 | Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | |
(yyval.expression) = new ArithmeticExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | 2344 | 2566 | (yyval.expression) = new LogicalExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | |
} | 2345 | 2567 | } | |
break; | 2346 | 2568 | break; | |
2347 | 2569 | |||
case 100: | 2348 | 2570 | case 100: | |
2571 | ||||
2572 | /* Line 1455 of yacc.c */ | |||
#line 453 "parser.y" | 2349 | 2573 | #line 453 "parser.y" | |
{ (yyval.expression) = (yyvsp[(1) - (1)].expression); } | 2350 | 2574 | { (yyval.expression) = (yyvsp[(1) - (1)].expression); } | |
break; | 2351 | 2575 | break; | |
2352 | 2576 | |||
case 101: | 2353 | 2577 | case 101: | |
2578 | ||||
2579 | /* Line 1455 of yacc.c */ | |||
#line 455 "parser.y" | 2354 | 2580 | #line 455 "parser.y" | |
{ | 2355 | 2581 | { | |
Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | 2356 | 2582 | Operator *op = new Operator(yylloc, (yyvsp[(2) - (3)].identifier)); | |
(yyval.expression) = new ArithmeticExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | 2357 | 2583 | (yyval.expression) = new LogicalExpr((yyvsp[(1) - (3)].expression), op, (yyvsp[(3) - (3)].expression)); | |
} | 2358 | 2584 | } | |
break; | 2359 | 2585 | break; | |
2360 | 2586 | |||
case 102: | 2361 | 2587 | case 102: | |
2588 | ||||
2589 | /* Line 1455 of yacc.c */ | |||
#line 461 "parser.y" | 2362 | 2590 | #line 461 "parser.y" | |
{ (yyval.expression) = (yyvsp[(1) - (1)].expression); } | 2363 | 2591 | { (yyval.expression) = (yyvsp[(1) - (1)].expression); } | |
break; | 2364 | 2592 | break; | |
2365 | 2593 | |||
case 103: | 2366 | 2594 | case 103: | |
2595 | ||||
2596 | /* Line 1455 of yacc.c */ | |||
#line 463 "parser.y" | 2367 | 2597 | #line 463 "parser.y" | |
{ | 2368 | 2598 | { | |
(yyval.expression) = new ConditionalExpr((yyvsp[(1) - (5)].expression), (yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].expression)); | 2369 | 2599 | (yyval.expression) = new ConditionalExpr((yyvsp[(1) - (5)].expression), (yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].expression)); | |
} | 2370 | 2600 | } | |
break; | 2371 | 2601 | break; | |
2372 | 2602 | |||
case 104: | 2373 | 2603 | case 104: | |
2604 | ||||
2605 | /* Line 1455 of yacc.c */ | |||
#line 467 "parser.y" | 2374 | 2606 | #line 467 "parser.y" | |
{ | 2375 | 2607 | { | |
(yyval.expression) = new AssignExpr((yyvsp[(1) - (3)].expression), (yyvsp[(2) - (3)].ops), (yyvsp[(3) - (3)].expression)); | 2376 | 2608 | (yyval.expression) = new AssignExpr((yyvsp[(1) - (3)].expression), (yyvsp[(2) - (3)].ops), (yyvsp[(3) - (3)].expression)); | |
} | 2377 | 2609 | } | |
break; | 2378 | 2610 | break; | |
2379 | 2611 | |||
case 105: | 2380 | 2612 | case 105: | |
2613 | ||||
2614 | /* Line 1455 of yacc.c */ | |||
#line 472 "parser.y" | 2381 | 2615 | #line 472 "parser.y" | |
{ (yyval.ops) = new Operator(yylloc, (yyvsp[(1) - (1)].identifier)); } | 2382 | 2616 | { (yyval.ops) = new Operator(yylloc, (yyvsp[(1) - (1)].identifier)); } | |
break; | 2383 | 2617 | break; | |
2384 | 2618 | |||
case 106: | 2385 | 2619 | case 106: | |
2620 | ||||
2621 | /* Line 1455 of yacc.c */ | |||
#line 473 "parser.y" | 2386 | 2622 | #line 473 "parser.y" | |
{ (yyval.ops) = new Operator(yylloc, "+="); } | 2387 | 2623 | { (yyval.ops) = new Operator(yylloc, "+="); } | |
break; | 2388 | 2624 | break; | |
2389 | 2625 | |||
case 107: | 2390 | 2626 | case 107: | |
2627 |
y.tab.h
View file @
c189b2a
/* A Bison parser, made by GNU Bison 2.3. */ | 1 | |||
2 | 1 | |||
/* Skeleton interface for Bison's Yacc-like parsers in C | 3 | 2 | /* A Bison parser, made by GNU Bison 2.4.1. */ | |
4 | 3 | |||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 | 5 | 4 | /* Skeleton interface for Bison's Yacc-like parsers in C | |
5 | ||||
6 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 | |||
Free Software Foundation, Inc. | 6 | 7 | Free Software Foundation, Inc. | |
7 | 8 | |||
This program is free software; you can redistribute it and/or modify | 8 | 9 | This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | 9 | 10 | it under the terms of the GNU General Public License as published by | |
the Free Software Foundation; either version 2, or (at your option) | 10 | 11 | the Free Software Foundation, either version 3 of the License, or | |
any later version. | 11 | 12 | (at your option) any later version. | |
12 | 13 | |||
This program is distributed in the hope that it will be useful, | 13 | 14 | This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
GNU General Public License for more details. | 16 | 17 | GNU General Public License for more details. | |
17 | 18 | |||
You should have received a copy of the GNU General Public License | 18 | 19 | You should have received a copy of the GNU General Public License | |
along with this program; if not, write to the Free Software | 19 | 20 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
Foundation, Inc., 51 Franklin Street, Fifth Floor, | 20 | |||
Boston, MA 02110-1301, USA. */ | 21 | |||
22 | 21 | |||
/* As a special exception, you may create a larger work that contains | 23 | 22 | /* As a special exception, you may create a larger work that contains | |
part or all of the Bison parser skeleton and distribute that work | 24 | 23 | part or all of the Bison parser skeleton and distribute that work | |
under terms of your choice, so long as that work isn't itself a | 25 | 24 | under terms of your choice, so long as that work isn't itself a | |
parser generator using the skeleton or a modified version thereof | 26 | 25 | parser generator using the skeleton or a modified version thereof | |
as a parser skeleton. Alternatively, if you modify or redistribute | 27 | 26 | as a parser skeleton. Alternatively, if you modify or redistribute | |
the parser skeleton itself, you may (at your option) remove this | 28 | 27 | the parser skeleton itself, you may (at your option) remove this | |
special exception, which will cause the skeleton and the resulting | 29 | 28 | special exception, which will cause the skeleton and the resulting | |
Bison output files to be licensed under the GNU General Public | 30 | 29 | Bison output files to be licensed under the GNU General Public | |
License without this special exception. | 31 | 30 | License without this special exception. | |
32 | 31 | |||
This special exception was added by the Free Software Foundation in | 33 | 32 | This special exception was added by the Free Software Foundation in | |
version 2.2 of Bison. */ | 34 | 33 | version 2.2 of Bison. */ | |
35 | 34 | |||
35 | ||||
/* Tokens. */ | 36 | 36 | /* Tokens. */ | |
#ifndef YYTOKENTYPE | 37 | 37 | #ifndef YYTOKENTYPE | |
# define YYTOKENTYPE | 38 | 38 | # define YYTOKENTYPE | |
/* Put the tokens into the symbol table, so that GDB and other debuggers | 39 | 39 | /* Put the tokens into the symbol table, so that GDB and other debuggers | |
know about them. */ | 40 | 40 | know about them. */ | |
enum yytokentype { | 41 | 41 | enum yytokentype { | |
T_Void = 258, | 42 | 42 | T_Void = 258, | |
T_Bool = 259, | 43 | 43 | T_Bool = 259, | |
T_Int = 260, | 44 | 44 | T_Int = 260, | |
T_Float = 261, | 45 | 45 | T_Float = 261, | |
T_Uint = 262, | 46 | 46 | T_Uint = 262, | |
T_Bvec2 = 263, | 47 | 47 | T_Bvec2 = 263, | |
T_Bvec3 = 264, | 48 | 48 | T_Bvec3 = 264, | |
T_Bvec4 = 265, | 49 | 49 | T_Bvec4 = 265, | |
T_Ivec2 = 266, | 50 | 50 | T_Ivec2 = 266, | |
T_Ivec3 = 267, | 51 | 51 | T_Ivec3 = 267, | |
T_Ivec4 = 268, | 52 | 52 | T_Ivec4 = 268, | |
T_Uvec2 = 269, | 53 | 53 | T_Uvec2 = 269, | |
T_Uvec3 = 270, | 54 | 54 | T_Uvec3 = 270, | |
T_Uvec4 = 271, | 55 | 55 | T_Uvec4 = 271, | |
T_Vec2 = 272, | 56 | 56 | T_Vec2 = 272, | |
T_Vec3 = 273, | 57 | 57 | T_Vec3 = 273, | |
T_Vec4 = 274, | 58 | 58 | T_Vec4 = 274, | |
T_Mat2 = 275, | 59 | 59 | T_Mat2 = 275, | |
T_Mat3 = 276, | 60 | 60 | T_Mat3 = 276, | |
T_Mat4 = 277, | 61 | 61 | T_Mat4 = 277, | |
T_While = 278, | 62 | 62 | T_While = 278, | |
T_For = 279, | 63 | 63 | T_For = 279, | |
T_If = 280, | 64 | 64 | T_If = 280, | |
T_Else = 281, | 65 | 65 | T_Else = 281, | |
T_Return = 282, | 66 | 66 | T_Return = 282, | |
T_Break = 283, | 67 | 67 | T_Break = 283, | |
T_Continue = 284, | 68 | 68 | T_Continue = 284, | |
T_Do = 285, | 69 | 69 | T_Do = 285, | |
T_Switch = 286, | 70 | 70 | T_Switch = 286, | |
T_Case = 287, | 71 | 71 | T_Case = 287, | |
T_Default = 288, | 72 | 72 | T_Default = 288, | |
T_In = 289, | 73 | 73 | T_In = 289, | |
T_Out = 290, | 74 | 74 | T_Out = 290, | |
T_Const = 291, | 75 | 75 | T_Const = 291, | |
T_Uniform = 292, | 76 | 76 | T_Uniform = 292, | |
T_LeftParen = 293, | 77 | 77 | T_LeftParen = 293, | |
T_RightParen = 294, | 78 | 78 | T_RightParen = 294, | |
T_LeftBracket = 295, | 79 | 79 | T_LeftBracket = 295, | |
T_RightBracket = 296, | 80 | 80 | T_RightBracket = 296, | |
T_LeftBrace = 297, | 81 | 81 | T_LeftBrace = 297, | |
T_RightBrace = 298, | 82 | 82 | T_RightBrace = 298, | |
T_Dot = 299, | 83 | 83 | T_Dot = 299, | |
T_Comma = 300, | 84 | 84 | T_Comma = 300, | |
T_Colon = 301, | 85 | 85 | T_Colon = 301, | |
T_Semicolon = 302, | 86 | 86 | T_Semicolon = 302, | |
T_Question = 303, | 87 | 87 | T_Question = 303, | |
T_LessEqual = 304, | 88 | 88 | T_LessEqual = 304, | |
T_GreaterEqual = 305, | 89 | 89 | T_GreaterEqual = 305, | |
T_EQ = 306, | 90 | 90 | T_EQ = 306, | |
T_NE = 307, | 91 | 91 | T_NE = 307, | |
T_And = 308, | 92 | 92 | T_And = 308, | |
T_Or = 309, | 93 | 93 | T_Or = 309, | |
T_Plus = 310, | 94 | 94 | T_Plus = 310, | |
T_Star = 311, | 95 | 95 | T_Star = 311, | |
T_MulAssign = 312, | 96 | 96 | T_MulAssign = 312, | |
T_DivAssign = 313, | 97 | 97 | T_DivAssign = 313, | |
T_AddAssign = 314, | 98 | 98 | T_AddAssign = 314, | |
T_SubAssign = 315, | 99 | 99 | T_SubAssign = 315, | |
T_Equal = 316, | 100 | 100 | T_Equal = 316, | |
T_LeftAngle = 317, | 101 | 101 | T_LeftAngle = 317, | |
T_RightAngle = 318, | 102 | 102 | T_RightAngle = 318, | |
T_Dash = 319, | 103 | 103 | T_Dash = 319, | |
T_Slash = 320, | 104 | 104 | T_Slash = 320, | |
T_Inc = 321, | 105 | 105 | T_Inc = 321, | |
T_Dec = 322, | 106 | 106 | T_Dec = 322, | |
T_Identifier = 323, | 107 | 107 | T_Identifier = 323, | |
T_IntConstant = 324, | 108 | 108 | T_IntConstant = 324, | |
T_FloatConstant = 325, | 109 | 109 | T_FloatConstant = 325, | |
T_BoolConstant = 326, | 110 | 110 | T_BoolConstant = 326, | |
T_FieldSelection = 327, | 111 | 111 | T_FieldSelection = 327, | |
LOWEST = 328, | 112 | 112 | LOWEST = 328, | |
LOWER_THAN_ELSE = 329 | 113 | 113 | LOWER_THAN_ELSE = 329 | |
}; | 114 | 114 | }; | |
#endif | 115 | 115 | #endif | |
/* Tokens. */ | 116 | 116 | /* Tokens. */ | |
#define T_Void 258 | 117 | 117 | #define T_Void 258 | |
#define T_Bool 259 | 118 | 118 | #define T_Bool 259 | |
#define T_Int 260 | 119 | 119 | #define T_Int 260 | |
#define T_Float 261 | 120 | 120 | #define T_Float 261 | |
#define T_Uint 262 | 121 | 121 | #define T_Uint 262 | |
#define T_Bvec2 263 | 122 | 122 | #define T_Bvec2 263 | |
#define T_Bvec3 264 | 123 | 123 | #define T_Bvec3 264 | |
#define T_Bvec4 265 | 124 | 124 | #define T_Bvec4 265 | |
#define T_Ivec2 266 | 125 | 125 | #define T_Ivec2 266 | |
#define T_Ivec3 267 | 126 | 126 | #define T_Ivec3 267 | |
#define T_Ivec4 268 | 127 | 127 | #define T_Ivec4 268 | |
#define T_Uvec2 269 | 128 | 128 | #define T_Uvec2 269 | |
#define T_Uvec3 270 | 129 | 129 | #define T_Uvec3 270 | |
#define T_Uvec4 271 | 130 | 130 | #define T_Uvec4 271 | |
#define T_Vec2 272 | 131 | 131 | #define T_Vec2 272 | |
#define T_Vec3 273 | 132 | 132 | #define T_Vec3 273 | |
#define T_Vec4 274 | 133 | 133 | #define T_Vec4 274 | |
#define T_Mat2 275 | 134 | 134 | #define T_Mat2 275 | |
#define T_Mat3 276 | 135 | 135 | #define T_Mat3 276 | |
#define T_Mat4 277 | 136 | 136 | #define T_Mat4 277 | |
#define T_While 278 | 137 | 137 | #define T_While 278 | |
#define T_For 279 | 138 | 138 | #define T_For 279 | |
#define T_If 280 | 139 | 139 | #define T_If 280 | |
#define T_Else 281 | 140 | 140 | #define T_Else 281 | |
#define T_Return 282 | 141 | 141 | #define T_Return 282 | |
#define T_Break 283 | 142 | 142 | #define T_Break 283 | |
#define T_Continue 284 | 143 | 143 | #define T_Continue 284 | |
#define T_Do 285 | 144 | 144 | #define T_Do 285 | |
#define T_Switch 286 | 145 | 145 | #define T_Switch 286 | |
#define T_Case 287 | 146 | 146 | #define T_Case 287 | |
#define T_Default 288 | 147 | 147 | #define T_Default 288 | |
#define T_In 289 | 148 | 148 | #define T_In 289 | |
#define T_Out 290 | 149 | 149 | #define T_Out 290 | |
#define T_Const 291 | 150 | 150 | #define T_Const 291 | |
#define T_Uniform 292 | 151 | 151 | #define T_Uniform 292 | |
#define T_LeftParen 293 | 152 | 152 | #define T_LeftParen 293 | |
#define T_RightParen 294 | 153 | 153 | #define T_RightParen 294 | |
#define T_LeftBracket 295 | 154 | 154 | #define T_LeftBracket 295 | |
#define T_RightBracket 296 | 155 | 155 | #define T_RightBracket 296 | |
#define T_LeftBrace 297 | 156 | 156 | #define T_LeftBrace 297 | |
#define T_RightBrace 298 | 157 | 157 | #define T_RightBrace 298 | |
#define T_Dot 299 | 158 | 158 | #define T_Dot 299 | |
#define T_Comma 300 | 159 | 159 | #define T_Comma 300 | |
#define T_Colon 301 | 160 | 160 | #define T_Colon 301 | |
#define T_Semicolon 302 | 161 | 161 | #define T_Semicolon 302 | |
#define T_Question 303 | 162 | 162 | #define T_Question 303 | |
#define T_LessEqual 304 | 163 | 163 | #define T_LessEqual 304 | |
#define T_GreaterEqual 305 | 164 | 164 | #define T_GreaterEqual 305 | |
#define T_EQ 306 | 165 | 165 | #define T_EQ 306 | |
#define T_NE 307 | 166 | 166 | #define T_NE 307 | |
#define T_And 308 | 167 | 167 | #define T_And 308 | |
#define T_Or 309 | 168 | 168 | #define T_Or 309 | |
#define T_Plus 310 | 169 | 169 | #define T_Plus 310 | |
#define T_Star 311 | 170 | 170 | #define T_Star 311 | |
#define T_MulAssign 312 | 171 | 171 | #define T_MulAssign 312 | |
#define T_DivAssign 313 | 172 | 172 | #define T_DivAssign 313 | |
#define T_AddAssign 314 | 173 | 173 | #define T_AddAssign 314 | |
#define T_SubAssign 315 | 174 | 174 | #define T_SubAssign 315 | |
#define T_Equal 316 | 175 | 175 | #define T_Equal 316 | |
#define T_LeftAngle 317 | 176 | 176 | #define T_LeftAngle 317 | |
#define T_RightAngle 318 | 177 | 177 | #define T_RightAngle 318 | |
#define T_Dash 319 | 178 | 178 | #define T_Dash 319 | |
#define T_Slash 320 | 179 | 179 | #define T_Slash 320 | |
#define T_Inc 321 | 180 | 180 | #define T_Inc 321 | |
#define T_Dec 322 | 181 | 181 | #define T_Dec 322 | |
#define T_Identifier 323 | 182 | 182 | #define T_Identifier 323 | |
#define T_IntConstant 324 | 183 | 183 | #define T_IntConstant 324 | |
#define T_FloatConstant 325 | 184 | 184 | #define T_FloatConstant 325 | |
#define T_BoolConstant 326 | 185 | 185 | #define T_BoolConstant 326 | |
#define T_FieldSelection 327 | 186 | 186 | #define T_FieldSelection 327 | |
#define LOWEST 328 | 187 | 187 | #define LOWEST 328 | |
#define LOWER_THAN_ELSE 329 | 188 | 188 | #define LOWER_THAN_ELSE 329 | |
189 | 189 | |||
190 | 190 | |||
191 | 191 | |||
192 | 192 | |||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED | 193 | 193 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED | |
typedef union YYSTYPE | 194 | 194 | typedef union YYSTYPE | |
#line 41 "parser.y" | 195 | |||
{ | 196 | 195 | { | |
196 | ||||
197 | /* Line 1676 of yacc.c */ | |||
198 | #line 41 "parser.y" | |||
199 | ||||
int integerConstant; | 197 | 200 | int integerConstant; | |
bool boolConstant; | 198 | 201 | bool boolConstant; | |
double floatConstant; | 199 | 202 | double floatConstant; | |
char identifier[MaxIdentLen+1]; // +1 for terminating null | 200 | 203 | char identifier[MaxIdentLen+1]; // +1 for terminating null | |
Decl *decl; | 201 | 204 | Decl *decl; | |
FnDecl *funcDecl; | 202 | 205 | FnDecl *funcDecl; | |
List<Decl*> *declList; | 203 | 206 | List<Decl*> *declList; | |
Type *typeDecl; | 204 | 207 | Type *typeDecl; | |
TypeQualifier *typeQualifier; | 205 | 208 | TypeQualifier *typeQualifier; | |
Expr *expression; | 206 | 209 | Expr *expression; | |
VarDecl *varDecl; | 207 | 210 | VarDecl *varDecl; | |
List<VarDecl *> *varDeclList; | 208 | 211 | List<VarDecl *> *varDeclList; | |
List<Stmt*> *stmtList; | 209 | 212 | List<Stmt*> *stmtList; | |
Stmt *stmt; | 210 | 213 | Stmt *stmt; | |
Operator *ops; | 211 | 214 | Operator *ops; | |
Identifier *funcId; | 212 | 215 | Identifier *funcId; | |
List<Expr*> *argList; | 213 | 216 | List<Expr*> *argList; | |
} | 214 | 217 | ||
/* Line 1529 of yacc.c. */ | 215 | 218 | ||
#line 217 "y.tab.h" | 216 | 219 | ||
YYSTYPE; | 217 | 220 | /* Line 1676 of yacc.c */ | |
221 | #line 222 "y.tab.h" | |||
222 | } YYSTYPE; | |||
223 | # define YYSTYPE_IS_TRIVIAL 1 | |||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ | 218 | 224 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ | |
# define YYSTYPE_IS_DECLARED 1 | 219 | 225 | # define YYSTYPE_IS_DECLARED 1 | |
# define YYSTYPE_IS_TRIVIAL 1 | 220 | |||
#endif | 221 | 226 | #endif | |
222 | 227 | |||
extern YYSTYPE yylval; | 223 | 228 | extern YYSTYPE yylval; | |
224 | 229 | |||
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED | 225 | 230 | #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED | |
typedef struct YYLTYPE | 226 | 231 | typedef struct YYLTYPE | |
{ | 227 | 232 | { | |
int first_line; | 228 | 233 | int first_line; | |
int first_column; | 229 | 234 | int first_column; | |
int last_line; | 230 | 235 | int last_line; | |
int last_column; | 231 | 236 | int last_column; | |
} YYLTYPE; | 232 | 237 | } YYLTYPE; | |
# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ | 233 | 238 | # define yyltype YYLTYPE /* obsolescent; will be withdrawn */ | |
# define YYLTYPE_IS_DECLARED 1 | 234 | 239 | # define YYLTYPE_IS_DECLARED 1 | |
# define YYLTYPE_IS_TRIVIAL 1 | 235 | 240 | # define YYLTYPE_IS_TRIVIAL 1 | |
#endif | 236 | 241 | #endif | |
237 | 242 |