Version 7.0
Copyright © 2021 Lowell D. Thomas
APG
… an ABNF Parser Generator
lib.h
Go to the documentation of this file.
1 /* *************************************************************************************
2  Copyright (c) 2021, Lowell D. Thomas
3  All rights reserved.
4 
5  This file is part of APG Version 7.0.
6  APG Version 7.0 may be used under the terms of the BSD 2-Clause License.
7 
8  Redistribution and use in source and binary forms, with or without
9  modification, are permitted provided that the following conditions are met:
10 
11  1. Redistributions of source code must retain the above copyright notice, this
12  list of conditions and the following disclaimer.
13 
14  2. Redistributions in binary form must reproduce the above copyright notice,
15  this list of conditions and the following disclaimer in the documentation
16  and/or other materials provided with the distribution.
17 
18  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 
29 * *************************************************************************************/
38 #ifndef LIB_LIB_H_
39 #define LIB_LIB_H_
40 
41 #include <stdlib.h>
42 #include <stdint.h>
43 #include <string.h>
44 #include <setjmp.h>
45 
46 #include "./apg.h"
47 
60 typedef struct{
61  const achar* acpPhrase;
63 } apg_phrase;
64 
73 typedef struct{
74  const uint32_t* uipPhrase;
75  uint32_t uiLength;
76 } u32_phrase;
77 
78 #include "./exception.h"
79 #include "./memory.h"
80 #include "./vector.h"
81 #include "./trace.h"
82 #include "./stats.h"
83 #include "./ast.h"
84 #include "./parser.h"
85 #include "./tools.h"
86 
87 #endif /* LIB_LIB_H_ */
88 
apg.h
The APG header file.
u32_phrase::uiLength
uint32_t uiLength
The number of integers in the array.
Definition: lib.h:75
trace.h
Public header file for the trace functions.
ast.h
Public header file for the AST functions.
achar
uint_fast8_t achar
achar is the type for the parser's alphabet characters.
Definition: apg.h:91
u32_phrase::uipPhrase
const uint32_t * uipPhrase
Pointer to an array of 32-bit unsigned integers.
Definition: lib.h:74
aint
uint_fast32_t aint
The APG parser's unsigned integer type.
Definition: apg.h:79
stats.h
Public header file for the statistics gathering functions.
apg_phrase
Defines a pointer to an achar array plus its length. That is, a phrase as is often used by APG.
Definition: lib.h:60
parser.h
The SABNF parser's public header file.
vector.h
Header file for the vector object - a dynamic array.
apg_phrase::uiLength
aint uiLength
The number of characters in the array.
Definition: lib.h:62
exception.h
Structures and macros for exception handling.
tools.h
A few simple, commonly used functions.
u32_phrase
Defines a pointer to an array of 32-bit unsigned integers plus its length. Typically needed by Unicod...
Definition: lib.h:73
memory.h
Memory management header.
apg_phrase::acpPhrase
const achar * acpPhrase
Pointer to an array of type achar APG alphabet characters.
Definition: lib.h:61
APG Version 7.0 is licensed under the 2-Clause BSD License,
an Open Source Initiative Approved License.