Solved

DFA In C++

Posted on 2010-09-13
6
1,311 Views
Last Modified: 2012-05-10
I need an implementation of the DFA
0
Comment
Question by:CreuLINUX
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 40

Accepted Solution

by:
evilrix earned 500 total points
ID: 33660949
I presume you are referring to a Deterministic finite-state Machine?

http://en.wikipedia.org/wiki/Deterministic_finite-state_machine

If so, take a look at the DFA implementation in PCRE.
http://www.pcre.org/

Specifically, pcre_dfa_exec.c
0
 

Author Comment

by:CreuLINUX
ID: 33661032
i need in c++ =/
0
 
LVL 40

Expert Comment

by:evilrix
ID: 33661044
>> i need in c++ =/

Are you just looking to learn how a state machine works or so you actually need some kind of library. It would really help if you provided is with some context.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:CreuLINUX
ID: 33661964
just need the source code
0
 
LVL 40

Expert Comment

by:evilrix
ID: 33662046
>> just need the source code
Without some background info I suspect you won't get much in the way of assistance. Asking for source code for "an implementation of the DFA" is pretty meaningless since there are many different types of DFA. DFA is just an engineering concept (a type of state machine, there are others) that can be used in many different ways and scenarios.

If you could just explain a little more about what you need it for it would allow us to point you in the right direction. If you don't want to that is also fine but you are likely to find the assistance you get is a little vague.

I am just trying to help you help us find you the best solution. If you have no wish to provide more information there is no need for you to reply to me :)
0
 

Author Comment

by:CreuLINUX
ID: 33662748
I need a "generic", I tell the initial state, final state, the
transitions and an input string.
Then he shows me the transitions and whether it was accepted or not ...
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to learn Linux? 10 98
Autosar OS Multicore Share Resources confusion ? 2 200
C qsort compare function issue 6 70
Can someone explain the following statement in C? 4 71
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question