Solved

DFA In C++

Posted on 2010-09-13
6
1,285 Views
Last Modified: 2012-05-10
I need an implementation of the DFA
0
Comment
Question by:CreuLINUX
  • 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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now