"Fossies" - the Fresh Open Source Software Archive  

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

gendata.cc  (ragel-7.0.0.10):gendata.cc  (ragel-7.0.0.11)
/* /*
* Copyright 2005-2007 Adrian Thurston <thurston@colm.net> * Copyright 2005-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.
skipping to change at line 623 skipping to change at line 623
/* The EOF trans is used when there is an eof target, otherwise the eof /* The EOF trans is used when there is an eof target, otherwise the eof
* action goes into state actions. */ * action goes into state actions. */
if ( state->eofTarget != 0 ) { if ( state->eofTarget != 0 ) {
long targ = state->eofTarget->alg.stateNum; long targ = state->eofTarget->alg.stateNum;
long action = -1; long action = -1;
if ( eofActions != 0 ) if ( eofActions != 0 )
action = eofActions->id; action = eofActions->id;
setEofTrans( curState, targ, action ); setEofTrans( curState, targ, action );
} }
if ( state->outCondSpace != 0 ) {
RedStateAp *rs = allStates + curState;
GenCondSpace *condSpace = allCondSpaces + state->outCondSpace->co
ndSpaceId;
rs->outCondSpace = condSpace;
rs->outCondKeys = state->outCondKeys;
// std::cout << "ck: " << state->alg.stateNum << " " <<
// state->outCondKeys.length() << std::endl;
//
// for ( CondKeySet::Iter k = state->outCondKeys; k.lte(); k++ ) {
// std::cout << " k: " << *k << std::endl;
// }
}
} }
void Reducer::makeTrans( Key lowKey, Key highKey, TransAp *trans ) void Reducer::makeTrans( Key lowKey, Key highKey, TransAp *trans )
{ {
RedCondEl *outConds; RedCondEl *outConds;
int numConds; int numConds;
assert( ( allStates + curState ) != redFsm->errState ); assert( ( allStates + curState ) != redFsm->errState );
if ( trans->plain() ) { if ( trans->plain() ) {
skipping to change at line 1590 skipping to change at line 1604
} }
writeInit(); writeInit();
} }
else if ( args[0] == "exec" ) { else if ( args[0] == "exec" ) {
for ( int i = 1; i < nargs; i++ ) { for ( int i = 1; i < nargs; i++ ) {
if ( args[i] == "noend" ) if ( args[i] == "noend" )
noEnd = true; noEnd = true;
else else
write_option_error( loc, args[i] ); write_option_error( loc, args[i] );
} }
nullbuf nb;
/* Nullify the output and execute the write. We use this pass to
collect references. */
std::streambuf *filt = out.rdbuf( &nb );
writeExec();
/* Restore the output and do the actual write. */
out.rdbuf( filt );
writeExec(); writeExec();
} }
else if ( args[0] == "exports" ) { else if ( args[0] == "exports" ) {
for ( int i = 1; i < nargs; i++ ) for ( int i = 1; i < nargs; i++ )
write_option_error( loc, args[i] ); write_option_error( loc, args[i] );
writeExports(); writeExports();
} }
else if ( args[0] == "start" ) { else if ( args[0] == "start" ) {
for ( int i = 1; i < nargs; i++ ) for ( int i = 1; i < nargs; i++ )
write_option_error( loc, args[i] ); write_option_error( loc, args[i] );
 End of changes. 3 change blocks. 
1 lines changed or deleted 25 lines changed or added

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