[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnubol: New bison Grammar available (long)
In a message dated 12/26/99 4:33:45 PM EST, tej@melbpc.org.au writes:
<<
> (parser semantics interface)
I sketched out some ideas in my posting with the grammar. My
thinking is that it would pass a simplified parse tree back up.
Not all the productions would be reflected. The nesting would be
implied in the structure and there would be no noise words (like
end-if which once it determines the structure tells you nothing).
Lists would probably be in arrays (eg lists of children of a data
item, lists of statements such as in an on size error clause). It
would probably be cobol friendly.
>>
Our thinking is different here. By the way where is Michael when we need him?
I think the interface to semantics from syntax should be a bludgeon, leaving
nothing to chance. It should have explicit begin/end markers, nothing
implied. I think of semantics as
the pen on a drafting device, it needs to be told to lift before moving, or
we get a line.
We are not quite where we need to be to talk about this, but the sequence of
a block hanging within some clause can be very discountinuous as we drift in
and out of lower embedded contexts, never fully exiting up out of the
enclosing context, We need to be able to tag these transitions as not quite
the end, even though the parser may have to chop the current data structure.
The early compiler writers had to spin much out to tape. They needed many
drives to do it. In a certain sense it was not the tape drive that made
COBOL possible, it was the
availability of multiple tape drives that made the compiler feasible.
We tend to think in terms of stacks and linked lists. I think we also tend to
imagine that we can hold onto these list without much concern for their size
(that is my stuck record again). And furthermore, holding onto things implies
an unwillingness to consider a design that can lend itself to parallel
processes, which I think is a shame. If there ever was a language that needs
that assist it is the natural language like COBOL, this is _the_ language
that should try to harvest the benefits of modern technology.
We are we thinking of holding onto all of the procedure division in syntax
before we let semantics get started? That is like insisting on using an
abacus.
So anyway we think differently. I believe we should have explicit originators
and terminators. Which is not to say that we would preclude interruptors and
resumers. I see no reason that we have to preclude parallel processing form
the design of the interface to semantics, regardless of the early
deployments. I think the interface should be a well formed document with
clear tags (no matter how efficiently encoded). There should be no implicit
content in
the interface. IMHO.
But semantics will be a big enough bear that syntax will begin to look real
easy.
More anon,
Bob Rayhawk
RKRayhawk@aol.com
--
This message was sent through the gnu-cobol mailing list. To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body. For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.