"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/binary.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.

binary.h  (ragel-7.0.0.10):binary.h  (ragel-7.0.0.11)
/* /*
* Copyright 2001-2014 Adrian Thurston <thurston@colm.net> * Copyright 2001-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 _BINARY_H #ifndef _C_BINARY_H
#define _BINARY_H #define _C_BINARY_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 Binary class Binary
: public CodeGen : public virtual Tables
{ {
protected:
enum Type {
Loop = 1, Exp
};
public: public:
Binary( const CodeGenArgs &args ); Binary( const CodeGenArgs &args, Type type )
:
Tables( args ),
type(type)
{}
protected: protected:
TableArray keyOffsets; Type type;
TableArray singleLens;
TableArray rangeLens;
TableArray indexOffsets;
TableArray indicies;
TableArray transCondSpacesWi;
TableArray transOffsetsWi;
TableArray transLengthsWi;
TableArray transCondSpaces;
TableArray transOffsets;
TableArray transLengths;
TableArray condTargs;
TableArray condActions;
TableArray toStateActions;
TableArray fromStateActions;
TableArray eofActions;
TableArray eofTransDirect;
TableArray eofTransIndexed;
TableArray actions;
TableArray keys;
TableArray condKeys;
TableArray nfaTargs;
TableArray nfaOffsets;
TableArray nfaPushActions;
TableArray nfaPopTrans;
std::ostream &COND_KEYS_v1(); std::ostream &COND_KEYS_v1();
std::ostream &COND_SPACES_v1(); std::ostream &COND_SPACES_v1();
std::ostream &INDICIES(); std::ostream &INDICIES();
std::ostream &INDEX_OFFSETS(); std::ostream &INDEX_OFFSETS();
std::ostream &SINGLE_LENS(); std::ostream &SINGLE_LENS();
std::ostream &RANGE_LENS(); std::ostream &RANGE_LENS();
std::ostream &TRANS_TARGS_WI(); std::ostream &TRANS_TARGS_WI();
std::ostream &ACTIONS_ARRAY(); std::ostream &ACTIONS_ARRAY();
skipping to change at line 92 skipping to change at line 78
void taTransCondSpacesWi(); void taTransCondSpacesWi();
void taTransOffsetsWi(); void taTransOffsetsWi();
void taTransLengthsWi(); void taTransLengthsWi();
void taTransCondSpaces(); void taTransCondSpaces();
void taTransOffsets(); void taTransOffsets();
void taTransLengths(); void taTransLengths();
void taCondTargs(); void taCondTargs();
void taCondActions(); void taCondActions();
void taToStateActions(); void taToStateActions();
void taFromStateActions(); void taFromStateActions();
void taEofTrans();
void taEofConds();
void taEofActions(); void taEofActions();
void taEofTransDirect();
void taEofTransIndexed();
void taKeys(); void taKeys();
void taActions(); void taActions();
void taCondKeys(); void taCondKeys();
void taNfaTargs(); void taNfaTargs();
void taNfaOffsets(); void taNfaOffsets();
void taNfaPushActions(); void taNfaPushActions();
void taNfaPopTrans(); void taNfaPopTrans();
void setKeyType(); void setKeyType();
void LOCATE_TRANS();
void LOCATE_COND();
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;
void setTableState( TableArray::State ); void setTableState( TableArray::State );
void NFA_PUSH(); virtual void writeData();
void NFA_POP(); virtual void tableDataPass();
virtual void genAnalysis();
}; };
#endif #endif
 End of changes. 11 change blocks. 
63 lines changed or deleted 21 lines changed or added

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