ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> scintilla-interest
scintilla-interest
RE: [scintilla] Retrieve info from lexer
by Eido Safrai other posts by this author
Feb 29 2004 10:18AM messages near this date
[scintilla] [ scintilla-Support Requests-907171 ] MSSQL lexer | [scintilla] publicize FindColumn function
As I see it we can define the feature in 2 levels
1. Basic level - scintilla level:
   At this level we add 3 function in each lexer:
   1.1 getStartBlockCommentMark() - return a string with all start block
comment marks separated by '\n' or something according to the lexer
type (in c return '*\')
   1.2 getEndBlockCommentMark() - return a string with all end block
comment marks separated by '\n' or something according to the lexer
type (in c return '\*')
   1.3 getStreamCommentMark() - return a string with all stream comment

       marks separated by '\n' or something according to the lexer
type (in c return '\\')

2. External level - each scintilla user need to add these level if he
wants      
   to support extended behavior (like scite) - for example start block

   comment '/***********'.

   At this level the following function is necessary:
   2.1 addPostfixToStartBlockComment(char *pPostfix)
   2.2 addPrefixToEndBlockComment(char *pPrefix)
   2.3 addPostfixToStreamComment(char *pPostfix) 

Regards,



-----Original Message-----
From: scintilla-interest-bounces@[...].org
[mailto:scintilla-interest-bounces@[...].org] On Behalf Of Neil Hodgson
Sent: Friday, February 27, 2004 2:09 PM
To: Discussion of the Scintilla editing component
Subject: Re: [scintilla] Retrieve info from lexer

Eido Safrai:

>  I want to add the stream-comment & box-comment
>  to my application, in SciTE the information for
> 
>  That function is stored in the properties files
>  (comment.box.start comment.box.end ).
> 
>  1. Why not to take this information from the lexer (it's
>  already now it)?.

   The lexer should know all the ways that a comment may be created. For
example in Basic, you can use REM or ' to start a line comment. Pascal
has
two stream comments: (* *) and {}.
comment.box.* defines the particular sequence you want to the commenting
command which will use one of the available comment indicators along
with
additional formatting. Some people may want
comment.stream.start.cpp=/*****
comment.stream.end.cpp=*****/

>  2. The SciTE why store duplicate info (one in lexer
>  & one in property file)

   The purposes are different and the values may therefore be different.

>  3. Is it possible to define interface function to get the
>  comment chars from the lexer ?

   It may be a sensible idea to have the lexer provide more information
about the language but I don't think you have rigorously enough defined
what
you want the lexer to yield here.

   Neil

_______________________________________________
Scintilla-interest mailing list
Scintilla-interest@[...].org
http://mailman.lyra.org/mailman/listinfo/scintilla-interest



_______________________________________________
Scintilla-interest mailing list
Scintilla-interest@[...].org
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved