Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Syntax Edit
  New Posts New Posts RSS Feed - Defining own schema
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Defining own schema

 Post Reply Post Reply
Author
Message Reverse Sort Order
4aeng View Drop Down
Newbie
Newbie


Joined: 23 November 2009
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote 4aeng Quote  Post ReplyReply Direct Link To This Post Topic: Defining own schema
    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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.