Skip to content
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

JCL syntax highlighting could use some work #839

Closed
DivergentEuropeans opened this issue May 4, 2022 · 8 comments
Closed

JCL syntax highlighting could use some work #839

DivergentEuropeans opened this issue May 4, 2022 · 8 comments
Assignees
Labels
editor help wanted Extra attention is needed

Comments

@DivergentEuropeans
Copy link
Member

DivergentEuropeans commented May 4, 2022

JCL syntax highlighting could use some work

Use ISPF for reference but if possible, check that ISPF does it right. ISPF may not do everything 100% correctly

image.png

(ignore the red box - focus on different coloring highlighting in between screenshots)

@DivergentEuropeans DivergentEuropeans added editor help wanted Extra attention is needed labels May 4, 2022
@Martin-Zeithaml
Copy link

Is this all for the JCL hiliting?
zlux-editor/webClient/src/app/editor/code-editor/monaco/hiliters/jcl.ts
I can try to look into this.

@1000TurquoisePogs
Copy link
Member

@1000TurquoisePogs
Copy link
Member

Once you have changes ready to test, I could always test them against the JCL on my machine.

@1000TurquoisePogs
Copy link
Member

The logic for the highlighting is here https://microsoft.github.io/monaco-editor/monarch.html

@1000TurquoisePogs
Copy link
Member

@lchudinov may know if monaco allows syntax highlighting by means other than 'monarch' as monarch has limitations in its regex-and-state method and jcl is a very positional language. Unsure if monarch is the optimal way to do this.

@Martin-Zeithaml
Copy link

I see there 2 major problems, which I am not solving now:

  1. Comment continuation - you need to check if there is non-blank char in column 72 and then continue with the comment on the following line (empty line is valid continuation comment)
  2. DLM for in-stream data - if you specify DLM, you need to know the value of DLM to be able to correctly mark the end of data

At this point, I am focusing on simple problems. Based on the regexes used and small experience, good testing scenario is to copy each JCL in 4 variants:

  1. Line is terminated in the end
  2. Line has 1 space before the termination
  3. Line has more spaces before the termination
  4. Line has versioning number

It is shown on this example, that syntax depends on the line ending (something was already fixed in the monaco playground):

image

@Martin-Zeithaml
Copy link

For testing use this repo: Martin-Zeithaml/jclMonarch.
I will appreciate any JCL examples.

@Martin-Zeithaml
Copy link

Current state of JCL syntax highlighter was improved, however there is still a room for improvement. If a major problem will be found, new issue should be opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants