- Main Page
- Modules
- Classes
- Files
- Directories

- Class List
- Class Hierarchy
- Class Members

# NEDParser Class Reference
[NED Parsing]

`#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.

## 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 Documentation

NEDParser::NEDParser | ( |  | ) |

| Constructor.

NEDParser::~NEDParser | ( |  | ) |

| Destructor.

## Member Function Documentation

void NEDParser::dbg | ( | YYLTYPE | lc,
|  | const char * | what
| ) |

void NEDParser::error | ( | const char * | msg,
|  | int | line
| ) |

NEDElement* NEDParser::getTree | ( |  | ) |

| Returns the object tree which is the result of the parsing. Further calls to getTree() result in NULL pointer to be returned.

bool NEDParser::parseFile | ( | const char * | fname | ) |

| Parse the given file. Result can be obtained from getTree().

bool NEDParser::parseText | ( | const char * | nedtext | ) |

| Parse the given NED text. Result can be obtained from getTree().

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

const char* NEDParser::filename`[protected]`

NEDFileBuffer* NEDParser::nedsource

int NEDParser::num_errors`[protected]`

bool NEDParser::parseexpr`[protected]`

bool NEDParser::storesrc`[protected]`

NEDElement* NEDParser::tree

The documentation for this class was generated from the following file:

- nedparser.h