"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/flat.h" between
ragel-7.0.0.10.tar.gz and ragel-7.0.0.11.tar.gz

About: Ragel compiles executable finite state machines from regular languages (C, C++, Obj-C, C#, D, Java, Go and Ruby). Development version.

flat.h  (ragel-7.0.0.10):flat.h  (ragel-7.0.0.11)
/* /*
* Copyright 2004-2014 Adrian Thurston <thurston@colm.net> * Copyright 2004-2018 Adrian Thurston <thurston@colm.net>
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to * of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the * deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is * sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions: * furnished to do so, subject to the following conditions:
* *
* The above copyright notice and this permission notice shall be included in al l * The above copyright notice and this permission notice shall be included in al l
* copies or substantial portions of the Software. * copies or substantial portions of the Software.
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE. * SOFTWARE.
*/ */
#ifndef _FLAT_H #ifndef _C_FLAT_H
#define _FLAT_H #define _C_FLAT_H
#include <iostream> #include <iostream>
#include "codegen.h" #include "codegen.h"
#include "tables.h"
/* Forwards. */ /* Forwards. */
struct CodeGenData; struct CodeGenData;
struct NameInst; struct NameInst;
struct RedTransAp; struct RedTransAp;
struct RedStateAp; struct RedStateAp;
class Flat class Flat
: public CodeGen : public virtual Tables
{ {
protected:
enum Type {
Loop = 1, Exp
};
public: public:
Flat( const CodeGenArgs &args ); Flat( const CodeGenArgs &args, Type type )
:
Tables( args ),
type(type)
{}
virtual ~Flat() { } virtual ~Flat() { }
protected: protected:
TableArray actions; Type type;
TableArray keys;
TableArray charClass;
TableArray flatIndexOffset;
TableArray indicies;
TableArray indexDefaults;
TableArray transCondSpaces;
TableArray transOffsets;
TableArray condTargs;
TableArray condActions;
TableArray toStateActions;
TableArray fromStateActions;
TableArray eofActions;
TableArray eofTrans;
TableArray nfaTargs;
TableArray nfaOffsets;
TableArray nfaPushActions;
TableArray nfaPopTrans;
void taKeys(); void taKeys();
void taKeySpans(); void taKeySpans();
void taCharClass(); void taCharClass();
void taActions(); void taActions();
void taFlatIndexOffset(); void taFlatIndexOffset();
void taIndicies(); void taIndicies();
void taIndexDefaults(); void taIndexDefaults();
void taTransCondSpaces(); void taTransCondSpaces();
void taTransOffsets(); void taTransOffsets();
void taCondTargs(); void taCondTargs();
void taCondActions(); void taCondActions();
void taToStateActions(); void taToStateActions();
void taFromStateActions(); void taFromStateActions();
void taEofActions(); void taEofActions();
void taEofTrans(); void taEofTrans();
void taEofConds();
void taNfaTargs(); void taNfaTargs();
void taNfaOffsets(); void taNfaOffsets();
void taNfaPushActions(); void taNfaPushActions();
void taNfaPopTrans(); void taNfaPopTrans();
void setKeyType(); void setKeyType();
std::ostream &INDICIES(); std::ostream &INDICIES();
std::ostream &TO_STATE_ACTIONS();
std::ostream &FROM_STATE_ACTIONS();
std::ostream &EOF_ACTIONS();
std::ostream &EOF_TRANS();
std::ostream &TRANS_COND_SPACES(); std::ostream &TRANS_COND_SPACES();
std::ostream &TRANS_OFFSETS(); std::ostream &TRANS_OFFSETS();
std::ostream &TRANS_LENGTHS(); std::ostream &TRANS_LENGTHS();
std::ostream &COND_KEYS(); std::ostream &COND_KEYS();
std::ostream &COND_TARGS(); std::ostream &COND_TARGS();
std::ostream &COND_ACTIONS(); std::ostream &COND_ACTIONS();
void LOCATE_TRANS();
void GOTO( ostream &ret, int gotoDest, bool inFinish );
void CALL( ostream &ret, int callDest, int targState, bool inFinish );
void NCALL( ostream &ret, int callDest, int targState, bool inFinish );
void NEXT( ostream &ret, int nextDest, bool inFinish );
void GOTO_EXPR( ostream &ret, GenInlineItem *ilItem, bool inFinish );
void NEXT_EXPR( ostream &ret, GenInlineItem *ilItem, bool inFinish );
void CALL_EXPR( ostream &ret, GenInlineItem *ilItem, int targState, bool
inFinish );
void NCALL_EXPR( ostream &ret, GenInlineItem *ilItem, int targState, bool
inFinish );
void CURS( ostream &ret, bool inFinish );
void TARGS( ostream &ret, bool inFinish, int targState );
void RET( ostream &ret, bool inFinish );
void NRET( ostream &ret, bool inFinish );
void BREAK( ostream &ret, int targState, bool csForced );
void NBREAK( ostream &ret, int targState, bool csForced );
virtual void TO_STATE_ACTION( RedStateAp *state ) = 0;
virtual void FROM_STATE_ACTION( RedStateAp *state ) = 0;
virtual void EOF_ACTION( RedStateAp *state ) = 0;
virtual void COND_ACTION( RedCondPair *cond ) = 0;
virtual void NFA_PUSH_ACTION( RedNfaTarg *targ ) = 0;
virtual void NFA_POP_TEST( RedNfaTarg *targ ) = 0;
virtual void NFA_FROM_STATE_ACTION_EXEC() = 0;
virtual void setTableState( TableArray::State ); virtual void setTableState( TableArray::State );
void NFA_PUSH(); virtual void genAnalysis();
void NFA_POP(); virtual void tableDataPass();
virtual void writeData();
}; };
#endif #endif
 End of changes. 11 change blocks. 
56 lines changed or deleted 20 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)