public abstract class PragmaHandler extends Object
Constructor and Description |
---|
PragmaHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
closeScope(SymtabEntry entry)
This method is called when the parser encounters a right curly brace.
|
protected String |
currentToken()
Get the current token.
|
protected SymtabEntry |
getEntryForName(String string)
This method, given an entry name, returns the entry with that name.
|
protected String |
getStringToEOL()
This method returns a string of all of the characters from the input
file from the current position up to, but not including, the end-of-line
character(s).
|
protected String |
getUntil(char c)
This method returns a string of all of the characters from the input
file from the current position up to, but not including, the given
character.
|
protected String |
nextToken()
This method returns the next token String from the input file.
|
protected void |
openScope(SymtabEntry entry)
This method is called when the parser encounters a left curly brace.
|
protected void |
parseException(String message)
This method displays a Parser Exception complete with line number
and position information with the given message string.
|
abstract boolean |
process(String pragma,
String currentToken) |
protected SymtabEntry |
scopedName()
This method assumes that the current token marks the beginning
of a scoped name.
|
protected void |
skipToEOL()
Skip to the end of the line.
|
protected String |
skipUntil(char c)
This method skips the data in the input file until the specified
character is encountered, then it returns the next token.
|
public abstract boolean process(String pragma, String currentToken) throws IOException
IOException
protected String currentToken()
protected SymtabEntry getEntryForName(String string)
protected String getStringToEOL() throws IOException
IOException
protected String getUntil(char c) throws IOException
IOException
protected String nextToken() throws IOException
IOException
protected SymtabEntry scopedName() throws IOException
IOException
protected void skipToEOL() throws IOException
IOException
protected String skipUntil(char c) throws IOException
IOException
protected void parseException(String message)
protected void openScope(SymtabEntry entry)
entry
- the symbol table entry whose scope has just been opened.
Be aware that, since the scope has just been entered, this entry is
incomplete at this point.protected void closeScope(SymtabEntry entry)
entry
- the symbol table entry whose scope has just been closed.Copyright © 2017 JBoss by Red Hat. All rights reserved.