Print Page | Close Window

Defining own schema

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Syntax Edit
Forum Description: Topics Related to Codejock Syntax Edit
URL: http://forum.codejock.com/forum_posts.asp?TID=16635
Printed Date: 10 May 2024 at 12:05pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Defining own schema
Posted By: 4aeng
Subject: Defining own schema
Date Posted: 26 April 2010 at 11:25am
Hi.

Is there a way to use regular expressions in lex schema definitions?
I need to define tokens like this:

"<<" variable_name [operator variable_name] ";" format ">>"
variable_name = (a-z,A-Z,0-9,_)+
operator = {+,-,/,*,^,%}
format = (0-9)+ "S" (0-9)+ "D"

So << and >> are the start resp. end tags of the whole token. This token consists of two parts which are seperated by the semicolon.
The first part includes a variable definition with an optional mathematical expression. The second part defines a format definition for the value of the variable resp. result of the expression. I want the SyntaxEdit control to recognize tokens and highlight them.

Is this possible with lex? Or is there a documentation of lex somewhere?

Best regards,
Ronald Unterberger



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net