On 3 August 2012 11:11, Ramesh Vishveshwar <thecodeisclear@null.net> wrote:
> For a new language file that I am working upon, the comments structure is
> quite unique. A comment is identified by any line whose first non-space
> character is an asterisk (*). Just using COMMENT_SINGLE = array( 1 => '*')
> converts even expressions such as "25 * 4"
>
> I went through the documentation and I think I could use COMMENT_REGEXP. Can
> someone tell me how to use this? (I guess the check would include * followed
> by a non numeric character [\D], preceded by spaces[\s]). It may be quite
> simple to implement, but the PHP manual on REGEXP is quite confusing.
Hi Ramesh
see the octave.php language as an example. On the COMMENT_REGEXP #4 I
used something similar. A block comments starts if the first non-space
characters are #{ or %{ and ends in the same way (only difference
being that brackets must be closing).
Carnë
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
geshi-devel mailing list
geshi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geshi-devel
No comments:
Post a Comment