summaryrefslogtreecommitdiff
path: root/ragel/gendata.cc
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2011-09-11 06:12:47 +0000
committerAdrian Thurston <thurston@complang.org>2011-09-11 06:12:47 +0000
commit7d1e2cb03b39300c02089a0c2bab67dc1991f36e (patch)
tree4cc5764b7ff69e62023376be88cb301ceeda8904 /ragel/gendata.cc
parent9df991350c7d6c46296b24298e397bdca9e6f709 (diff)
downloadcolm-7d1e2cb03b39300c02089a0c2bab67dc1991f36e.tar.gz
Passing an args struct into the code gen objects. Makes it easy to alter the
arguments without modifying a whole lot of constructor functions. refs #321.
Diffstat (limited to 'ragel/gendata.cc')
-rw-r--r--ragel/gendata.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/ragel/gendata.cc b/ragel/gendata.cc
index eb5481db..938a1250 100644
--- a/ragel/gendata.cc
+++ b/ragel/gendata.cc
@@ -107,11 +107,11 @@ void genLineDirective( ostream &out )
/* Total error count. */
/* int gblErrorCount = 0; */
-CodeGenData::CodeGenData( ostream &out )
+CodeGenData::CodeGenData( const CodeGenArgs &args )
:
- sourceFileName(0),
- fsmName(0),
- out(out),
+ sourceFileName(args.sourceFileName),
+ fsmName(args.fsmName),
+ out(args.out),
redFsm(0),
allActions(0),
allActionTables(0),
@@ -143,7 +143,6 @@ CodeGenData::CodeGenData( ostream &out )
noCS(false)
{}
-
void CodeGenData::createMachine()
{
redFsm = new RedFsmAp();