NEDParser Class Reference
[NED Parsing]
Parses NED files into a NED object tree.
More...
#include <nedparser.h>
List of all members.
Detailed Description
Parses NED files into a NED object tree.
Elements of the tree are subclassed from NEDElement; NEDElementFactory is used to actually create the objects. Internally this class uses a bison/flex grammar and NEDFileBuffer.
Constructor & Destructor Documentation
NEDParser::~NEDParser |
( |
|
) |
|
Member Function Documentation
void NEDParser::error |
( |
const char * |
msg, |
|
|
int |
line | |
|
) |
| | |
static const char* NEDParser::getBuiltInDeclarations |
( |
|
) |
[static] |
Returns a NED source which contains declarations of built-in NED types.
const char* NEDParser::getFileName |
( |
|
) |
[inline] |
May only be called during parsing.
It returns the name of the source file being parsed.
bool NEDParser::getParseExpressionsFlag |
( |
|
) |
[inline] |
bool NEDParser::getStoreSourceFlag |
( |
|
) |
[inline] |
static bool NEDParser::guessIsNEDInNewSyntax |
( |
const char * |
txt |
) |
[static, protected] |
bool NEDParser::loadFile |
( |
const char * |
osfname, |
|
|
const char * |
fname | |
|
) |
| | [protected] |
bool NEDParser::loadText |
( |
const char * |
nedtext, |
|
|
const char * |
fname | |
|
) |
| | [protected] |
NEDElement* NEDParser::parseMSGFile |
( |
const char * |
osfname, |
|
|
const char * |
fname = NULL | |
|
) |
| | |
Parse the given MSG (.msg) file and return the result tree.
Returns NULL or partial tree if there was an error. The fname parameter will be used to fill in the source location attributes; it defaults to osfname.
NEDElement* NEDParser::parseMSGText |
( |
const char * |
nedtext, |
|
|
const char * |
fname = NULL | |
|
) |
| | |
Parse the given MSG source and return the result tree.
Returns NULL or partial tree if there was an error. The fname parameter will be used to fill in the source location attributes; it defaults to osfname.
NEDElement* NEDParser::parseNEDExpression |
( |
const char * |
nedexpression |
) |
|
Parse the given text as a NED expression, and return the result tree.
Returns NULL or partial tree if there was an error.
NEDElement* NEDParser::parseNEDFile |
( |
const char * |
osfname, |
|
|
const char * |
fname = NULL | |
|
) |
| | |
Parses the given NED file (osfname), and returns the result tree.
Returns NULL or partial tree if there was an error. The fname parameter will be used to fill in the source location attributes; it defaults to osfname.
NEDElement* NEDParser::parseNEDText |
( |
const char * |
nedtext, |
|
|
const char * |
fname = NULL | |
|
) |
| | |
Parse the given NED source and return the result tree.
Returns NULL or partial tree if there was an error. The fname parameter will be used to fill in the source location attributes; it defaults to "buffer".
void NEDParser::setParseExpressions |
( |
bool |
b |
) |
[inline] |
Affects operation of parseFile() and parseText(), specifies whether expressions should be parsed or not.
Default is true.
void NEDParser::setStoreSource |
( |
bool |
b |
) |
[inline] |
Affects operation of parseFile() and parseText(), specifies whether sourceCode attributes in NEDElements should be filled out.
Default is false.
Member Data Documentation
The documentation for this class was generated from the following file: