Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
32fce705
Commit
32fce705
authored
Mar 03, 2011
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added new version of ecpg's parser generator script. This one was written by
Andy Colson <andy@squeakycode.net>.
parent
8e2d8b14
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
653 additions
and
5 deletions
+653
-5
src/interfaces/ecpg/preproc/Makefile
src/interfaces/ecpg/preproc/Makefile
+2
-2
src/interfaces/ecpg/preproc/README.parser
src/interfaces/ecpg/preproc/README.parser
+2
-2
src/interfaces/ecpg/preproc/ecpg.trailer
src/interfaces/ecpg/preproc/ecpg.trailer
+1
-1
src/interfaces/ecpg/preproc/parse2.pl
src/interfaces/ecpg/preproc/parse2.pl
+648
-0
No files found.
src/interfaces/ecpg/preproc/Makefile
View file @
32fce705
...
...
@@ -57,8 +57,8 @@ else
@
$(missing)
flex
$<
$@
endif
preproc.y
:
../../../backend/parser/gram.y parse.pl ecpg.addons ecpg.header ecpg.tokens ecpg.trailer ecpg.type
$(PERL)
$(srcdir)
/parse.pl
$(srcdir)
<
$<
>
$@
preproc.y
:
../../../backend/parser/gram.y parse
2
.pl ecpg.addons ecpg.header ecpg.tokens ecpg.trailer ecpg.type
$(PERL)
$(srcdir)
/parse
2
.pl
$(srcdir)
<
$<
>
$@
$(PERL)
$(srcdir)
/check_rules.pl
$(srcdir)
$<
ecpg_keywords.o c_keywords.o keywords.o preproc.o parser.o
:
preproc.h
...
...
src/interfaces/ecpg/preproc/README.parser
View file @
32fce705
...
...
@@ -3,7 +3,7 @@ ECPG modifies and extends the core grammar in a way that
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.
passed to the server, this is done by parse
2
.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,
...
...
@@ -20,7 +20,7 @@ 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
a) "block" - the automatic rule created by parse
2
.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
...
...
src/interfaces/ecpg/preproc/ecpg.trailer
View file @
32fce705
...
...
@@ -1591,7 +1591,7 @@ ECPGCKeywords: S_AUTO { $$ = mm_strdup("auto"); }
* CONNECTION can be added back in all_unreserved_keyword, but CURRENT and
* INPUT are reserved for ecpg purposes.
*
* The mentioned exclusions are done by $replace_line settings in parse.pl.
* The mentioned exclusions are done by $replace_line settings in parse
2
.pl.
*/
all_unreserved_keyword: unreserved_keyword { $$ = $1; }
| ECPGunreserved_interval { $$ = $1; }
...
...
src/interfaces/ecpg/preproc/parse2.pl
0 → 100644
View file @
32fce705
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment