-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't associate comments with program lines #75
Comments
Hi Marius! |
OK, if I understand, every time we have a << commentEntry? >> somewhere into the grammar file, it can be mapped to a comment, associated with the "statement" ending with << commentEntry? >>. In order not to send comment lines to the hidden channel, I have to remove << -> channel(HIDDEN) >> from the concerned line. |
Hi Marius, thanks for your interest! Reinhard ist right,
So to preserve comment lines, one would have to (1) direct comment lines to another channel and thus preserve them in the AST and then (2) optionally make them accessible in the ASG for convenient access. |
Hi Ulrich ! |
Hi all, |
Yes, that would take me a few days, too. Because of that effort it is not implemented, yet 😃If you are interested, we could add that feature, but please would have to share the costs -> very small project. |
Thank you for your support ! |
Hi everybody ! I need a way to associate comments to the "statements" that follow them. I'm an expert in syntaxical analysis in a programmatic way, but I know almost nothing about ATLR grammar. Yous COBOL parser seems to be very complete, so I don't need to write one. I wonder if there could be a way to get COBOL program comments as regular "statements", so could can associate them with the "statements" and/or declarations folloginw them. As an example:
`
IDENTIFICATION DIVISION.
PROGRAM-ID. HelloWorld.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 ITEMS.
02 ITEM1 PIC X(10).
*Comment here.
02 ITEM2 PIC X(10).
`
I widh I could associate the comment line with the data item declaration that follows it. If the comment line was processed as a regular item, let's say as a data declaration item in this particular case, I could associate them when browsing the definition of "ITEMS", getting "ITEM1", then the comment, then "ITEM2". I don't know if this is possible, and in that case, if it's easy to do...
P.S.: Excuse my poor English !!!
The text was updated successfully, but these errors were encountered: