Solved

DFA In C++

Posted on 2010-09-13
6
1,307 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
Independent Software Vendors: 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

Industry Leaders: 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!

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 split this in C++ 4 117
C++ question 3 74
fatal error: vector: No such file or directory   Visual Studio 2015 for Arduino 4 97
Raspberry Pi 3 to send text message 9 192
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

763 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