Re: [PHP-DEV] Single-line comment problem

2010-07-08 Thread Johannes Schlüter
On Fri, 2010-07-09 at 00:49 +0400, jvlad wrote: > >"Scott MacVicar" wrote: > >Yeah because /* */ has a clear end where // and # doesn't. > > > >- S > > > Shouldn't the end of the line be always considered as a true end of the > one-line comment? > In other words, I think it always has a clear en

Re: [PHP-DEV] Single-line comment problem

2010-07-08 Thread jvlad
>"Scott MacVicar" wrote: >Yeah because /* */ has a clear end where // and # doesn't. > >- S Shouldn't the end of the line be always considered as a true end of the one-line comment? In other words, I think it always has a clear end too. Similarly, lexer always regognizes the strings - their star

Re: [PHP-DEV] Single-line comment problem

2010-07-08 Thread Scott MacVicar
Yeah because /* */ has a clear end where // and # doesn't. - S On 8 Jul 2010, at 12:50, "jvlad" wrote: >> Parsing ends with ?> regardless if its a comment or not but its not >> context sensitive. It can't understand that its within a string. >> >> - S > > Not exactly, it's only // comment st

Re: [PHP-DEV] Single-line comment problem

2010-07-08 Thread jvlad
> Parsing ends with ?> regardless if its a comment or not but its not > context sensitive. It can't understand that its within a string. > > - S Not exactly, it's only // comment style does not comment the tag while /* */ does. The following script outputs its 'afafa': '; */ echo 'afaf

Re: [PHP-DEV] Single-line comment problem

2010-07-07 Thread Scott MacVicar
The scanner is looking for \r \n % if ASP tags are enabled or ?> before it marks the end of the comment. Take the following I am HTML, hear me roar! Parsing ends with ?> regardless if its a comment or not but its not context sensitive. It can't understand that its within a string. - S On J