"Fossies" - the Fresh Open Source Software Archive  

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

parsedata.cc  (ragel-7.0.0.10):parsedata.cc  (ragel-7.0.0.11)
/* /*
* Copyright 2001-2008 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.
skipping to change at line 1211 skipping to change at line 1211
void ParseData::reportAnalysisResult( FsmRes &res ) void ParseData::reportAnalysisResult( FsmRes &res )
{ {
if ( res.type == FsmRes::TypeTooManyStates ) if ( res.type == FsmRes::TypeTooManyStates )
analysisResult( 1, 0, "too-many-states" ); analysisResult( 1, 0, "too-many-states" );
else if ( res.type == FsmRes::TypeCondCostTooHigh ) else if ( res.type == FsmRes::TypeCondCostTooHigh )
analysisResult( 20, res.id, "cond-cost" ); analysisResult( 20, res.id, "cond-cost" );
else if ( res.type == FsmRes::TypePriorInteraction ) else if ( res.type == FsmRes::TypePriorInteraction )
analysisResult( 60, res.id, "prior-interaction" ); analysisResult( 60, res.id, "prior-interaction" );
else if ( res.type == FsmRes::TypeRepetitionError )
analysisResult( 2, 0, "rep-error" );
} }
/* Make the graph from a graph dict node. Does minimization and state sorting. * / /* Make the graph from a graph dict node. Does minimization and state sorting. * /
FsmRes ParseData::makeInstance( GraphDictEl *gdNode ) FsmRes ParseData::makeInstance( GraphDictEl *gdNode )
{ {
if ( id->printStatistics ) if ( id->printStatistics )
id->stats() << "compiling\t" << sectionName << endl; id->stats() << "compiling\t" << sectionName << endl;
if ( id->stateLimit > 0 ) if ( id->stateLimit > 0 )
fsmCtx->stateLimit = id->stateLimit; fsmCtx->stateLimit = id->stateLimit;
skipping to change at line 1441 skipping to change at line 1438
std::ostream &out, const HostLang *hostLang ) std::ostream &out, const HostLang *hostLang )
{ {
Reducer *red = new Reducer( this->id, fsmCtx, sectionGraph, sectionName, machineId ); Reducer *red = new Reducer( this->id, fsmCtx, sectionGraph, sectionName, machineId );
red->make( hostLang, alphType ); red->make( hostLang, alphType );
CodeGenArgs args( this->id, red, alphType, machineId, inputFileName, sect ionName, out, codeStyle ); CodeGenArgs args( this->id, red, alphType, machineId, inputFileName, sect ionName, out, codeStyle );
args.lineDirectives = !id->noLineDirectives; args.lineDirectives = !id->noLineDirectives;
/* Write out with it. */ /* Write out with it. */
cgd = makeCodeGen( hostLang, args ); cgd = (*hostLang->makeCodeGen)( hostLang, args );
/* Code generation anlysis step. */ /* Code generation anlysis step. */
cgd->genAnalysis(); cgd->genAnalysis();
} }
#if 0 #if 0
void ParseData::generateXML( ostream &out ) void ParseData::generateXML( ostream &out )
{ {
/* Make the generator. */ /* Make the generator. */
XMLCodeGen codeGen( sectionName, machineId, id, this, sectionGraph, out ) ; XMLCodeGen codeGen( sectionName, machineId, id, this, sectionGraph, out ) ;
 End of changes. 3 change blocks. 
5 lines changed or deleted 2 lines changed or added

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