www.pudn.com > cppcc.rar > dfa_generator.hh
/*
* File: dfa_generator.hh
* $Id: dfa_generator.hh,v 1.3 2002/05/27 02:59:16 alec Exp $
*
* Author: Alec Panovici (alecu@email.com)
*
* Comments:
*
* Revision history:
*
* $Log: dfa_generator.hh,v $
* Revision 1.3 2002/05/27 02:59:16 alec
* doc update
*
* Revision 1.2 2002/05/04 17:39:22 alec
* the scanner works (slightly tested)
*
* Revision 1.1 2002/04/30 16:26:38 alec
* my big endian will eat your little endian
*
*/
/*
Copyright (C) 2002 Alexandru Panoviciu (alecu@email.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __DFA_GENERATOR_HH__
#define __DFA_GENERATOR_HH__
#include "debug.h"
#include "parse_util.hh"
class ScannerDfaSpec;
class PropRegistry;
class ScannerSpec;
class ITokenSpec;
/**
* This class provides an interface for generating a DFA from a ScannerSpec
* object. It has a single "do it"-like method, called createScannerDfa, which
* recieves a ScannerSpec object and returns a newly created ScannerDfa
* object.
*/
class DfaGenerator
{
public:
/**
* Creates a ScannerDfaSpec from the input ScannerSpec object. This is
* accomplished by instantiating a BasicDfaGenerator and using it to
* generate a BasicDfaSpec object for each lexical state in the ScannerSpec
* object. The BasicDfaSpec objects are then bundled together into the
* ScannerDfaSpec object.
*/
ScannerDfaSpec& createScannerDfa (PropRegistry ®istry,
ScannerSpec &scanner,
ITokenSpec &tokens);
};
#endif /* #ifndef __DFA_GENERATOR_HH__ */