Click here to Skip to main content
13,085,613 members (89,753 online)
Click here to Skip to main content


233 bookmarked
Posted 9 Nov 2003

Writing own regular expression parser

, 14 Nov 2003
Explains principles behind writing regular expression parsers.
// RegExDemoDlg.h : header file

#if !defined(AFX_REGEXDEMODLG_H__85624EB8_426C_4F32_B10B_6D460C99F025__INCLUDED_)
#define AFX_REGEXDEMODLG_H__85624EB8_426C_4F32_B10B_6D460C99F025__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

// CRegExDemoDlg dialog

#include "AG_FindDialog.h"
#include "AG_RegEx.h"

class CRegExDemoDlg : public CDialog
// Construction
	CRegExDemoDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	CRichEditCtrl	m_rich_edit;

	// ClassWizard generated virtual function overrides
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

// Implementation
	HICON m_hIcon;

	// Main Menu 
	CMenu m_MainMenu;

	// Find Dialog
	CAG_FindDialog m_FindDialog;

	// Regular Expression Parser
	CAG_RegEx m_RegEx;

	// Rich Edit Font
	CFont m_Font;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnFileExit();
	afx_msg void OnFileOpen();
	afx_msg void OnEditFind();
	afx_msg LRESULT OnFindNext(WPARAM wParam, LPARAM lParam);
	virtual void OnOK() {};
	afx_msg void OnEditTestmenu();
	afx_msg void OnHelpAbout();

// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_REGEXDEMODLG_H__85624EB8_426C_4F32_B10B_6D460C99F025__INCLUDED_)

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.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Amer Gerzic
President Infinity Software Solutions, LLC.
United States United States
Originally from Bosnia and Herzegovina, but lived for 6 years in Germany where I did majority of education, then moved to US, where I live since 1999. I like programming, computers in general, but also Basketball, Soccer, Tennis, and many other things. Masters graduate from Grand Valley State University in CIS and working as a full time software developer. Please visit my website

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.170813.1 | Last Updated 15 Nov 2003
Article Copyright 2003 by Amer Gerzic
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid