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

Demonstrates the use of APG with three simple applications. More...

#include "Apg.h"
#include "main.h"

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

Demonstrates the use of APG with three simple applications.

Definition in file main.c.

Function Documentation

◆ main()

int main ( )

The main program. Runs three separate tests.

  1. vDemoSetup(). Uses a simplified version of the SABNF grammer to demonstrate Parser basics. The test output is written to Setup.output.
  2. vDemoCallbacks(). Uses a simplified version of the SABNF grammer to demonstrate the basics of writing and using callback functions. The test output is written to Callbacks.output.
  3. vDemoUdts(). Uses a simple grammar which refers to all rules parsed by the Parser's UDT library. The test output is written to UdtLib.output.

The grammar files for these tests have been generated with the parser generator commands:

apg /in:Callbacks.bnf /C:CallbacksGrammar /dwarnings /dtypes
apg /in:Setup.bnf /C:SetupGrammar /dwarnings /dtypes
apg /in:UdtLib.bnf /C:UdtLibGrammar /dwarnings /dtypes

Definition at line 42 of file main.c.

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.