On Mon, 2011-11-07 at 16:58 +0000, Clint M Priest wrote:
> I'm sure the problem is that I hadn't modified the .l file as Nikita
> suggested, which I have now done but the build doesn't seem to be
> affected by changes to that file so I'm trying to find out how to make
> that occur.  I believe it's via re2c which I have installed but a make
> clean/make still results in the same error.
> 
> Is there something I need to run to process zend_language_scanner.l?

After installing re2c re-run configure. check the configure output for
re2c references. We don't expect Average Joe to have it installed and
fail silently if it's not detected. You can also delete
zend_language_scanner.c.

johannes

> -----Original Message-----
> From: Nikita Popov [mailto:nikita....@googlemail.com] 
> Sent: Monday, November 07, 2011 12:12 AM
> To: php-...@zerocue.com
> Cc: internals@lists.php.net
> Subject: Re: [PHP-DEV] Help w/ Parser
> 
> I don't see an attachment. Could you send it again with .txt as file 
> extension?
> 
> If you want 'get' to be recognized as T_GET you need to define such a token 
> in the lexer (zend_language_scanner.l). Did you do that?
> 
> On Mon, Nov 7, 2011 at 3:53 AM,  <php-...@zerocue.com> wrote:
> > I'm having trouble getting some changes to the parser to recognize 
> > some new syntax.  I've attached a patch of what I've done.
> >
> >
> >
> > Here is the syntax I am trying to get to be parsed properly:
> >
> > <?php
> >
> > class TimePeriod {
> >
> >
> >
> >      public $Seconds;
> >
> >
> >
> >      public function __construct($Seconds) {
> >
> >            $this->Seconds = $Seconds;
> >
> >      }
> >
> >      // Getters/Setters
> >
> >      public $Hours {
> >
> >            get { return $this->Seconds / 3600; }
> >
> >            set { $this->Seconds = $value * 3600; } // The variable 
> > $value holds the incoming value to be "set"
> >
> >      }
> >
> > };
> >
> > ?>
> >
> >
> >
> > After compiling and attempting to execute the above PHP file, I'm 
> > getting this parse error:
> >
> >
> >
> > Parse error: syntax error, unexpected 'get' (T_STRING), expecting get
> > (T_GET) or set (T_SET) in /mnt/hgfs/svn/php-src-test/test.php on line 
> > 13
> >
> >
> >
> > Why is the parse recognizing the 'get' as T_STRING rather than get (T_GET)?
> >
> >
> >
> > Thanks,
> >
> >
> >
> > -Clint
> >
> > --
> > PHP Internals - PHP Runtime Development Mailing List To unsubscribe, 
> > visit: http://www.php.net/unsub.php
> >
> 



-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to