Version 6.3
Copyright © 2005 - 2012 Lowell D. Thomas
APG
  … ABNF Parser Generator
All Data Structures Files Functions Variables Typedefs Macros Pages
Functions
main.cpp File Reference

Simple example of setting up a C++ parser. More...

#include "main.h"

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

Simple example of setting up a C++ parser.

  1. Instantiation of the parser.
  2. Initilizing rule and UDT syntax and semantic callback functions.
  3. Tracing the parser.
  4. Statistics gathering and display.
  5. Displaying the parser state.
  6. Create, display and translate the AST.

The grammar file for this test has been generated with the parser generator command:

apg /in:CppDemo.bnf /C++:CppDemo /dwarnings /dtypes

Definition in file main.cpp.

Function Documentation

◆ main()

int main ( )

The main function. Takes no command line arguments.

Definition at line 42 of file main.cpp.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/licenses.html or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.