org.anarres.cpp
Class Preprocessor
java.lang.Object
org.anarres.cpp.Preprocessor
public class Preprocessor
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Preprocessor
public Preprocessor(Source initial)
Preprocessor
public Preprocessor(File file)
throws IOException
- Throws:
IOException
error
protected void error(int level,
Token tok,
String msg)
throws LexerException
- Throws:
LexerException
setErrorHandler
public void setErrorHandler(ErrorHandler h)
getErrorHandler
public ErrorHandler getErrorHandler()
addMacro
public void addMacro(Macro m)
throws LexerException
- Throws:
LexerException
setIncludePath
public void setIncludePath(List<String> path)
getMacros
protected Map<String,Macro> getMacros()
getSource
protected Source getSource()
push_source
protected void push_source(Source source,
boolean autopop)
pop_source
protected void pop_source()
include
protected void include(File parent,
int line,
String name,
boolean quoted)
throws IOException,
LexerException
- Throws:
IOException
LexerException
token
public Token token()
throws IOException,
LexerException
- Returns the next preprocessor token.
- Throws:
LexerException
- if a preprocessing error occurs.
InternalException
- if an unexpected error condition arises.
IOException
- See Also:
Token
Copyright © 2007 Shevek, Anarres. All Rights Reserved.