text
values of the returned Tokens. (See
CppReader, which does this.)
| Modifier and Type | Field and Description |
|---|---|
| private static final Macro | |
| private static final Macro | |
| private static final Macro | |
| private int | |
| private Token | |
| private final Set | |
| private VirtualFileSystem | |
| private List | |
| private final List | |
| private final List | |
| private static final Source | |
| private PreprocessorListener | |
| private final Logging. | |
| private final Map | |
| private final Set | |
| private List | |
| private Source | |
| private Token | |
| private final Stack | |
| private List | |
| private final Set |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private Token | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | close()
Implements java. |
| private Token | |
| protected void | |
| protected void | |
| private void | |
| pack-priv List | |
| private Token | |
| private Token | |
| private long | |
| private int | |
| private Token | |
| private void | |
| public boolean | getFeature(final Feature f)
Returns true if the given feature is in the feature-set of this Preprocessor. |
| public Set | |
| public VirtualFileSystem | |
| public List | |
| public List | |
| public PreprocessorListener | |
| public Macro | |
| public Map | |
| public List | getMacros(final boolean
if expand)true and if macro is not function-like,
i.e. a constant, the returned macro will be expanded.Returns a list of |
| public List | |
| public Source | |
| public List | |
| public boolean | getWarning(final Warning w)
Returns true if the given warning is in the warning-set of this Preprocessor. |
| public Set | |
| protected boolean | |
| protected boolean | |
| private void | |
| private Token | |
| private boolean | |
| private boolean | |
| private Token | |
| private boolean | |
| private Token | |
| protected Token | |
| protected void | |
| private void | |
| protected void | |
| private Token | |
| protected void | |
| protected void | |
| private void | |
| public void | setFileSystem(final VirtualFileSystem filesystem)
Sets the VirtualFileSystem used by this Preprocessor. |
| public void | setFrameworksPath(final List<String> path)
Sets the Objective-C frameworks path used by this Preprocessor. |
| public void | setListener(final PreprocessorListener listener)
Sets the PreprocessorListener which handles events for this Preprocessor. |
| public void | |
| public void | setSystemIncludePath(final List<String> path)
Sets the system include path used by this Preprocessor. |
| private Token | |
| private Token | |
| private Token | |
| private void | |
| public Token | |
| private Token | |
| public String | |
| private Token | |
| private Token | |
| protected void | |
| protected void |
| __COUNTER__ | back to summary |
|---|---|
| private static final Macro __COUNTER__ | |
| __FILE__ | back to summary |
|---|---|
| private static final Macro __FILE__ | |
| __LINE__ | back to summary |
|---|---|
| private static final Macro __LINE__ | |
| counter | back to summary |
|---|---|
| private int counter | |
| expr_token | back to summary |
|---|---|
| private Token expr_token
| |
| features | back to summary |
|---|---|
| private final Set<Feature> features | |
| filesystem | back to summary |
|---|---|
| private VirtualFileSystem filesystem | |
| frameworkspath | back to summary |
|---|---|
| private List<String> frameworkspath | |
| includes | back to summary |
|---|---|
| private final List<VirtualFile> includes | |
| inputs | back to summary |
|---|---|
| private final List<Source> inputs | |
| INTERNAL | back to summary |
|---|---|
| private static final Source INTERNAL | |
| listener | back to summary |
|---|---|
| private PreprocessorListener listener | |
| LOG | back to summary |
|---|---|
| private final Logging. | |
| macros | back to summary |
|---|---|
| private final Map<String, Macro> macros | |
| onceseenpaths | back to summary |
|---|---|
| private final Set<String> onceseenpaths | |
| quoteincludepath | back to summary |
|---|---|
| private List<String> quoteincludepath | |
| source | back to summary |
|---|---|
| private Source source | |
| source_token | back to summary |
|---|---|
| private Token source_token | |
| states | back to summary |
|---|---|
| private final Stack<State> states | |
| sysincludepath | back to summary |
|---|---|
| private List<String> sysincludepath | |
| warnings | back to summary |
|---|---|
| private final Set<Warning> warnings | |
| Preprocessor | back to summary |
|---|---|
| public Preprocessor() | |
| Preprocessor | back to summary |
|---|---|
| public Preprocessor(final Source initial) | |
| Preprocessor | back to summary |
|---|---|
| public Preprocessor(final File file) throws IOException Equivalent to
'new Preprocessor(new | |
| _token | back to summary |
|---|---|
private Token _token() throws IOException, LexerException
| |
| addFeature | back to summary |
|---|---|
| public void addFeature(final Feature f) Adds a feature to the feature-set of this Preprocessor. | |
| addFeatures | back to summary |
|---|---|
| public void addFeatures(final Collection<Feature> f) Adds features to the feature-set of this Preprocessor. | |
| addFeatures | back to summary |
|---|---|
| public void addFeatures(final Feature... f) Adds features to the feature-set of this Preprocessor. | |
| addInput | back to summary |
|---|---|
| public void addInput(final Source source) Adds input for the Preprocessor. Inputs are processed in the order in which they are added. | |
| addInput | back to summary |
|---|---|
| public void addInput(final File file) throws IOException Adds input for the Preprocessor.
| |
| addMacro | back to summary |
|---|---|
| public void addMacro(final Macro m) throws LexerException, IOException Adds a Macro to this Preprocessor.
The given | |
| addMacro | back to summary |
|---|---|
| public void addMacro(final String name, final String value) throws LexerException Defines the given name as a macro. The String value is lexed into a token stream, which is used as the macro expansion. | |
| addMacro | back to summary |
|---|---|
| public void addMacro(final String name) throws LexerException Defines the given name as a macro, with the value | |
| addWarning | back to summary |
|---|---|
| public void addWarning(final Warning w) Adds a warning to the warning-set of this Preprocessor. | |
| addWarnings | back to summary |
|---|---|
| public void addWarnings(final Collection<Warning> w) Adds warnings to the warning-set of this Preprocessor. | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| define | back to summary |
|---|---|
| private Token define() throws IOException, LexerException | |
| error | back to summary |
|---|---|
| protected void error(final int line, final int column, final String msg) throws LexerException Handles an error. If a PreprocessorListener is installed, it receives the error. Otherwise, an exception is thrown. | |
| error | back to summary |
|---|---|
| protected void error(final Token tok, final String msg) throws LexerException Handles an error. If a PreprocessorListener is installed, it receives the error. Otherwise, an exception is thrown.
| |
| error | back to summary |
|---|---|
| private void error(final Token pptok, final boolean is_error) throws IOException, LexerException | |
| expand | back to summary |
|---|---|
| pack-priv List Expands an argument.
| |
| expanded_token | back to summary |
|---|---|
private Token expanded_token() throws IOException, LexerException
| |
| expanded_token_nonwhite | back to summary |
|---|---|
private Token expanded_token_nonwhite() throws IOException, LexerException
| |
| expr | back to summary |
|---|---|
| private long expr(final int priority) throws IOException, LexerException | |
| expr_priority | back to summary |
|---|---|
| private int expr_priority(final Token op) | |
| expr_token | back to summary |
|---|---|
private Token expr_token() throws IOException, LexerException
| |
| expr_untoken | back to summary |
|---|---|
| private void expr_untoken(final Token tok) throws LexerException | |
| getFeature | back to summary |
|---|---|
| public boolean getFeature(final Feature f) Returns true if the given feature is in the feature-set of this Preprocessor. | |
| getFeatures | back to summary |
|---|---|
| public Set Returns the feature-set for this Preprocessor. This set may be freely modified by user code.
| |
| getFileSystem | back to summary |
|---|---|
| public VirtualFileSystem getFileSystem() Returns the VirtualFileSystem used by this Preprocessor.
| |
| getFrameworksPath | back to summary |
|---|---|
| public List Returns the Objective-C frameworks path used by this Preprocessor. This list may be freely modified by user code.
| |
| getIncludes | back to summary |
|---|---|
| public List Returns the list of
| |
| getListener | back to summary |
|---|---|
| public PreprocessorListener getListener() Returns the PreprocessorListener which handles events for this Preprocessor.
| |
| getMacro | back to summary |
|---|---|
| public Macro getMacro(final String name) Returns the named macro. While you can modify the returned object, unexpected things might happen if you do.
| |
| getMacros | back to summary |
|---|---|
| public Map Returns the Map of Macros parsed during the run of this Preprocessor.
| |
| getMacros | back to summary |
|---|---|
| public List Returns a list of
Implementation returns a new list of copy-ctor
| |
| getQuoteIncludePath | back to summary |
|---|---|
| public List Returns the user include-path of this Preprocessor. This list may be freely modified by user code.
| |
| getSource | back to summary |
|---|---|
| public Source getSource() Returns the top Source on the input stack.
| |
| getSystemIncludePath | back to summary |
|---|---|
| public List Returns the system include-path of this Preprocessor. This list may be freely modified by user code.
| |
| getWarning | back to summary |
|---|---|
| public boolean getWarning(final Warning w) Returns true if the given warning is in the warning-set of this Preprocessor. | |
| getWarnings | back to summary |
|---|---|
| public Set Returns the warning-set for this Preprocessor. This set may be freely modified by user code.
| |
| include | back to summary |
|---|---|
| protected boolean include(final VirtualFile file) throws IOException, LexerException Attempts to include the given file. User code may override this method to implement a virtual file system. | |
| include | back to summary |
|---|---|
| protected boolean include(final Iterable<String> path, final String name) throws IOException, LexerException Includes a file from an include path, by name. | |
| include | back to summary |
|---|---|
| private void include(final String parent, final int line, final String name, final boolean quoted, final boolean next) throws IOException, LexerException Handles an include directive. | |
| include | back to summary |
|---|---|
private Token include(final boolean next) throws IOException, LexerException
| |
| isActive | back to summary |
|---|---|
| private boolean isActive() | |
| isWhite | back to summary |
|---|---|
| private boolean isWhite(final Token tok) | |
| line_token | back to summary |
|---|---|
private Token line_token(final int line, final String name, final String extra)
| |
| macro | back to summary |
|---|---|
| private boolean macro(final Macro m, final Token orig) throws IOException, LexerException | |
| next_source | back to summary |
|---|---|
private Token next_source()
| |
| pop_source | back to summary |
|---|---|
| protected Token pop_source(final boolean linemarker) throws IOException Pops a Source from the input stack.
| |
| pop_source | back to summary |
|---|---|
| protected void pop_source() throws IOException | |
| pop_state | back to summary |
|---|---|
| private void pop_state() throws LexerException | |
| pragma | back to summary |
|---|---|
| protected void pragma(final Token name, final List<Token> value) throws IOException, LexerException | |
| pragma | back to summary |
|---|---|
private Token pragma() throws IOException, LexerException
| |
| pragma_once | back to summary |
|---|---|
| protected void pragma_once(final Token name) throws IOException, LexerException | |
| push_source | back to summary |
|---|---|
| protected void push_source(final Source source, final boolean autopop) Pushes a Source onto the input stack.
| |
| push_state | back to summary |
|---|---|
| private void push_state() | |
| setFileSystem | back to summary |
|---|---|
| public void setFileSystem(final VirtualFileSystem filesystem) Sets the VirtualFileSystem used by this Preprocessor. | |
| setFrameworksPath | back to summary |
|---|---|
| public void setFrameworksPath(final List<String> path) Sets the Objective-C frameworks path used by this Preprocessor. | |
| setListener | back to summary |
|---|---|
| public void setListener(final PreprocessorListener listener) Sets the PreprocessorListener which handles events for this Preprocessor. The listener is notified of warnings, errors and source changes, amongst other things. | |
| setQuoteIncludePath | back to summary |
|---|---|
| public void setQuoteIncludePath(final List<String> path) Sets the user include path used by this Preprocessor. | |
| setSystemIncludePath | back to summary |
|---|---|
| public void setSystemIncludePath(final List<String> path) Sets the system include path used by this Preprocessor. | |
| source_skipline | back to summary |
|---|---|
| private Token source_skipline(final boolean white) throws IOException, LexerException Returns an NL or an EOF token. The metadata on the token will be correct, which is better than generating a new one. This method can, as of recent patches, return a P_LINE token. | |
| source_token | back to summary |
|---|---|
private Token source_token() throws IOException, LexerException
| |
| source_token_nonwhite | back to summary |
|---|---|
| private Token source_token_nonwhite() throws IOException, LexerException | |
| source_untoken | back to summary |
|---|---|
| private void source_untoken(final Token tok) | |
| token | back to summary |
|---|---|
| public Token token() throws IOException, LexerException Returns the next preprocessor token.
| |
| token_nonwhite | back to summary |
|---|---|
private Token token_nonwhite() throws IOException, LexerException
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| toWhitespace | back to summary |
|---|---|
private Token toWhitespace(final Token tok)
| |
| undef | back to summary |
|---|---|
private Token undef() throws IOException, LexerException
| |
| warning | back to summary |
|---|---|
| protected void warning(final int line, final int column, final String msg) throws LexerException Handles a warning. If a PreprocessorListener is installed, it receives the warning. Otherwise, an exception is thrown. | |
| warning | back to summary |
|---|---|
| protected void warning(final Token tok, final String msg) throws LexerException Handles a warning. If a PreprocessorListener is installed, it receives the warning. Otherwise, an exception is thrown.
| |