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 |
encoding |
(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 encoding,
String lineSeparator) |
Parser(Parser p,
String text) |
Modifier and Type | Method and Description |
---|---|
(package private) Attribute |
attribute() |
(package private) Attribute |
attribute(boolean explicit) |
(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) static String |
incorporateConstAnnotation(String annotations,
int constValueIndex,
boolean constValue) |
(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) Type |
type(Context context,
boolean definition) |
(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
final String encoding
InfoMap infoMap
InfoMap leafInfoMap
TokenIndexer tokens
String lineSeparator
public Parser(Logger logger, Properties properties)
public Parser(Logger logger, Properties properties, String encoding, String lineSeparator)
void containers(Context context, DeclarationList declList) throws ParserException
ParserException
TemplateMap template(Context context) throws ParserException
ParserException
Type[] templateArguments(Context context) throws ParserException
ParserException
Type type(Context context) throws ParserException
ParserException
Type type(Context context, boolean definition) throws ParserException
ParserException
Declarator declarator(Context context, String defaultName, int infoNumber, boolean useDefaults, int varNumber, boolean arrayAsPointer, boolean pointerAsArray) throws ParserException
ParserException
String commentDoc(String s, int startIndex)
String commentBefore() throws ParserException
ParserException
String commentAfter() throws ParserException
ParserException
Attribute attribute() throws ParserException
ParserException
Attribute attribute(boolean explicit) throws ParserException
ParserException
String body() throws ParserException
ParserException
Parameters parameters(Context context, int infoNumber, boolean useDefaults) throws ParserException
ParserException
static String incorporateConstAnnotation(String annotations, int constValueIndex, boolean constValue)
boolean function(Context context, DeclarationList declList) throws ParserException
ParserException
boolean variable(Context context, DeclarationList declList) throws ParserException
ParserException
boolean macro(Context context, DeclarationList declList) throws ParserException
ParserException
boolean typedef(Context context, DeclarationList declList) throws ParserException
ParserException
boolean using(Context context, DeclarationList declList) throws ParserException
ParserException
boolean group(Context context, DeclarationList declList) throws ParserException
ParserException
boolean enumeration(Context context, DeclarationList declList) throws ParserException
ParserException
boolean namespace(Context context, DeclarationList declList) throws ParserException
ParserException
boolean extern(Context context, DeclarationList declList) throws ParserException
ParserException
void declarations(Context context, DeclarationList declList) throws ParserException
ParserException
void parse(Context context, DeclarationList declList, String[] includePath, String include, boolean isCFile) throws IOException, ParserException
IOException
ParserException
public File[] parse(String outputDirectory, String[] classPath, Class cls) throws IOException, ParserException
IOException
ParserException
public File[] parse(File outputDirectory, String[] classPath, Class cls) throws IOException, ParserException
IOException
ParserException
Copyright © 2020. All rights reserved.