public class Parser extends Object
That said, to understand how it is supposed to function in its present state, one can step through the code at runtime: It is quite friendly to debuggers.
Moreover, it relies on Info objects created as part of the execution
of InfoMapper.map(InfoMap). We can understand better how the parsing
is supposed to get accomplished by studying that documentation as well.
To do: - Inherit constructors from helper classes, if possible - etc.
Info,
InfoMap,
InfoMapper| Modifier and Type | Field and Description |
|---|---|
(package private) InfoMap |
infoMap |
(package private) InfoMap |
leafInfoMap |
(package private) String |
lineSeparator |
(package private) Logger |
logger |
(package private) Properties |
properties |
(package private) TokenIndexer |
tokens |
| Constructor and Description |
|---|
Parser(Logger logger,
Properties properties) |
Parser(Logger logger,
Properties properties,
String lineSeparator) |
Parser(Parser p,
String text) |
| Modifier and Type | Method and Description |
|---|---|
(package private) Attribute |
attribute() |
(package private) String |
body() |
(package private) String |
commentAfter() |
(package private) String |
commentBefore() |
(package private) void |
containers(Context context,
DeclarationList declList) |
(package private) void |
declarations(Context context,
DeclarationList declList) |
(package private) Declarator |
declarator(Context context,
String defaultName,
int infoNumber,
boolean useDefaults,
int varNumber,
boolean arrayAsPointer,
boolean pointerAsArray) |
(package private) boolean |
enumeration(Context context,
DeclarationList declList) |
(package private) boolean |
extern(Context context,
DeclarationList declList) |
(package private) boolean |
function(Context context,
DeclarationList declList) |
(package private) boolean |
group(Context context,
DeclarationList declList) |
(package private) boolean |
macro(Context context,
DeclarationList declList) |
(package private) boolean |
namespace(Context context,
DeclarationList declList) |
(package private) Parameters |
parameters(Context context,
int infoNumber,
boolean useDefaults) |
(package private) void |
parse(File outputFile,
Context context,
String[] includePath,
String... includes) |
File |
parse(File outputDirectory,
String[] classPath,
Class cls) |
(package private) void |
parse(String outputFilename,
Context context,
String[] includePath,
String... includes) |
File |
parse(String outputDirectory,
String[] classPath,
Class cls) |
(package private) TemplateMap |
template(Context context) |
(package private) Type[] |
templateArguments(Context context) |
(package private) String |
translate(String text) |
(package private) Type |
type(Context context) |
(package private) boolean |
typedef(Context context,
DeclarationList declList) |
(package private) boolean |
using(Context context,
DeclarationList declList) |
(package private) boolean |
variable(Context context,
DeclarationList declList) |
final Logger logger
final Properties properties
InfoMap infoMap
InfoMap leafInfoMap
TokenIndexer tokens
String lineSeparator
public Parser(Logger logger, Properties properties)
public Parser(Logger logger, Properties properties, String lineSeparator)
void containers(Context context, DeclarationList declList) throws ParserException
ParserExceptionTemplateMap template(Context context) throws ParserException
ParserExceptionType[] templateArguments(Context context) throws ParserException
ParserExceptionType type(Context context) throws ParserException
ParserExceptionDeclarator declarator(Context context, String defaultName, int infoNumber, boolean useDefaults, int varNumber, boolean arrayAsPointer, boolean pointerAsArray) throws ParserException
ParserExceptionString commentBefore() throws ParserException
ParserExceptionString commentAfter() throws ParserException
ParserExceptionAttribute attribute() throws ParserException
ParserExceptionString body() throws ParserException
ParserExceptionParameters parameters(Context context, int infoNumber, boolean useDefaults) throws ParserException
ParserExceptionboolean function(Context context, DeclarationList declList) throws ParserException
ParserExceptionboolean variable(Context context, DeclarationList declList) throws ParserException
ParserExceptionboolean macro(Context context, DeclarationList declList) throws ParserException
ParserExceptionboolean typedef(Context context, DeclarationList declList) throws ParserException
ParserExceptionboolean using(Context context, DeclarationList declList) throws ParserException
ParserExceptionboolean group(Context context, DeclarationList declList) throws ParserException
ParserExceptionboolean enumeration(Context context, DeclarationList declList) throws ParserException
ParserExceptionboolean namespace(Context context, DeclarationList declList) throws ParserException
ParserExceptionboolean extern(Context context, DeclarationList declList) throws ParserException
ParserExceptionvoid declarations(Context context, DeclarationList declList) throws ParserException
ParserExceptionvoid parse(String outputFilename, Context context, String[] includePath, String... includes) throws IOException, ParserException
IOExceptionParserExceptionvoid parse(File outputFile, Context context, String[] includePath, String... includes) throws IOException, ParserException
IOExceptionParserExceptionpublic File parse(String outputDirectory, String[] classPath, Class cls) throws IOException, ParserException
IOExceptionParserExceptionpublic File parse(File outputDirectory, String[] classPath, Class cls) throws IOException, ParserException
IOExceptionParserExceptionCopyright © 2014. All Rights Reserved.