[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnubol: refmod again (fwd)



At 02:46 AM 12/2/99 +1000, Tim Josling wrote:
[stuff deleted]
>There is still an ambiguity as far as I can tell.
>
>A( I (2)).
>
>This could be two arguments or one.
>
>"I" and "(2)"
>OR "I (2)".
>
>Does it matter if I is an array or not? For example, if I is an array,
then I guess
>it should be one argument. If not, then it should not be.
>
>But not all contexts require an array reference after the array name (eg
in search
>verb). This could be ugly to handle. Have I missed something? I intend to
email the
>committee about this.
[more deleted]

There is no ambiguity that you cannot resolve by looking up the definition
of I.  If I is an array or a function that accepts argument(s), than it
requires a left parenthesis to follow, et cetera.  If I is neither an array
nor a function, or if the context is that of what the standard refers to as
a Data-name rather than as an Expression or an Identifier, or a Fully
Qualified whatever, than the above presents A with two arguments or
indexes, depending on A's definition.  Of course, if A is neither an array
nor a function, than it is just an element in an expression list, and the
interpretation of the expression that follows it is independent of A --
lets not let the absense of a space between A and the left parenthesis
mislead us.

Bottom line: COBOL parsing requires context sensitivity and frequent symbol
table lookups.

Jonathan

------------------------------------------------------------
J & C Migrations, Pty.          
566 Centre Street               http://www.jcmigrations.com
Newton, MA 02458-2325           Tel. +1 (617) 916-5114
USA                             Fax. +1 (617) 916-5113
E-mail: mailto:jb@jcmigrations.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.