Main Page Class Hierarchy Compound List File List Compound Members

# CommandParser Class Reference

base class used to parse command More...

`#include <cparser.h>`

Inheritance diagram for CommandParser:

List of all members.

## Public Methods
bool | GetCommand ()
| read one command from the buffer
bool | FlushArg ()
| flush command buffer
wxString | GetErrorMes ()
| get the error message if parsing went wrong
bool | GetEnv (const wxString &envname, wxString &envstring)
| get environment variable
DL_List< const wxString * > * | GetArgList ()
| list of command arguments found
DL_Iter< const wxString * > * | GetArgIter ()
| iterator to traverse the list of command arguments found
wxString | GetCommandParsed ()
| get the parses command

## Detailed Description

base class used to parse command

strings according to the BNF below.

See also:
  Evalstring , Line_Parser

      Below you can see the Bachus Naur representation of the enhanced parser:

      <commands>                      ::= [<blanks>]
                            {         { <command> }*
                            }

      <command>                       ::= [<blanks>] {<comment> | {<word> {<blanks> | <endcommand}}* }*

      <endcommand>    ::=  {';' | '\n' | '\0' }

      <word>                          ::=  { <quotedstring> | <bracedstring> | <multipartword> }

      <quotedstring>          ::= ('"') {CHAR | '\"' | '\\n' | aliasref | envref }* ('"')

      <bracedstring>          ::= ('{') {CHAR | '\{' | '\}' | '\\n'}* ('}')

      <multipartword> ::=  { <aliasref> | <envref> | {CHAR | '\\n'}* }*

      <aliasref>                      ::= ('%') { <name> <blank> | ('{') <name> ('}') }

      <envref>                                ::= ('$') { <name> <blank> | ('{') <name> ('}') }

      <name>                          ::= { LETTER | DIGIT | UNDERSCORE | MINUS }*

      <blanks>                        ::= { TAB | SPACE | '\\n'}*

      <comment>               ::= # {CHAR}* ('\0')

      note:
              [ ]     entity CAN occur zero or more times
              ( )     entity MUST occur
              { }     pick one of the entities within the braces
              { }*    entities within the braces CAN occur zero ore more times
              { }+    entities within the braces MUST occur one ore more times
               |              OR

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

- cparser.h

CommandParser class Reference -- Thu Nov 28 21:24:57 2002 -- 28 Nov 2002 -- 1.2.18 -- -- . -- Main Page