Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

An Implementation of Regular Expression Parser in C#

, 24 Jun 2009
An article on how one can implement regular expression parser
LexAnal3_regexpr2nfa.zip
LexAnal3_regexpr2nfa.pdf
LexAnal4_nfa2dfa.zip
LexAnal4_nfa2dfa.pdf
LexAnal5_minimaldfa.zip
LexAnal5_minimaldfa.pdf
RegExDemo.zip
RegExDemo
Driver
MatchInfoDS.xsc
MatchInfoDS.xss
Properties
Settings.settings
RegExImpl.suo
RegularExpression
FsaDS.xsc
FsaDS.xss
Properties
Settings.settings
RegExSource.zip
RegExSource
RegularExpression
FsaDS.xsc
FsaDS.xss
Properties
Settings.settings
RegEx_Demo.zip
RegularExpression.dll
Driver.exe
RegEx_Src.zip
RegularExpression
Properties
Settings.settings
Driver
MatchInfoDS.xsc
MatchInfoDS.xss
Properties
Settings.settings
using System;
using System.Collections.Generic;
using System.Text;

namespace RegularExpression
{
  /// <summary>
  /// see NfaDiagram.txt file.
  /// this class represent a box in that diagram.
  /// this class helps constructing the NFA from the regular expression
  /// </summary>
  class NfaExpression
  {
    public NfaExpression()
    {
      m_stateStart = new State();
      m_stateFinal = new State();

    }
    public NfaExpression(State stateFrom, State stateTo)
    {
      m_stateStart = stateFrom;
      m_stateFinal = stateTo;

    }

    State m_stateStart = null;
    State m_stateFinal = null;

    public State StartState()
    {
      return m_stateStart;
    }

    public State FinalState()
    {
      return m_stateFinal;
    }


  }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Mizan Rahman

Denmark Denmark
No Biography provided

| Advertise | Privacy | Mobile
Web04 | 2.8.140922.1 | Last Updated 24 Jun 2009
Article Copyright 2008 by Mizan Rahman
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid