× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Starting with this (from http://en.wikipedia.org/wiki/AS/400_Control_Language):
<CL-command> ::= command-name [<positional-parameter-list>]
[<named-parameter-list>]

<positional-parameter-list> ::= <parameter-value> [<positional-pararmeter-list>]

<named-parameter-list> ::= parameter-name"(" <parameter-element-list>
")" [<named-parameter-list>]

<parameter-element-list> ::= <parameter-value> [<parameter-element-list>]

<parameter-value> ::= CL-name |
qualified-CL-name |
"*"special-value |
generic-CL-name"*" |
"'"alphanumeric-value"'" |
numeric-value |
"X'"hexadecimal-value"'"

let's add:

<qualified-CL-name> ::= CL-name"/"CL-name |
CL-name"/""*"special-value



The parser knows that MYLIB/*ALL and PART2/*PART1 are of type
<parameter-value>. More specifically, the parser knows they are
<qualified-CL-name> using a *special-value.

So the parser isn't isn't going to consider it possible they could be comments.

if you where to try and put a comment in the middle of a
<parameter-value> you'd get a syntax error, which simply means the
parser didn't find something it expected or found something it didn't.

Lastly, consider the following from the manual:
"Comments can be inserted either inside or outside a command’s
character string wherever a blank is permitted. However, because a
continuation character must be the last non-blank character of a line
(or record), comments may not follow a continuation character on the
same line.
Comments can include any of the 256 EBCDIC characters. However, the
character combination */ should not appear within a comment because
these characters end the comment. To begin a comment, the characters
/* must be placed in the first position of the command, be preceded by
a blank, or be followed by either a blank or an asterisk."

This is allowed
/*Comment With no space*/
DSPLIBL OUTPUT(*PRINT) /*Comment with no space*/

This is not
DSPLIBL OUTPUT(*PRINT)/*Comment with no space*/

HTH,
Charles
On Tue, Dec 15, 2009 at 12:31 PM, Dennis Lovelady <iseries@xxxxxxxxxxxx> wrote:
I'm not an expert ( it's been a while since my formal languages course
:) but recursive decent parsing provides an answer to your OQ in the
following manner:

At the point that the parser is looking at /*ALL or /*PART1 the parser
wouldn't be looking for a comment.

Thanks, Charles.  You see something that I don't.  With what we know, what
would prevent the parser from looking for a comment there?  I look at this
and say, Is a blank allowed here?  Yes, so a comment may appear here.
Right?  What am I missing?

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"Most people spend their lives going to bed when they're not sleepy and
getting up when they are."
       -- Cindy Adams



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.