summaryrefslogtreecommitdiff
path: root/colm/lmscan.h
diff options
context:
space:
mode:
Diffstat (limited to 'colm/lmscan.h')
-rw-r--r--colm/lmscan.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/colm/lmscan.h b/colm/lmscan.h
index 55f466b4..5badaed5 100644
--- a/colm/lmscan.h
+++ b/colm/lmscan.h
@@ -57,23 +57,18 @@ typedef Vector<const char *> ArgsVector;
extern ArgsVector includePaths;
-struct Scanner
+struct ColmScanner
{
- Scanner( const char *fileName, istream &input,
- ostream &output, ColmParser *includeToParser, int includeDepth )
+ ColmScanner( const char *fileName, istream &input,
+ ostream &output, ColmParser *parser, int includeDepth )
:
fileName(fileName), input(input), output(output),
includeDepth(includeDepth),
line(1), column(1), lastnl(0),
+ parser(parser),
parserExistsError(false),
whitespaceOn(true)
{
- if ( includeToParser != 0 )
- parser = includeToParser;
- else {
- parser = new ColmParser( fileName, "machine", InputLoc() );
- parser->init();
- }
}
ifstream *tryOpenInclude( char **pathChecks, long &found );