Exemple #1
0
/* Line 840 of lalr1.php  */
/* Line 94 of "calc.y"  */
class Position
{
    public $line;
    public $token;
    public function __construct($l = 0, $t = 0)
    {
        $this->line = $l;
        $this->token = $t;
    }
    public function equals(Position $l)
    {
        return $l->line == $this->line && $l->token == $this->token;
    }
    public function __toString()
    {
        return $this->line . "." . $this->token;
    }
    public function lineno()
    {
        return $this->line;
    }
    public function token()
    {
        return $this->token;
    }
}
$p = new Calc(STDIN, new Exception());
$p->parse();