GIDForums  

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

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 23-Apr-2007, 03:31
sandipmw sandipmw is offline
New Member
 
Join Date: Apr 2007
Posts: 1
sandipmw is on a distinguished road

Regular expression to DFA conversion c code


Regular expression to DFA conversion c code
please if u have any algo or code send me
  #2  
Old 23-Apr-2007, 12:47
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 4,710
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: Regular expression to DFA conversion c code


Quote:
Originally Posted by sandipmw
Regular expression to DFA conversion


A general-purpose conversion program for this task would be quite elaborate. In fact, there are special utility programs (special languages, actually) that work to do most of the conversion.

Many programmers have performed this very thing (to write compilers, for example) using a lexical analyzer, called Lex, and a "compiler-compiler" named Yacc. (GNU equivalents are called Flex and Bison, and are supplied with, or are available for, most Linux distributions.)

The output of Lex and/or Yacc is some C code (data structures and functions) that the implementer uses to actually make a working program.

For a specific, special-purpose program for some simple problem, you could do everything in C, without the Lex front-end.

I would not expect an assignment like this to be given in an introductory-level class unless the actual task was restricted to a small, specific example. If this is a class covering formal grammar and/or finite automata, then there is a fair amount of understanding that is prerequesite to actually sitting down and planning the code, let alone actually starting to write the code.

I might start with a general approach, as described in this tutorial:
http://lambda.uta.edu/cse5317/spring01/notes/node9.html

If you start an implementation and have some problems, then you can show us what you have, and ask specific questions about what you don't understand.

Regards,

Dave
 
 

Recent GIDBlogMeeting the populace by crystalattice

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
How to sort random access file? wmmccoy0910 C Programming Language 12 04-Sep-2006 03:40
Here it is again! 35% - 40% off For Life! my-e-space Web Hosting Advertisements & Offers 0 20-Apr-2006 14:48
User defined headers davis Miscellaneous Programming Forum 6 16-Feb-2006 18:40
Problem with int mixed with char,... leitz C++ Forum 17 07-Dec-2004 20:56
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 03:16.


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