zazuko / xrm

A friendly language for mappings to RDF
MIT License
1 stars 0 forks source link

Housekeeping LINE_END ruleCalls #56

Closed mchlrch closed 4 years ago

mchlrch commented 4 years ago

Proposal from @nnamtug

Proposal: Grammer changes, do housekeeping

Due to issue 12 (Syntax involving prefixes with ':' instead of '.'), existing DSL files must be migrated. When doing so, this is a good opportunity to clean up the grammar. Terminal rules as 'LINE_END' (was ';' before issue 10 (formatter)), should not be declared as optional:

  • make LINE_END ruleCall mandatory
  • on section 'types' remove unneded LINE_END, since it only appears on the last line and is therefore awkward. example: types bdb:Sector skos:Concept;
mchlrch commented 4 years ago

Should we then have a LINE_END for each type declaration, to get a consistent look inside the map ?

map Profession from easygov_professions {
    subject template "https://permits.zazukoians.org/professions/{0}" with CODE;

    types
        bdb:Profession;
        skos:Concept;

    properties
        exProfessions:internalKey from PK with datatype xsd.int;
        exProfessions:position from POS with datatype xsd.int;
mchlrch commented 4 years ago

Closing this. LINE_END (semicolons) only in places where they help code-assist. Always mandatory. ATM only used insidemap

map Profession from easygov_professions {
    subject template "https://permits.zazukoians.org/professions/{0}" with CODE;

    types
        bdb:Profession
        skos:Concept

    properties
        exProfessions:internalKey from PK with datatype xsd:int;
        exProfessions:position from POS with datatype xsd:int;