• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..08-Nov-2021-

po/H08-Nov-2021-10,8898,884

.gitignoreH A D08-Nov-202189 98

MakefileH A D08-Nov-20212.9 KiB9352

README.parserH A D08-Nov-20211.9 KiB4340

c_keywords.cH A D08-Nov-20211.5 KiB6826

c_kwlist.hH A D08-Nov-20211.6 KiB5326

c_kwlist_d.hH A D08-Nov-20212.1 KiB11990

check_rules.plH A D08-Nov-20213.8 KiB192143

descriptor.cH A D08-Nov-20217.9 KiB356289

ecpg.addonsH A D08-Nov-202115 KiB521501

ecpg.cH A D08-Nov-202112.6 KiB493393

ecpg.headerH A D08-Nov-202117.7 KiB600523

ecpg.tokensH A D08-Nov-20211.2 KiB2824

ecpg.trailerH A D08-Nov-202155.9 KiB1,9511,717

ecpg.typeH A D08-Nov-20213.6 KiB147139

ecpg_keywords.cH A D08-Nov-20211.2 KiB5622

ecpg_kwlist.hH A D08-Nov-20212.3 KiB6841

ecpg_kwlist_d.hH A D08-Nov-20212.8 KiB153124

keywords.cH A D08-Nov-20211.2 KiB398

nls.mkH A D08-Nov-2021306 75

output.cH A D08-Nov-20215.5 KiB261206

parse.plH A D08-Nov-202114.6 KiB693534

parser.cH A D08-Nov-20214.2 KiB16495

pgc.cH A D08-Nov-2021177.4 KiB5,6304,287

pgc.lH A D08-Nov-202140.4 KiB1,6681,265

preproc.cH A D08-Nov-20212.9 MiB60,05256,032

preproc.hH A D08-Nov-202113 KiB641590

preproc.yH A D08-Nov-2021316.9 KiB17,01915,041

preproc_extern.hH A D08-Nov-20214 KiB130104

type.cH A D08-Nov-202120.7 KiB749569

type.hH A D08-Nov-20213.9 KiB204155

variable.cH A D08-Nov-202114.6 KiB626478

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