Package com.scriptbasic.readers
Interface HierarchicalSourceReader
-
- All Superinterfaces:
SourceLocationBound,SourceReader
- All Known Implementing Classes:
GenericHierarchicalSourceReader
public interface HierarchicalSourceReader extends SourceReader
A hierarchical reader can include sources into the string of characters read returned by another reader. Implementation usually do not directly read any source, but rather use a non hierarchical reader to read the source.To give the hierarchical reader to a Lexical Analyzer is done usually following the pattern:
SourceReader reader = someSourceProvider.get("some source name"); HierarchicalSourceReader hierarchicalReader = new SomeHierarchicalReader(); hierarchicalReader.include(reader); LexicalAnalyzer lexicalAnalyzer = new ScriptBasicLexicalAnalyzer(); la.set(hierarchicalReader);- Author:
- Peter Verhas
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidinclude(SourceReader reader)-
Methods inherited from interface com.scriptbasic.interfaces.SourceLocationBound
getFileName, getLineNumber, getPosition
-
Methods inherited from interface com.scriptbasic.readers.SourceReader
get, getSourceProvider, unget
-
-
-
-
Method Detail
-
include
void include(SourceReader reader)
-
-