zazuko/xrm

Housekeeping LINE_END ruleCalls

Closed this issue · 2 comments

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;
  • make LINE_END ruleCall mandatory
  • on section 'types' remove unneded LINE_END

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;

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;