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

The main function that is the parser generator application, apg. More...

#include "Generator.h"
#include "SABNFGrammar.h"
#include "Grammar.h"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

The main function that is the parser generator application, apg.

Definition in file main.c.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

The main function of the parser generator application

Parameters
argcthe variable number of command line arguments
argvpointer to a list of pointers to the command line arguments. The arguments and their meanings are given here or can be viewed by running "apg --help". They are for the most part self-explanatory. If in doubt about an option try it and what you get should be self-explanitory. The only exception is, possibly, the attributes. A separate, detailed discussion of these is given in the website documentation here
APG(version 6.3)
Usage: apg options
options: one or more of the following:
help options
?                 - print this help screen
help              - print this help screen
/?                - print this help screen
/help             - print this help screen
-help             - print this help screen
--help            - print this help screen
version options
--version         - print version
-v                - print version
/v                - print version
name options
/in:pathname      - pathname of input SABNF grammar (required)
/out:path         - path for generated parser, including trailing delimiter (default = ./ or current working directory)
/log:pathname     - log output to pathname (default is console)
/C:name           - C-language parser project name (outputs files name.h & name.c)
/C++:name         - C++ language parser project name (outputs files name.h & name.cpp)
true/false options, all defaults are false
/dv               - verbose, implies all display options except /dopcodes & /dast
/dconfig          - display all of the configuration parameters
/dgrammar         - display input grammar file with one-based line numbers
/dwarnings        - display grammar syntax warnings
/dgrammar-metrics - display grammar metrics
/dattributes      - display attributes
/drules           - display rules and udts
/dast             - display AST records (caution: may generate many records)
/dtypes           - display the integer type sizes
/dopcodes         - display grammar opcodes in human-readable format (caution: may generate many opcodes)
options are case sensitive and must appear exactly as indicated above
paths, pathnames and names must be < 128 in length
default values of all true/false options are false

Definition at line 115 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.