"Fossies" - the Fresh Open Source Software Archive  

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

inputdata.h  (ragel-7.0.0.10):inputdata.h  (ragel-7.0.0.11)
/* /*
* Copyright 2008 Adrian Thurston <thurston@colm.net> * Copyright 2008-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 171 skipping to change at line 171
char *data; char *data;
int len; int len;
}; };
struct InputData struct InputData
: :
public FsmGbl public FsmGbl
{ {
InputData() InputData( const HostLang *hostLang, struct colm_sections *rlhcSections = 0 )
: :
FsmGbl(hostLang),
rlhcSections(rlhcSections),
inputFileName(0), inputFileName(0),
outputFileName(0), outputFileName(0),
commFileName(0),
nextMachineId(0), nextMachineId(0),
inStream(0), inStream(0),
outStream(0), outStream(0),
outFilter(0), outFilter(0),
curItem(0), curItem(0),
lastFlush(0), lastFlush(0),
hostLang(&hostLangC),
codeStyle(GenBinaryLoop), codeStyle(GenBinaryLoop),
dotGenPd(0), dotGenPd(0),
machineSpec(0), machineSpec(0),
machineName(0), machineName(0),
generateDot(false), generateDot(false),
noLineDirectives(false), noLineDirectives(false),
maxTransitions(LONG_MAX), maxTransitions(LONG_MAX),
numSplitPartitions(0), numSplitPartitions(0),
rubyImpl(MRI), rubyImpl(MRI),
rlhc(false),
rlhcShowCmd(false), rlhcShowCmd(false),
noIntermediate(false), noIntermediate(false),
frontendSpecified(false), frontendSpecified(false),
backendSpecified(false),
featureSpecified(false),
saveTemps(false), saveTemps(false),
condsCheckDepth(-1), condsCheckDepth(-1),
transSpanDepth(6), transSpanDepth(6),
stateLimit(0), stateLimit(0),
checkBreadth(0), checkBreadth(0),
varBackend(false), varBackend(false),
histogramFn(0), histogramFn(0),
histogram(0), histogram(0),
input(0), input(0),
forceLibRagel(false) forceLibRagel(false)
{} {
}
~InputData(); ~InputData();
void usage(); void usage();
void version(); void version();
void showHostLangNames(); void showHostLangNames();
void showHostLangArgs(); void showHostLangArgs();
void showFrontends(); void showFrontends();
void showBackends(); void showBackends();
void showStyles();
struct colm_sections *rlhcSections;
std::string dirName; std::string dirName;
/* The name of the root section, this does not change during an include. */ /* The name of the root section, this does not change during an include. */
const char *inputFileName; const char *inputFileName;
const char *outputFileName; const char *outputFileName;
const char *commFileName;
string comm; string comm;
int nextMachineId; int nextMachineId;
std::string origOutputFileName; std::string origOutputFileName;
std::string genOutputFileName; std::string genOutputFileName;
/* Io globals. */ /* Io globals. */
std::istream *inStream; std::istream *inStream;
std::ostream *outStream; std::ostream *outStream;
output_filter *outFilter; output_filter *outFilter;
ParseDataDict parseDataDict; ParseDataDict parseDataDict;
ParseDataList parseDataList; ParseDataList parseDataList;
InputItemList inputItems; InputItemList inputItems;
InputItem *curItem; InputItem *curItem;
InputItem *lastFlush; InputItem *lastFlush;
const HostLang *hostLang;
/* Ragel-6 frontend. */ /* Ragel-6 frontend. */
ParserDict parserDict; ParserDict parserDict;
ParserList parserList; ParserList parserList;
SectionDict sectionDict; SectionDict sectionDict;
SectionList sectionList; SectionList sectionList;
ArgsVector includePaths; ArgsVector includePaths;
bool isBreadthLabel( const string &label ); bool isBreadthLabel( const string &label );
skipping to change at line 274 skipping to change at line 276
bool generateDot; bool generateDot;
bool noLineDirectives; bool noLineDirectives;
long maxTransitions; long maxTransitions;
int numSplitPartitions; int numSplitPartitions;
/* Target ruby impl */ /* Target ruby impl */
RubyImplEnum rubyImpl; RubyImplEnum rubyImpl;
bool rlhc;
bool rlhcShowCmd; bool rlhcShowCmd;
bool noIntermediate; bool noIntermediate;
bool frontendSpecified; bool frontendSpecified;
RagelFrontend frontend; RagelFrontend frontend;
bool backendSpecified;
bool featureSpecified;
bool saveTemps; bool saveTemps;
long condsCheckDepth; long condsCheckDepth;
long transSpanDepth; long transSpanDepth;
long stateLimit; long stateLimit;
bool checkBreadth; bool checkBreadth;
bool varBackend; bool varBackend;
const char *histogramFn; const char *histogramFn;
double *histogram; double *histogram;
const char *input; const char *input;
Vector<const char**> streamFileNames; Vector<const char**> streamFileNames;
bool forceLibRagel;
void verifyWriteHasData( InputItem *ii ); void verifyWriteHasData( InputItem *ii );
void verifyWritesHaveData(); void verifyWritesHaveData();
void makeTranslateOutputFileName(); void makeTranslateOutputFileName();
void flushRemaining(); void flushRemaining();
void makeFirstInputItem(); void makeFirstInputItem();
void writeOutput(); void writeOutput();
void makeDefaultFileName(); void makeDefaultFileName();
void createOutputStream(); void createOutputStream();
void openOutput(); void openOutput();
void closeOutput(); void closeOutput();
void generateReduced(); void generateReduced();
void prepareSingleMachine(); void prepareSingleMachine();
void prepareAllMachines(); void prepareAllMachines();
void cDefaultFileName( const char *inputFile );
void asmDefaultFileName( const char *inputFile );
void writeOutput( InputItem *ii ); void writeOutput( InputItem *ii );
void writeLanguage( std::ostream &out ); void writeLanguage( std::ostream &out );
bool checkLastRef( InputItem *ii ); bool checkLastRef( InputItem *ii );
void parseKelbt(); void parseKelbt();
void processDot(); void processDot();
void processCodeEarly();
void writeDot( std::ostream &out ); void writeDot( std::ostream &out );
void loadHistogram(); void loadHistogram();
void defaultHistogram(); void defaultHistogram();
void parseArgs( int argc, const char **argv ); void parseArgs( int argc, const char **argv );
void checkArgs(); void checkArgs();
void terminateParser( Parser6 *parser ); void terminateParser( Parser6 *parser );
void terminateAllParsers(); void terminateAllParsers();
void runRlhc();
void processKelbt(); void processKelbt();
void processColm(); void processColm();
bool processReduce(); bool processReduce();
bool process(); bool process();
bool parseReduce(); bool parseReduce();
char *readInput( const char *inputFileName ); char *readInput( const char *inputFileName );
bool forceLibRagel;
const char **makeIncludePathChecks( const char *curFileName, const char * fileName ); const char **makeIncludePathChecks( const char *curFileName, const char * fileName );
std::ifstream *tryOpenInclude( const char **pathChecks, long &found ); std::ifstream *tryOpenInclude( const char **pathChecks, long &found );
int main( int argc, const char **argv );
int rlhcRun( int argc, const char **argv );
int rlhcMain( int argc, const char **argv );
}; };
#endif #endif
 End of changes. 20 change blocks. 
15 lines changed or deleted 23 lines changed or added

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