#include <nedparser.h>
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.
Public Member Functions | |
| NEDParser () | |
| ~NEDParser () | |
| void | setParseExpressions (bool b) |
| void | setStoreSource (bool b) |
| bool | parseFile (const char *fname) |
| bool | parseText (const char *nedtext) |
| NEDElement * | getTree () |
| void | error (const char *msg, int line) |
| void | dbg (YYLTYPE lc, const char *what) |
Public Attributes | |
| NEDElement * | tree |
| NEDFileBuffer * | nedsource |
Protected Attributes | |
| bool | parseexpr |
| bool | storesrc |
| const char * | filename |
| int | num_errors |
|
|
Constructor.
|
|
|
Destructor.
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
|
Returns the object tree which is the result of the parsing. Further calls to getTree() result in NULL pointer to be returned. |
|
|
Parse the given file. Result can be obtained from getTree(). |
|
|
Parse the given NED text. Result can be obtained from getTree(). |
|
|
Affects operation of parseFile() and parseText(), specifies whether expressions should be parsed or not. Default is true. |
|
|
Affects operation of parseFile() and parseText(), specifies whether sourceCode attributes in NEDElements should be filled out. Default is false. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.9.1