postgresql/src/interfaces/ecpg/preproc
Michael Meskes 0de1068365 Several fixes to array handling in ecpg.
Patches by Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>

Conflicts:
	src/interfaces/ecpg/test/expected/preproc-outofscope.c
2014-04-09 12:04:33 +02:00
..
po Translation updates 2014-02-17 16:57:27 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
c_keywords.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
check_rules.pl Added new version of ecpg's parser test script which was written by Andy Colson <andy@squeakycode.net>. 2011-03-08 11:28:16 +01:00
descriptor.c There is no need to have to identical functions in ecpg thus removing one of them. 2011-01-09 12:47:43 +01:00
ecpg.addons ECPG: Fix searching for quoted cursor names case-sensitively. 2013-11-27 11:15:34 +01:00
ecpg.c pgindent run before PG 9.1 beta 1. 2011-04-10 11:42:00 -04:00
ecpg.header ECPG: Fix searching for quoted cursor names case-sensitively. 2013-11-27 11:15:34 +01:00
ecpg.tokens Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
ecpg.trailer ECPG: Fix searching for quoted cursor names case-sensitively. 2013-11-27 11:15:34 +01:00
ecpg.type Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
ecpg_keywords.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
extern.h Use a macro variable PG_PRINTF_ATTRIBUTE for the style used for checking printf type functions. 2011-04-28 10:56:14 -04:00
keywords.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
Makefile Move parse2.pl to parse.pl 2011-06-14 07:35:51 +03:00
nls.mk Translation updates 2012-02-23 20:40:55 +02:00
output.c Also escape double quotes for ECPG's #line statement. 2013-07-06 22:12:14 +02:00
parse.pl Move parse2.pl to parse.pl 2011-06-14 07:35:51 +03:00
parser.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
pgc.l Prevent potential overruns of fixed-size buffers. 2014-02-17 11:20:31 -05:00
README.parser Move parse2.pl to parse.pl 2011-06-14 07:35:51 +03:00
type.c Several fixes to array handling in ecpg. 2014-04-09 12:04:33 +02:00
type.h Do not use the variable name when defining a varchar structure in ecpg. 2012-02-13 15:48:49 +01:00
variable.c When processing nested structure pointer variables ecpg always expected an 2012-11-29 17:15:02 +01:00

ECPG modifies and extends the core grammar in a way that
1) every token in ECPG is <str> type. New tokens are
   defined in ecpg.tokens, types are defined in ecpg.type
2) most tokens from the core grammar are simply converted
   to literals concatenated together to form the SQL string
   passed to the server, this is done by parse.pl.
3) some rules need side-effects, actions are either added
   or completely overridden (compared to the basic token
   concatenation) for them, these are defined in ecpg.addons,
   the rules for ecpg.addons are explained below.
4) new grammar rules are needed for ECPG metacommands.
   These are in ecpg.trailer.
5) ecpg.header contains common functions, etc. used by
   actions for grammar rules.

In "ecpg.addons", every modified rule follows this pattern:
       ECPG: dumpedtokens postfix
where "dumpedtokens" is simply tokens from core gram.y's
rules concatenated together. e.g. if gram.y has this:
       ruleA: tokenA tokenB tokenC {...}
then "dumpedtokens" is "ruleAtokenAtokenBtokenC".
"postfix" above can be:
a) "block" - the automatic rule created by parse.pl is completely
    overridden, the code block has to be written completely as
    it were in a plain bison grammar
b) "rule" - the automatic rule is extended on, so new syntaxes
    are accepted for "ruleA". E.g.:
      ECPG: ruleAtokenAtokenBtokenC rule
          | tokenD tokenE { action_code; }
          ...
    It will be substituted with:
      ruleA: <original syntax forms and actions up to and including
                    "tokenA tokenB tokenC">
             | tokenD tokenE { action_code; }
             ...
c) "addon" - the automatic action for the rule (SQL syntax constructed
    from the tokens concatenated together) is prepended with a new
    action code part. This code part is written as is's already inside
    the { ... }

Multiple "addon" or "block" lines may appear together with the
new code block if the code block is common for those rules.