variable definition in php.lang and python.lang

View: New views
2 Messages — Rating Filter:   Alert me  

variable definition in php.lang and python.lang

by gnombat :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There seems to be a strange definition in php.lang and python.lang:

$ grep :upper: *.lang
php.lang:variable = '[[:upper:]][[:word:]]*|_'
prolog.lang:variable = '[[:upper:]][[:word:]]*|_'
python.lang:variable = '[[:upper:]][[:word:]]*|_'

I believe this is correct for Prolog, but for Python or PHP ...?


_______________________________________________
Help-source-highlight mailing list
Help-source-highlight@...
http://lists.gnu.org/mailman/listinfo/help-source-highlight

Re: variable definition in php.lang and python.lang

by Lorenzo Bettini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

gnombat@... wrote:
> There seems to be a strange definition in php.lang and python.lang:
>
> $ grep :upper: *.lang
> php.lang:variable = '[[:upper:]][[:word:]]*|_'
> prolog.lang:variable = '[[:upper:]][[:word:]]*|_'
> python.lang:variable = '[[:upper:]][[:word:]]*|_'
>
> I believe this is correct for Prolog, but for Python or PHP ...?

I guess you're right!  That must be an old cut&paste...

variables are defined in the line

type = '(?:\$[#]?|@|%)[[:word:]]+'

it's misleading since it is called as type (it was due to previous
versions where the variable style was not included).  Actually variable
and type are formatted the same way so the problem doesn't show, but I
need to update these .lang files!

thanks for the feedback
cheers
        Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DSI, Univ. di Firenze
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


_______________________________________________
Help-source-highlight mailing list
Help-source-highlight@...
http://lists.gnu.org/mailman/listinfo/help-source-highlight