GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 02-Nov-2008, 01:31
Peter_APIIT Peter_APIIT is offline
Regular Member
 
Join Date: May 2007
Location: Malaysia
Posts: 545
Peter_APIIT can only hope to improve

How to write Regular Expression parser ?


Hello to all expect C++ programmer, i wonder how we can write this kind of parser.

I student and need to learn recursion and non-recursion method in process string as syntax parser.

Quote:
. = Match any characters except new line
^ = Match start of a line
$ = Match end of a line
() = Match sub expressions
{n} = Match these characters n times
{n, } = Match these characters at least n times
{n, m} = Match these characters at least n times and at most m times
*= Match 0 or more times
+ = Match 1 or more times
? = Match 1 or 0 times


I hope someone can give some guideline.

Thanks for your help.
  #2  
Old 04-Nov-2008, 06:04
n00pster n00pster is offline
Junior Member
 
Join Date: Sep 2008
Location: Miami
Posts: 40
n00pster will become famous soon enough

Re: How to write Regular Expression parser ?


Quote:
Originally Posted by Peter_APIIT
I student and need to learn recursion and non-recursion method in process string as syntax parser.
I hope someone can give some guideline.
Thanks for your help.

Could you please post your non-working, semi working code?
There might be many ways to do it, but basically you will have to set up a state machine.
 
 

Recent GIDBlogVista ?Widgets? on Windows XP by LocalTech

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Airport Log program using 3D linked List : problem reading from file batrsau C Programming Language 11 29-Feb-2008 07:44
Regular expression to DFA conversion c code sandipmw C Programming Language 1 23-Apr-2007 12:47
Need urgent help with regular expression matching Xilon C Programming Language 7 15-Oct-2006 03:04
Yet another CD burner problem: Lite-On LSC-24082K Erwin Computer Hardware Forum 1 22-May-2004 11:28
preg_replace + regular expression EasyExpat MySQL / PHP Forum 4 10-Jul-2003 04:36

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 06:06.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.