GithubHelp home page GithubHelp logo

Comments (4)

brynrhodes avatar brynrhodes commented on August 17, 2024

So, this was quite the rabbit-hole :) Yes, the CQL-to-ELM translator was not correctly dealing with escape sequences in strings and identifiers, so I added logic to escape/unescape CQL literals and identifiers, and a unit test to verify it. Along the way, I found an issue with the CQL grammar itself, the way strings and identifiers are defined slightly too greedily, which results in an edge case with escape characters, specifically the backslash escape (\\) isn't handled properly. Because that's a specification change, I can't fix that until the grammar changes in the spec, so I've submitted an STU comment to address that, and until then, I've commented out the affected tests in the unit test.

However, having fixed all that and verified that escape sequences are being handled correctly for all possible escape sequences in both strings and identifiers, the output in the XML is still Hello \'World\' instead of the simpler Hello 'World'. In the JSON, the value is the simpler, but apparently, the escape logic for XML escapes single-quotes.

So I'm committing the fix I have so far, but leaving this issue open until the full fix can be applied based on the spec change.

from clinical_quality_language.

cmoesel avatar cmoesel commented on August 17, 2024

That's a reasonable approach. Thanks for looking into this. If it works in JSON, I'm happy for now!

from clinical_quality_language.

brynrhodes avatar brynrhodes commented on August 17, 2024

Submitted CQL STU comment #1317 to address the STRING and QUOTEDIDENTIFIER lexical rules. (A similar fix was applied to the FHIRPath specification).

from clinical_quality_language.

brynrhodes avatar brynrhodes commented on August 17, 2024

Released in v1.1.1-SNAPSHOT

from clinical_quality_language.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.