|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 08-Nov-2021 | - |
| po/ | H | 08-Nov-2021 | - | 10,889 | 8,884 |
| .gitignore | H A D | 08-Nov-2021 | 89 | 9 | 8 |
| Makefile | H A D | 08-Nov-2021 | 2.9 KiB | 93 | 52 |
| README.parser | H A D | 08-Nov-2021 | 1.9 KiB | 43 | 40 |
| c_keywords.c | H A D | 08-Nov-2021 | 1.5 KiB | 68 | 26 |
| c_kwlist.h | H A D | 08-Nov-2021 | 1.6 KiB | 53 | 26 |
| c_kwlist_d.h | H A D | 08-Nov-2021 | 2.1 KiB | 119 | 90 |
| check_rules.pl | H A D | 08-Nov-2021 | 3.8 KiB | 192 | 143 |
| descriptor.c | H A D | 08-Nov-2021 | 7.9 KiB | 356 | 289 |
| ecpg.addons | H A D | 08-Nov-2021 | 15 KiB | 521 | 501 |
| ecpg.c | H A D | 08-Nov-2021 | 12.6 KiB | 493 | 393 |
| ecpg.header | H A D | 08-Nov-2021 | 17.7 KiB | 600 | 523 |
| ecpg.tokens | H A D | 08-Nov-2021 | 1.2 KiB | 28 | 24 |
| ecpg.trailer | H A D | 08-Nov-2021 | 55.9 KiB | 1,951 | 1,717 |
| ecpg.type | H A D | 08-Nov-2021 | 3.6 KiB | 147 | 139 |
| ecpg_keywords.c | H A D | 08-Nov-2021 | 1.2 KiB | 56 | 22 |
| ecpg_kwlist.h | H A D | 08-Nov-2021 | 2.3 KiB | 68 | 41 |
| ecpg_kwlist_d.h | H A D | 08-Nov-2021 | 2.8 KiB | 153 | 124 |
| keywords.c | H A D | 08-Nov-2021 | 1.2 KiB | 39 | 8 |
| nls.mk | H A D | 08-Nov-2021 | 306 | 7 | 5 |
| output.c | H A D | 08-Nov-2021 | 5.5 KiB | 261 | 206 |
| parse.pl | H A D | 08-Nov-2021 | 14.6 KiB | 693 | 534 |
| parser.c | H A D | 08-Nov-2021 | 4.2 KiB | 164 | 95 |
| pgc.c | H A D | 08-Nov-2021 | 177.4 KiB | 5,630 | 4,287 |
| pgc.l | H A D | 08-Nov-2021 | 40.4 KiB | 1,668 | 1,265 |
| preproc.c | H A D | 08-Nov-2021 | 2.9 MiB | 60,052 | 56,032 |
| preproc.h | H A D | 08-Nov-2021 | 13 KiB | 641 | 590 |
| preproc.y | H A D | 08-Nov-2021 | 316.9 KiB | 17,019 | 15,041 |
| preproc_extern.h | H A D | 08-Nov-2021 | 4 KiB | 130 | 104 |
| type.c | H A D | 08-Nov-2021 | 20.7 KiB | 749 | 569 |
| type.h | H A D | 08-Nov-2021 | 3.9 KiB | 204 | 155 |
| variable.c | H A D | 08-Nov-2021 | 14.6 KiB | 626 | 478 |
README.parser
1ECPG modifies and extends the core grammar in a way that
21) every token in ECPG is <str> type. New tokens are
3 defined in ecpg.tokens, types are defined in ecpg.type
42) most tokens from the core grammar are simply converted
5 to literals concatenated together to form the SQL string
6 passed to the server, this is done by parse.pl.
73) some rules need side-effects, actions are either added
8 or completely overridden (compared to the basic token
9 concatenation) for them, these are defined in ecpg.addons,
10 the rules for ecpg.addons are explained below.
114) new grammar rules are needed for ECPG metacommands.
12 These are in ecpg.trailer.
135) ecpg.header contains common functions, etc. used by
14 actions for grammar rules.
15
16In "ecpg.addons", every modified rule follows this pattern:
17 ECPG: dumpedtokens postfix
18where "dumpedtokens" is simply tokens from core gram.y's
19rules concatenated together. e.g. if gram.y has this:
20 ruleA: tokenA tokenB tokenC {...}
21then "dumpedtokens" is "ruleAtokenAtokenBtokenC".
22"postfix" above can be:
23a) "block" - the automatic rule created by parse.pl is completely
24 overridden, the code block has to be written completely as
25 it were in a plain bison grammar
26b) "rule" - the automatic rule is extended on, so new syntaxes
27 are accepted for "ruleA". E.g.:
28 ECPG: ruleAtokenAtokenBtokenC rule
29 | tokenD tokenE { action_code; }
30 ...
31 It will be substituted with:
32 ruleA: <original syntax forms and actions up to and including
33 "tokenA tokenB tokenC">
34 | tokenD tokenE { action_code; }
35 ...
36c) "addon" - the automatic action for the rule (SQL syntax constructed
37 from the tokens concatenated together) is prepended with a new
38 action code part. This code part is written as is's already inside
39 the { ... }
40
41Multiple "addon" or "block" lines may appear together with the
42new code block if the code block is common for those rules.
43