public function printInfo($offset) { Console::write("{$offset}SymSubrangeType:\n"); $offset .= ' '; Console::write("{$offset}{$this->identifier}\n"); Console::write("{$offset}{$this->from}..{$this->to}\n"); }
public function printInfo($offset) { Console::write("{$offset}SymProc:\n"); $offset .= ' '; Console::write("{$offset}{$this->identifier}\n"); $this->symTable->printInfo($offset); }
public function printInfo($offset) { Console::write("{$offset}SymConst:\n"); $offset .= ' '; Console::write("{$offset}{$this->identifier} = {$this->value}\n"); $this->type->printInfo($offset); }
public function printInfo($offset) { Console::write("{$offset}SymPointerAnonimType:\n"); $offset .= ' '; Console::write("{$offset}{$this->identifier}\n"); $this->type->printInfo($offset); }
public function printInfo($offset) { Console::write("{$offset}SymSimpleType:\n"); $offset .= ' '; Console::write("{$offset}{$this->identifier}\n"); Console::write("{$offset}{$this->type}\n"); }
public function printInfo($offset) { Console::write("{$offset}SymAliasType:\n"); $offset .= ' '; Console::write("{$offset}{$this->identifier}\n"); $this->aliased->printInfo($offset); }
public function printInfo($offset) { Console::write("{$offset}SymTable:\n"); $offset .= ' '; foreach ($this->symbols as $identifier => $symbol) { $symbol->printInfo($offset); } }
public function printInfo($offset) { Console::write("{$offset}SymArg:\n"); $offset .= ' '; Console::write("{$offset}{$this->identifier}\n"); Console::write("{$offset}index = {$this->index}\n"); $this->type->printInfo($offset); }
public function printInfo($offset) { Console::write("{$offset}SymFunc:\n"); $offset .= ' '; Console::write("{$offset}{$this->identifier}\n"); $this->symTable->printInfo($offset); Console::write("{$offset}return value:\n"); $this->returnType->printInfo($offset); }
public function printInfo($offset) { Console::write("{$offset}SymArrayAnonimType:\n"); $offset .= ' '; Console::write("{$offset}{$this->identifier}\n"); for ($i = 0; $i < count($this->dimensions); $i++) { $this->dimensions[$i]->printInfo($offset); } $this->type->printInfo($offset); }
if ($params['syntax-only']) { try { $program = new Program($scanner); } catch (CompilerException $e) { Console::write($e); Console::closeStream(); exit(1); } if ($params['html']) { $syntaxTree = json_encode($program->toIdArray()); // echo $syntaxTree; TreeViewer::genSyntaxHtml($params['html'], "result", $syntaxTree); } else { $syntaxTree = $program->toIdArray(); Console::write(json_encode($syntaxTree, JSON_PRETTY_PRINT)); } } else { if ($params['table-only']) { try { $program = new Program($scanner); } catch (CompilerException $e) { Console::write($e); Console::closeStream(); exit(1); } $program->symTable->printInfo(''); } } } Console::closeStream();