![]() |
|
#1
|
|||
|
|||
Regular expression to DFA conversion c codeRegular expression to DFA conversion c code
please if u have any algo or code send me |
|
#2
|
|||
|
|||
Re: Regular expression to DFA conversion c codeQuote:
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 GIDBlog
Meeting the populace by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
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