fix(core, expr grammars): fix reported bugs#44
Merged
Conversation
In expr grammar, fixed gvn to allow namespace to be arbitary expression(s). Additionally, allowed s in instance variable, as that stands for shadow modified bit for the property.
Also, removed the requirement for .. in relative functions to be immediate, as the only
actual requirement is that the name comes immediately after the dots. This makes it
so things like Return $CASE(x,
..#MyParameter:"Hello",
5:"Goodbye"
)
are correctly parsed now.
In core grammar, allowed relative dot functions to be locktypes, so valid statements like
Lock +x#..MyFunction() worked as expected.
Updated highlighting in udl such that method keyword is grouped with other class fields and class keyword is unique.
the scanner was incorrectly eating the . as bol_extra if it was
the first thing in a newline of a multiline expression. So, Return $CASE(x,
..#MyParameter:"Hello",
5:"Goodbye"
)
was failing. This is now fixed
- close parameter allow upper and lowercase values - add mvnewcom command - add zdn command - adjust the scanner to handle post conditionals without needing replication of expression - reduced parser.c size by over 20 MB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR fixes parser bugs found while testing against generated INT files in
%SYS, and adds targeted coverage for each scenario that was corrected.Summary of Changes
Expression and Reference Parsing
s%in instance variables.sis a valid instance-variable prefix for the shadow modified bit.^|"^^" _ $zu(12)|globalnameparse correctly..., but the..itself does not need to be immediate. This fixes multiline cases such as..#MyParameterinside$CASE.@(tFlags)^@(tI)(.tResult).^|nodes(name)|s.^$|...|references inSETstatements.Command and Statement Fixes
LOCK,KILL,DO, andSET.set_argumenttargets, for exampleset ..token($Increment(..token)) = tLexTerminator.DOsyntax such as:MVPRINT,MVP,MVC, andMvCall.ZKILLflags1-3.Ias a validCLOSEoption, for exampleclose x:"I".VIEWarguments separated by comments.NEW, for examplenew @("hi"_y).tag.x.JOBprocess-parens to take anlvn.OREF, OLE, JSON, and Argument Handling
_varand_var!memberforms such as_CDSrvPrint!txtPrint.Text.Locktype and Pattern Updates
lvn_SEID/ quotedSEIDforms.0..Scanner and Tokenization Fixes
bol_extra/ dotted-line scanning so multiline expressions beginning with..are not consumed incorrectly by the routine scanner.#handling so#inside expressions is not eaten as whitespace or comment syntax.UDL and Routine Header Updates
generatedin routine headers, for exampleRoutine x [TYPE=INT, Generated].Testing
%SYS(5664 files).//projects/sql/databases/sys/rtn/routine/and//projects/sql/databases/sys/rtn/sql/.