Re: EBNF definition for RPG? (RKRayhawk)
27 Feb 2000 02:43:31 -0500

          From comp.compilers

Related articles
EBNF definition for RPG? (Peter Dackombe) (2000-02-22)
Re: EBNF definition for RPG? (2000-02-27)
Re: EBNF definition for RPG? (Charles E. Bortle, Jr.) (2000-02-28)
Re: EBNF definition for RPG? (2000-02-28)
Re: EBNF definition for RPG? (Joachim Durchholz) (2000-03-06)
Re: EBNF definition for RPG? (Jeremy Boden) (2000-03-06)
Re: EBNF definition for RPG? (Charles E. Bortle, Jr.) (2000-03-06)
| List of all articles for this month |

From: (RKRayhawk)
Newsgroups: comp.compilers
Date: 27 Feb 2000 02:43:31 -0500
Organization: AOL
References: 00-02-113
Keywords: syntax

Don't know of one but sense that there is a big opportunity there to
bring that set of apps across into the inexpensive world of 'the
desktop' environs.

I disagree with the moderators misgivings. The fixed columnar aspect
is a lexical aspect of the application of compiler technology to this
domain. EBNF is more typically considered as part of the parser
facility (although admittedly some tools have blended the
compiler-compiler worker's coding interface to both aspects fairly
seemslessly in tool syntaxt that overall looks EBNF-like).

A parser conducted with an EBNF rule sets might easily weave RPG into
an economic symphony.

The key to RPG or even MARKIV is the built in paradigm beneath the
laguages 'syntax'. Semantics in this case would not be so much a set
of distilled commands as a set of config and triggers on those rather
fixed yet protean runtime engines.

It would not be hard for a lexer to blurt out the equivalent of column
headings as tokens as necessary.

For example, if you find an eight character name under a column that
means filename because it is on a control card that means file
description, then emit the _two_ tokens FILE_NAME and follwoed by
USER_NAME (yytext='whynoteh').

If worse comes to worse the lexer is really just an expander: for
every filled column emit column-header-tag and next user-value.

The parser, EBNF based or not, might be stultifyingly simple, even if
not expecially brief. RPG is basically a configurator, the semantics
are in the runtime engine.

EBNF is certainly not easily harnessed to columns, but who says you
would let that attribute persist so deep into the compile? The
columnarity is a lexical feature. In my opinion, EBNF, simply does not
relate favorably or disfavorably, and is thus not excluded from this
domain at all.

RPG would represent a requirenmet to entokenize the input stream, if I
may koine a phrase. That is a lexical challenge but not rocket
science. The sense of the word 'entokenize' is that the interface from
the lexer to the parser would have considerably more tokens then the
input to the lexer. This is just a recapitulation of the efficiency
of the input design strategy of RPG.

RPG is a worthy target. EBNF relates, IMHO.

Best Wishes,

Robert Rayhawk
[Oh, you can certainly write a lexer that turns column positions into tokens.
But the syntax of RPG is so simple that BNF seems like overkill. -John]

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.