Giter Site home page Giter Site logo

Comments (5)

dhuebner avatar dhuebner commented on September 13, 2024

@jim-h-wang

  1. I'm for using double-quotes. Comment fron the Grammar the synonymValue is of type STRING to accommodate peculiar values which is true i.e. value "ACT/360". This will also help keep ValidId exceptional cases reduced, see #101

  2. Also here I would say use quotes. There is no benefit for . notation, one can not use content assist after . and one can't jump to the path segments.

  3. see 2.

Afaik we do not really have control over "referenced" values in synonym part, correct me if I'm wrong. If so, we can't really react on syntactically breaking cases for example an arithmetical operator, reserved keyword or even space. Overall, the only practical way I see, is to quote the values.

from rosetta-dsl.

jim-h-wang avatar jim-h-wang commented on September 13, 2024

@dhuebner

  1. Ok, let's use quotes everywhere for consistency.

2, 3. Sounds like you are in favour of migrating . to ->. For this change, you will need to find usages of the path part of the synonym across all repositories. I know at least in rosetta-ingest, we depend on the . to perform a String::split

from rosetta-dsl.

dhuebner avatar dhuebner commented on September 13, 2024

@jim-h-wang

depend on the . to perform a String::split

Hopefully some tests will fail if I miss a piece

from rosetta-dsl.

dhuebner avatar dhuebner commented on September 13, 2024

@jim-h-wang
I would also suggest to consolidate the rest of class synonym rule:

RosettaSynonymBody:
	( 'value'  (values+=RosettaSynonymValue ',')* values+=RosettaSynonymValue (mappingLogic=RosettaMapping)? 
		| 'hint' (hints+=ValidHint ',')* hints+=ValidHint
		| mappingLogic=RosettaMappingSetTo )
	('meta' (metaValues += ValidID ',')* metaValues += ValidID)?
	('mapper' mapper=ValidID)?
	
;

ValidHint & ValidID are just values which are not referenced or referencing things hance may become a STRING too. Also ValidHint allows * at the end but it's never used in cdm, do we still need this?

I found any usage of SynonymEnumeration:

RosettaSynonymEnumeration:
	value = '.' enumValue=STRING
;

One test case for that, but the syntax looks really strange:

[synonym FpML value Bar."value"]

from rosetta-dsl.

jim-h-wang avatar jim-h-wang commented on September 13, 2024

ValidHint & ValidID are just values which are not referenced or referencing things hance may become a STRING too. Also ValidHint allows * at the end but it's never used in cdm, do we still need this?

I still prefer to not have the quotes if we can avoid them. Changing ValidId to STRING would mean that all the attribute names would then need quotes. The * isn't currently used but we do still plan to make use of it.

I found any usage of SynonymEnumeration:

We can remove this grammar, it's unused in the model and not supported in ingestion.

from rosetta-dsl.

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.