Demonstrates the use of APG with three simple applications.
More...
#include "Apg.h"
#include "main.h"
Go to the source code of this file.
Demonstrates the use of APG with three simple applications.
Definition in file main.c.
◆ main()
The main program. Runs three separate tests.
- vDemoSetup(). Uses a simplified version of the SABNF grammer to demonstrate Parser basics. The test output is written to Setup.output.
- 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.
- 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.