EControl Ltd. Forum Index EControl Ltd.
VCL libraries and software support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Defining a range with same start-end-rule

 
Post new topic   Reply to topic    EControl Ltd. Forum Index -> EControl Syntax Editor
View previous topic :: View next topic  
Author Message
Schnorrenberg



Joined: 10 Aug 2006
Posts: 8

PostPosted: Sat Aug 26, 2006 1:52 pm    Post subject: Defining a range with same start-end-rule Reply with quote

Hello Michael,

I want to define a range (start-end), which detects such a header section:

*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(QUERY_TABLE) TYPE DD02L-TABNAME
*" VALUE(ROWCOUNT) TYPE SOID-ACCNT DEFAULT 0
*" EXPORTING
*" VALUE(ROWSREAD) TYPE SOID-ACCNT
*" VALUE(DATAPATH) TYPE RFCPUT-PATH
*" VALUE(RECSIZE) TYPE SOID-ACCNT
*" TABLES
*" FIELDS STRUCTURE RFC_DB_FLD
*" OPTIONS STRUCTURE RFC_DB_OPT
*" ORDERBY STRUCTURE RFC_DB_FLD
*" EXCEPTIONS
*" TABLE_NOT_AVAILABLE
*" TABLE_WITHOUT_DATA
*" FIELD_NOT_VALID
*" NOT_AUTHORIZED
*" FILE_ERROR
*"
*"----------------------------------------------------------------------

Is this possible? (I fail, because the start-rule is the same as the end-rule *"-------------)

Hans-Jürgen
Back to top
View user's profile Send private message
Schnorrenberg



Joined: 10 Aug 2006
Posts: 8

PostPosted: Sat Aug 26, 2006 2:57 pm    Post subject: Reply with quote

I found a solution:

Defining:

1.Token "HeaderLine" with regex \*"-+

2.Range End "Header End" with condition "HeaderLine" and Parent Block "Header" and cancel rules.

3.Range Start "Header" with Range End "Header End" and condition "HeaderLine"

Is this correct?
Back to top
View user's profile Send private message
itsatomic



Joined: 12 Jun 2006
Posts: 38

PostPosted: Sun Aug 27, 2006 3:08 am    Post subject: Reply with quote

Wow, impressive. Being able to create complex or just complete syntax settings for different languages is pretty much the final frontier for me with this control - I just have no really good idea where to start and am too scared to look through the code to "work it out".

I'd love to have 4-5 tutorials based on creating the lexer / syntax analyser for a relatively complex language, from start to finish.
Back to top
View user's profile Send private message
econtrol
Site Admin


Joined: 09 Jun 2006
Posts: 202

PostPosted: Mon Aug 28, 2006 9:36 am    Post subject: Reply with quote

Yes, this solution is correct.

P.S. Lexer design tutorial will be in new documentation.

Michael.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    EControl Ltd. Forum Index -> EControl Syntax Editor All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group