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) String[] |
docTags
Documentation tags, where we keep only the ones that could be compatible between Javadoc and Doxygen.
|
(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()
Converts Doxygen-like documentation comments placed after identifiers to Javadoc-style.
|
(package private) String |
commentBefore()
Converts Doxygen-like documentation comments placed before identifiers to Javadoc-style.
|
(package private) String |
commentDoc(String s,
int startIndex)
Tries to adapt a Doxygen-style documentation comment to Javadoc-style.
|
(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(Context context,
DeclarationList declList,
String[] includePath,
String include,
boolean isCFile) |
File |
parse(File outputDirectory,
String[] classPath,
Class cls) |
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
String[] docTags
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 commentDoc(String s, int startIndex)
String 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(Context context, DeclarationList declList, String[] includePath, String include, boolean isCFile) 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 © 2016. All rights reserved.