eclipse-che4z / che-che4z-lsp-for-hlasm Goto Github PK
View Code? Open in Web Editor NEWHLASM Language Support is an LSP extension that adds support for the High Level Assembler language to IDEs
License: Eclipse Public License 2.0
HLASM Language Support is an LSP extension that adds support for the High Level Assembler language to IDEs
License: Eclipse Public License 2.0
Describe the bug
The HLASM uses fixed colors for instructions which forces uses to select a theme that is readable for this extension.
To Reproduce
Change color preferences from light to dark to any other build-in or addon theme.
Expected behavior
The HLASM extension should honor theme settings in VS Code
Screenshots
Changing color preferences in VS Code has no effect on colors within the HLASM editor.
Platform
Additional context
Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
In Macro tracer, the Variables panel contains values of variable symbols and ordinary symbols. During macro tracer usage, I can hover over the ordinary symbols in code and see the value of the symbol that is written in the Variables panel. The problem is, that names of variable symbols start without the beginning ampersand character (&
). Hence, when I hover over any variable symbol in code, no value is shown and I need to find the value in the Variables panel. It can be tedious as the panel usually contains a lot of variable symbols.
Describe the solution you'd like
During macro tracer usage, I would like to see variable symbol value when I hover over it.
Describe alternatives you've considered
Probably, we just need to add beginning &
for variable symbols in the Variables panel.
Describe the solution you'd like
I'd like to see error message generated by a statement in the debug console whenever the statement is "executed" in the macro debugger.
The workflow CI.yml is referencing action actions/checkout using references v1. However this reference is missing the commit a6747255bd19d7a757dbdda8c654a9f84db19839 which may contain fix to the some vulnerability.
The vulnerability fix that is missing by actions version could be related to:
(1) CVE fix
(2) upgrade of vulnerable dependency
(3) fix to secret leak and others.
Please consider to update the reference to the action.
I noticed that it could be of great use to have some support to analyse HLASM listings in a more friendly way there, too!
Having the references and colors as we already have for sources can speed up the process of analysis there!
Also, another improvement could be coloring parameters and their counterparts in the machine representation correspondingly (41 1 0 0000 LA R1,0).
For now I don't think we have such features anywhere, so I keep analyzing old ways and sometimes needing to consult external references to complement information that could be already there
Hello!
In our project we store macros in lowercase and with extension .sm.
E.g. strucs/if.sm; maclib/@wto.sm
Is it possible to search for macros in this case? If not, will it be difficult to add?
Thank you!
Describe the bug
The valid range for branch addresses in BRAS
is a half of what it should be.
To Reproduce
Code a BRAS
instruction so that RI2 falls between X'4000'
and X'7FFF'
.
The 2nd argument is falsely flagged as in error.
Expected behavior
The correct upper limit should be +65534 because the binary value represents the number of halfwords that is added
to the address of the instruction.
Similarly with the lower limit.
Platform
Additional context
(unrelated quote)
The instructions marked as bold are recognized as Syntax error by the Plugin. The error description is: Error at LAY instruction: value of address Operand displacement value must be between -2048 and 2047.
Example:
DoItAgain MVCOS 0(R14),0(R2),R10 Move data to output area
LAY R2,4096(,R2) Prepare source > 4 K
LAY R14,4096(,R14) Prepare target for > 4k
AHI R10,-4096 Check if bytes left
JP DoItAgain
There are two Problems with this.
The error would be correct if i had something like LA R2,4096 BUT the range in the error message i.e. -2048 and 2047 is wrong cause LA does not allow signed values. So if i had something like LA R2,-100(,R2) in my Code, the Plugin would be happy but HLASM would throw an "Invalid displacement" error, cause a 12 Bit displacement has to be between 0 and 4095.
The z990 processors support “long displacement (20-Bit)” RX-format instructions (RXY-a), with a displacement field range of -524288 to +524287 (± 0.5 Megabyte). All of the z/Architecture RX-format instructions introduced by the z900 are “long displacement” except for the floating point instructions. There are “Y” (long displacement) forms of most of the ESA/390 RX-format instructions except branch and as already mentioned floating Point intructions. Examples: AY, AHY, LY, LAY, STY
So the LAY instructions in the above example are perfectly valid and should never be flagged as error. For 12-Bit displacement intructions the error message text is wrong.
Describe the bug
Self-defining term with the value of one apostrophe parsed incorrectly in model statements.
To Reproduce
ABC LR 1,1
&BLM SETC 'ABC'
MVI &BLM,C''''
The input above emits the following error:
While evaluating the result of substitution 'SYM,C'''' => Expected an apostrophe
Note that in the substituted string, there are only three apostrophes C'''
, but there should be 4.
Expected behavior
No errors.
Platform
Describe the bug
Using &SYSNDX
with subscripts is valid hlasm.
To Reproduce
MACRO
MAC
&SYSNDX(1,1)
MEND
MAC
There is an error at &SYSNDX(1,1)
. It is valid on mainframe.
Expected behavior
No errors.
Platform
Additional context
It seems like the assembler treats SYSNDX (and possibly more system variables) more like macro parameters, while we treat it internally like C type variable symbol.
Describe the bug
At our site with virtual "locked down" desktops we can not use the HLASM extension because of this error "LANGUAGE_SERVER.EXE has not been allowed to run". We can not run .exe files.
To Reproduce
Steps to reproduce the behavior:
Enable HLASM Language Support on our virtual desktop,
Expected behavior
"LANGUAGE_SERVER.EXE has not been allowed to run" error message
Screenshots
If applicable, add screenshots to help explain your problem.
Platform
Additional context
Add any other context about the problem here.
Describe the solution you'd like
We would like to introduce release automation in to the project by adding semantic release / versioning / conventional commits
Acceptance criteria
Describe the bug
A valid instruction coding is incorrectly flagged as an error.
Example:
Error at VLM instruction: vector register operand absolute value must be between 0 and 15
HLASM Plugin(M124)
To Reproduce
Steps to reproduce the behavior:
VSTM 16,31,SAVE
VLM 16,31,SAVE
Expected behavior
The example code should produce no errors for the leftmost two operands (V1, V3).
Platform
Additional context
The 5th bit necessary to encode values 0-31 is located in the RXB
portion of vector instructions:
Describe the bug
The HLASM Plugin flags some Assembler equate statements Statements as error, but those are perfectly valid, no Assembly Errors at all. To see what i am Talking About, please have a look at the attached screen shots. The first Shows that it is flagged, the second shot Shows the error as detected by the Plugin. There is really not much more i can tell you.
To Reproduce
Put a sequence like the ones shown in the attached screenshots into your Code and you see what i am talking About.
Expected behavior
Since this is not an error it should not be flagged as one
Platform
Our product distributes its macros across multiple folders. Each project a person works on will mirror the folder structure.
In order to resolve the COPY and macro usage, each distinct folder that has macros must be added to proc_grp. This is a lot of typing, time-consuming and error-prone.
Being able to specify wildcards in place of folders would be ideal, such as /TL1//SSF1/
In the example, "TL1" is the top layer for a project I am working on. TL2 would be a different project and so on.
The folder structure underneath is the same across all of the projects. The second layer distributes the product into ~100 components, so a wild-card is preferred here. The SSF1 folder is a fixed name. After SSF1, there are 4-5 other folders that each could contain macros. So, the enumeration of the specific directories that would need to be provided is 400-500.
Is your feature request related to a problem? Please describe.
Ordinary symbols are not defined by CCW, CCW0 and CCW1 instructions.
Describe the solution you'd like
Proper implementation of CCW* instructions.
Additional context
https://www.ibm.com/docs/en/zos/2.1.0?topic=statements-ccw-ccw0-instructions
https://www.ibm.com/docs/en/zos/2.1.0?topic=statements-ccw1-instruction
Describe the bug
There is a bug in the server_test sometimes causing the CI to deadlock and fail on timeout.
To Reproduce
It is hard to reproduce, it just sometimes happens in the Actions CI.
Describe the bug
@Jakub-CZ reported syntax errors diagnosed on lines of code that are skipped using the AGO/ANOP instructions.
To Reproduce
MACRO
MAC
AGO .SKIP
2 a
.SKIP ANOP
MEND
Expected behavior
No syntax errors are reported.
Platform
Describe the bug
Valid ALIAS operands are marked as errors.
https://www.ibm.com/docs/en/zos/2.1.0?topic=statements-alias-instruction
To Reproduce
Write the following program:
ALIAS C'somestring'
ALIAS X'4343434343'
Currently, it is marked as 'Bad operand value'.
Expected behavior
No errors.
Platform
Additional context
The operands are parsed as self-defining term - as a term of machine instruction. See assembler_operand_rules.g4 and machine_expr_rules. Once parsed as self_def_term, it is immediately checked whether it has 4 and less characters.
Describe the solution you'd like
In some HLASM programs, literals are used. The current plugin version does not provide any functionality for literals. Also, an attribute reference to a literal causes a diagnostic.
We would like to implement a new feature that will provide all needed functionality to properly evaluate and use HLASM literals.
Acceptance criteria
Performance
hlasm-language-support
0.12.0
Windows_NT x64 10.0.19043
1.55.2
c:\Users\nata_\AppData\Local\Temp\BroadcomMFD.hlasm-language-support-unresponsive.cpuprofile.txt
Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load
Describe the bug
SYSMAC variable has unique properties being both scalar and an array (with valid index 0).
Platform
Describe the bug
Macro expansion is not working correctly. I work on the z390 project (https://github.com/z390development/z390).
There is a register equate macro called EQUREGS and it provides the same function of the z/OS macro YREGS except dynamically.
When using this macro, the editor does not recognise the expanded register equates.
To Reproduce
Base assembly program - An IEFBR14 called hello.mlc
CSECT
EQUREGS Use in place of YREGS
BASR R15,0
USING *,R15
BR R14
END
EQUREGS macro
MACRO
EQUREGS ®S=GPR,&TYPE=DEC
GBLB &EQUREGS_GPR_DEC(16),&EQUREGS_GPR_HEX(16)
GBLB &EQUREGS_FPR_DEC(16),&EQUREGS_FPR_HEX(16)
AIF ('®S' EQ 'GPR')
:&PFX SETC 'R'
AELSE
:&PFX SETC 'F'
AEND
LCLC &HEX(16)
&HEX(1) SETC '0','1','2','3','4','5','6','7', X
'8','9','A','B','C','D','E','F'
AIF ('&SYSLIST(1)' NE '')
MNOTE 12,'EQUREGS UNSUPPORTED OPERANDS - &SYSLIST(1)'
MEXIT
AEND
&I SETA 0
AWHILE (&I LT 16)
AIF (NOT &(EQUREGS_®S._&TYPE)(&I+1))
:&(EQUREGS_®S._&TYPE)(&I+1) SETB 1
AIF ('&TYPE' EQ 'DEC')
:&PFX&I EQU &I
AELSE
:&PFX&HEX(&I+1) EQU &I
AEND
AEND
:&I SETA &I+1
AEND
MEND
Does not recognise R14 and R15 from EQUREGS macro
Expected behavior
Editor recognises the register equates - in this case the same as using YREGS
Screenshots
Used inline above
Platform
Additional context
N/A
Describe the solution you'd like
Currently, when a file is changed, a program with all of its dependencies (macro and copy files) is reparsed. This may be a parsing bottleneck that increases the response time of the plugin.
It could be useful to parse only such dependencies that got actually changed.
Acceptance criteria
Describe the bug
When calling a macro, all operands should retain their case. However, in current version, label does not.
To Reproduce
MACRO
&V CASE
AIF ('&V' EQ 'MixedCase').SKIP
rubbish
.SKIP ANOP
MEND
MixedCase CASE
The program should not yield an error
Platform
Is your feature request related to a problem? Please describe.
In the current implementation, the lookahead for attributes of undefined symbols is triggered during an CA expression evaluation. As the evaluation can happen at any place during parsing, the lookahead for attributes needs to stash current parsing context, trigger lookahead parsing and when finishes, pop the context back.
This puts complexity to a parsing flow of the plugin and potentially prohibits further extensions.
Describe the solution you'd like
Create a step between parsing and processing of a statement where the lookahead will be triggered when needed.
Is your feature request related to a problem? Please describe.
Many HLASM programs rely on flags and system variables that are specified by compiler options. (i.e., SYSPARM
, MACROCASE
, DBCS
, ...).
Describe the solution you'd like
Find a way to provide user with the ability to specify compiler options.
Describe alternatives you've considered
In MF, the options for compiler are specified separately for each processor group.
We can provide the behavior by adding the system variables to each processor group in proc_grps.json
.
The peak/goto definition feature for expanding macros is great. Is it possible to add a feature to expand a macro included in another macro?
I can't really give a screenshot example as my company blocks github, but we have alot of cases with macros within macros.
Describe the bug
In the section File Extensions in the extension README (and in Extension Marketplace), the config file name proc_conf.json
is incorrect; it should be proc_grps.json
instead.
To Reproduce
N/A
Expected behavior
proc_conf.json
should not occur anywhere in the docs.
Platform
Additional context
N/A
The code completion list does not seem to take the initial @ symbol into consideration.
The list contains @obj but it is not sorted to the top.
Plugin version: 0.11.0
When I open an HLASM program in VS Code, it does not recognize it is HLASM so it is not highlighted automatically. I always need to switch it to highlight HLASM manually.
Describe the bug
symbol_value
and address
arithmetic operations should detect overflow and report it.
To Reproduce
00000006 0000 0000 0000 00000000 3 BRASL 0,*+2147483646+2
** ASMA075E Arithmetic overflow
** ASMA435I Record 3 in *** on volume:
Describe the bug
If you view changes to an HLASM source code before commit, only half of the screen (the uncommitted version) is highlighted.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Both the committed and the new version should be highlighted.
Platform
Describe the bug
In HLASM, a program with two END
instructions is valid, since the assembler ends processing after encountering the first END
. However, that is not the case with this extension.
The problem is most visible when the DB2 preprocessor is enabled - two END instructions are processed by the preprocessor, generating the same symbols twice.
To Reproduce
Steps to reproduce the behavior:
Configure your processor group with the DB2 preprocessor, then type in the following:
END
END
32 errors apper, but there should be none.
Expected behavior
Processing should end after the first END.
Platform
The HLASM provides a suite of structured macros that apparently are not recognized or found through the HLA.SASMMAC1 & HLA.SASMMAC2 macro members, since they are not explicit members matching the names (IF, DO, etc).
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The structure logic macros should be recognized and not flagged in error.
Platform
Additional context
Add any other context about the problem here.
Describe the bug
JC is not recognized as a valid HLASM instruction.
Additional context
It seems to have 2 parameters. The first is a register, the second is an address.
Is your feature request related to a problem? Please describe.
First of all, thank you guys for this wonderfull extention to VSCode! I was waiting for something like this since years! I am a z/OS systems programmer in germany and do write IBM assembler code since more than 30 years. One of the biggest problems people without a good understanding about assembler lanuguage are facing is the detection of control flow in assembler programs. IBM has tried to address this problem with SPM (Structured Programming Macros).
Describe the solution you'd like
I would like to see the syntax highlighting feature to automatically detect those macros and highlight them properly.
Describe alternatives you've considered
None ;-)
Additional context
Here is the link to the relevant IBM manual:
https://www.ibm.com/support/knowledgecenter/en/SSENW6_1.6.0/com.ibm.zos.v2r3.asmk200/ax3.htm
and a screenshot from VSCode:
Describe the bug
It seems that under "normal" conditions theia never terminates and therefore the test script times out and fails.
However, when the test suite includes exactly 8 tests and they all pass, the mocha framework attempts to write out a summary message that causes the writeBuffer
to crash the whole process and in that case and only in that case the test as a whole passes.
Describe the bug
Typescript code coverage detection fails for some reason.
INFO: Sensor JavaScript/TypeScript Coverage [javascript]
INFO: No LCOV files were found using clients/vscode-hlasmplugin/coverage/lcov.info
WARN: No coverage information will be saved because all LCOV files cannot be found.
Platform
CI - Github actions
Implement the &SYSSTMT
system variable. Specification here:
https://www.ibm.com/docs/en/zos/2.1.0?topic=symbols-sysstmt-system-variable-symbol
Describe the bug
HLASM highlighting activated for .txt files
To Reproduce
Steps to reproduce the behavior:
Expected behavior
HLASM highlighting activated, HLASM is marked as the file type in the bottom right hand corner
Screenshots
If applicable, add screenshots to help explain your problem.
Platform
Additional context
Describe the solution you'd like
The current evaluation of conditional assembly expressions rely on ANTLR visitors. It is due to the fact that these expressions are stored as ANTLR ParsingRuleContext pointer.
However, this is not convenient because to preserve the validity of these pointers, we must not destroy ANTLR parser that created the pointers.
This restricts us in the further development of the plugin.
Acceptance criteria
Hi guys,
have a look at the following code fragment:
*-B E G I N-----------------------------------------------------------*
* Move command from CIB to internal buffer *
*---------------------------------------------------------------------*
MVIY CMDBUFF,C' ' Clear command buffer
MVC CMDBUFF+1(L'CMDBUFF-1),CMDBUFF
LAY R1,CMDBUFF Load command pointer$02$06
LAY R2,CIBDATA Load A(MODIFY/F data). $06
BCTR R3,0 Decrement it for MVC.
EXRL R3,MVCEX Changed to EXRL $06
*-E N D---------------------------------------------------------------*
* Move command from CIB to internal buffer *
*---------------------------------------------------------------------*
.
.
MVCEX MVC 0(0,R1),0(R2) Move command to internal
The EXRL instruction above is perfectly valid. MVCEX is a label in code. EXRL is of format RIL-b and available since z10. MVCEX in the instruction is converted to the number of halfwords distance between the EXRL instruction address and the MVCEX label.
The plugin marks this instruction with the following error:
Error at EXRL instruction: operand must be an absolute immediate value"
This is wrong and should be fixed!
greetings
Ronny
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.