"Fossies" - the Fresh Open Source Software Archive  

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

allocgen.cc  (ragel-7.0.0.10):allocgen.cc  (ragel-7.0.0.11)
/* /*
* Copyright 2005-2011 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 33 skipping to change at line 33
#include "ragel.h" #include "ragel.h"
#include "parsedata.h" #include "parsedata.h"
#include "fsmgraph.h" #include "fsmgraph.h"
#include "gendata.h" #include "gendata.h"
#include "inputdata.h" #include "inputdata.h"
#include "version.h" #include "version.h"
/* /*
* Code generators. * Code generators.
*/ */
#include "binloop.h" #include "binvar.h"
#include "binexp.h" #include "bingoto.h"
#include "flatloop.h" #include "flatvar.h"
#include "flatexp.h" #include "flatgoto.h"
#include "gotoloop.h" #include "gotoloop.h"
#include "gotoexp.h" #include "gotoexp.h"
#include "ipgoto.h" #include "ipgoto.h"
#include "asm.h" #include "asm.h"
CodeGenData *asm_makeCodeGen( const HostLang *hostLang, const CodeGenArgs &args
)
{
return new AsmCodeGen( args );
}
/* Invoked by the parser when a ragel definition is opened. */ /* Invoked by the parser when a ragel definition is opened. */
CodeGenData *makeCodeGen( const HostLang *hostLang, const CodeGenArgs &args ) CodeGenData *makeCodeGen( const HostLang *hostLang, const CodeGenArgs &args )
{ {
FsmGbl *id = args.id;
CodeGenData *codeGen = 0; CodeGenData *codeGen = 0;
if ( hostLang->lang == HostLang::Asm ) {
codeGen = new AsmCodeGen( args ); switch ( args.codeStyle ) {
} case GenBinaryLoop:
else { if ( hostLang->feature == GotoFeature )
switch ( args.codeStyle ) { codeGen = new BinGotoLoop( args );
case GenBinaryLoop: else
codeGen = new BinaryLoopGoto( args ); codeGen = new BinVarLoop( args );
break; break;
case GenBinaryExp:
codeGen = new BinaryExpGoto( args ); case GenBinaryExp:
break; if ( hostLang->feature == GotoFeature )
codeGen = new BinGotoExp( args );
case GenFlatLoop: else
codeGen = new FlatLoopGoto( args ); codeGen = new BinVarExp( args );
break; break;
case GenFlatExp:
codeGen = new FlatExpGoto( args ); case GenFlatLoop:
break; if ( hostLang->feature == GotoFeature )
codeGen = new FlatGotoLoop( args );
case GenSwitchLoop: else
codeGen = new SwitchLoopGoto( args ); codeGen = new FlatVarLoop( args );
break; break;
case GenSwitchExp:
codeGen = new SwitchExpGoto( args ); case GenFlatExp:
break; if ( hostLang->feature == GotoFeature )
case GenIpGoto: codeGen = new FlatGotoExp( args );
codeGen = new IpGoto( args ); else
break; codeGen = new FlatVarExp( args );
} break;
case GenSwitchLoop:
if ( hostLang->feature == GotoFeature )
codeGen = new SwitchGotoLoop(args);
else
id->error() << "unsupported lang/style combination" << en
dp;
break;
case GenSwitchExp:
if ( hostLang->feature == GotoFeature )
codeGen = new SwitchGotoExp(args);
else
id->error() << "unsupported lang/style combination" << en
dp;
break;
case GenIpGoto:
if ( hostLang->feature == GotoFeature )
codeGen = new IpGoto(args);
else
id->error() << "unsupported lang/style combination" << en
dp;
break;
} }
return codeGen; return codeGen;
} }
 End of changes. 5 change blocks. 
34 lines changed or deleted 64 lines changed or added

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