From 076cfebda437786fe084369e22ef905da5a6b4f3 Mon Sep 17 00:00:00 2001 From: vbot Date: Tue, 22 Oct 2024 17:07:11 +0200 Subject: [PATCH] remove outdated tooling --- syntax_highlighting/en/ace/mode-catala_en.js | 207 ------------- .../en/atom/grammars/catala_en.cson | 209 ------------- syntax_highlighting/en/atom/package.json | 17 -- syntax_highlighting/en/catala_en.iro | 282 ------------------ syntax_highlighting/en/setup_atom.sh | 12 - syntax_highlighting/fr/ace/mode-catala_fr.js | 207 ------------- .../fr/atom/grammars/catala_fr.cson | 209 ------------- syntax_highlighting/fr/atom/package.json | 17 -- syntax_highlighting/fr/catala_fr.iro | 282 ------------------ syntax_highlighting/fr/setup_atom.sh | 12 - .../pl/atom/grammars/catala_pl.cson | 163 ---------- syntax_highlighting/pl/atom/package.json | 17 -- syntax_highlighting/pl/catala_pl.iro | 264 ---------------- syntax_highlighting/pl/setup_atom.sh | 12 - 14 files changed, 1910 deletions(-) delete mode 100644 syntax_highlighting/en/ace/mode-catala_en.js delete mode 100644 syntax_highlighting/en/atom/grammars/catala_en.cson delete mode 100644 syntax_highlighting/en/atom/package.json delete mode 100644 syntax_highlighting/en/catala_en.iro delete mode 100755 syntax_highlighting/en/setup_atom.sh delete mode 100644 syntax_highlighting/fr/ace/mode-catala_fr.js delete mode 100644 syntax_highlighting/fr/atom/grammars/catala_fr.cson delete mode 100644 syntax_highlighting/fr/atom/package.json delete mode 100644 syntax_highlighting/fr/catala_fr.iro delete mode 100755 syntax_highlighting/fr/setup_atom.sh delete mode 100644 syntax_highlighting/pl/atom/grammars/catala_pl.cson delete mode 100644 syntax_highlighting/pl/atom/package.json delete mode 100644 syntax_highlighting/pl/catala_pl.iro delete mode 100755 syntax_highlighting/pl/setup_atom.sh diff --git a/syntax_highlighting/en/ace/mode-catala_en.js b/syntax_highlighting/en/ace/mode-catala_en.js deleted file mode 100644 index d559cc70a..000000000 --- a/syntax_highlighting/en/ace/mode-catala_en.js +++ /dev/null @@ -1,207 +0,0 @@ -/* - * To try in Ace editor, copy and paste into the mode creator - * here : http://ace.c9.io/tool/mode_creator.html - */ - -ace.define( - "ace/mode/catala_en_highlighting_rules", - [ - "require", - "exports", - "module", - "ace/lib/oop", - "ace/mode/text_highlight_rules", - ], - function (require, exports, module) { - "use strict"; - var oop = require("../lib/oop"); - var TextHighlightRules = - require("./text_highlight_rules").TextHighlightRules; - /* --------------------- START ----------------------------- */ - var CatalaEnHighlightRules = function () { - this.$rules = { - start: [ - { - token: "markup.heading.title", - regex: "(^s*[#]+)", - push: "main__1", - }, - { - token: "markup.heading.subtitle", - regex: "(^s*[#]+s*[[^]]s*])", - push: "main__2", - }, - { - token: "entity.law", - regex: "([^`])", - }, - { - token: "comment.block.documentation", - regex: "(```catala-metadata)", - push: "code", - }, - { - defaultToken: "text", - }, - { - token: "comment.block.documentation", - regex: "(```catala)", - push: "code", - }, - { - defaultToken: "text", - }, - ], - code: [ - { - token: "comment.block.documentation", - regex: "(```)", - next: "pop", - }, - { - token: "comment.line", - regex: "(\\s*\\#.*$)", - }, - { - token: ["keyword.other", "text", "keyword.other", "text", "entity.name.function"], - regex: - "(context|input|output|internal)(\\s*)(|output)(\\s+)(\\s+)([a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00ea\u0153\u00e7][a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00ea\u0153\u00e7A-Z\u00c9\u00c8\u00c0\u00c2\u00d9\u00ce\u00ca\u0152\u00c70-9_\\']*)", - }, - { - token: "keyword.control", - regex: - "\\b(match|with\\s+pattern|but\\s+replace|fixed|by|decreasing|increasing|varies|with|we\\s+have|let|in|such\\s+that|exists|for|all|of|if|then|else|initial)\\b", - }, - { - token: "keyword.other", - regex: - "\\b(scope|depends\\s+on|declaration|includes|list\\s+of|content|optional|structure|enumeration|context|input|output|internal|rule|under\\s+condition|condition|data|consequence|fulfilled|equals|assertion|definition|state|label|exception|anything|list\\s+empty)\\b", - }, - { - token: "constant.numeric", - regex: "(\\|[0-9]+\\-[0-9]+\\-[0-9]+\\|)", - }, - { - token: "constant", - regex: "\\b(true|false)\\b", - }, - { - token: "constant.numeric", - regex: "\\b([0-9]+(,[0-9]*|))\\b", - }, - { - token: "punctuation", - regex: "(\\-\\-|\\;|\\.|\\,|\\:|\\(|\\)|\\[|\\]|\\{|\\})", - }, - { - token: "keyword.operator", - regex: - "(\\-\\>|\\+\\.|\\+\\@|\\+\\^|\\+\\$|\\+|\\-\\.|\\-\\@|\\-\\^|\\-\\$|\\-|\\*\\.|\\*\\@|\\*\\^|\\*\\$|\\*|/\\.|/\\@|/\\^|/\\$|/|\\!|>\\.|>=\\.|<=\\.|<\\.|>\\@|>=\\@|<=\\@|<\\@|>\\$|>=\\$|<=\\$|<\\$|>\\^|>=\\^|<=\\^|<\\^|>|>=|<=|<|=|not|or|xor|and|\\$|%|year|month|day)", - }, - { - token: "support.type", - regex: - "\\b(integer|boolean|date|duration|money|text|decimal|number|sum)\\b", - }, - { - token: ["entity.name.class", "punctuation", "entity.name.function"], - regex: - "\\b([A-Z\u00c9\u00c8\u00c0\u00c2\u00d9\u00ce\u00ca\u0152\u00c7][a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00ea\u0153\u00e7A-Z\u00c9\u00c8\u00c0\u00c2\u00d9\u00ce\u00ca\u0152\u00c70-9_\\']*)(\\.)([a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00ea\u0153\u00e7][a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00ea\u0153\u00e7A-Z\u00c9\u00c8\u00c0\u00c2\u00d9\u00ce\u00ca\u0152\u00c70-9_\\']*)\\b", - }, - { - token: ["entity.name.function", "punctuation", "meta.variable_id"], - regex: - "\\b([a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00ea\u0153\u00e7][a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00ea\u0153\u00e7A-Z\u00c9\u00c8\u00c0\u00c2\u00d9\u00ce\u00ca\u0152\u00c70-9_\\']*)(\\.)([a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00ea\u0153\u00e7][a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00ea\u0153\u00e7A-Z\u00c9\u00c8\u00c0\u00c2\u00d9\u00ce\u00ca\u0152\u00c70-9_\\'\\.]*)\\b", - }, - { - token: "entity.name.function", - regex: - "\\b([a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00ea\u0153\u00e7][a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00ea\u0153\u00e7A-Z\u00c9\u00c8\u00c0\u00c2\u00d9\u00ce\u00ca\u0152\u00c70-9_\\']*)\\b", - }, - { - token: "entity.name.class", - regex: - "\\b([A-Z\u00c9\u00c8\u00c0\u00c2\u00d9\u00ce\u00ca\u0152\u00c7][a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00ea\u0153\u00e7A-Z\u00c9\u00c8\u00c0\u00c2\u00d9\u00ce\u00ca\u0152\u00c70-9_\\']*)\\b", - }, - { - defaultToken: "text", - }, - ], - main__1: [ - { - token: "markup.heading.title", - regex: "(\n)", - next: "pop", - }, - { - token: "markup.heading.title", - regex: "(.)", - }, - { - defaultToken: "text", - }, - ], - main__2: [ - { - token: "markup.heading.subtitle", - regex: "(\n)", - next: "pop", - }, - { - token: "markup.heading.subtitle", - regex: "(.)", - }, - { - defaultToken: "text", - }, - ], - }; - this.normalizeRules(); - }; - /* ------------------------ END ------------------------------ */ - oop.inherits(CatalaEnHighlightRules, TextHighlightRules); - exports.CatalaEnHighlightRules = CatalaEnHighlightRules; - } -); - -ace.define( - "ace/mode/catala_en", - [ - "require", - "exports", - "module", - "ace/lib/oop", - "ace/mode/text", - "ace/mode/catala_en_highlighting_rules", - ], - function (require, exports, module) { - "use strict"; - - var oop = require("../lib/oop"); - var TextMode = require("./text").Mode; - var CatalaEnHighlightRules = - require("./catala_en_highlighting_rules").CatalaEnHighlightRules; - - var Mode = function () { - this.HighlightRules = CatalaEnHighlightRules; - this.$behaviour = this.$defaultBehaviour; - }; - oop.inherits(Mode, TextMode); - - (function () { - this.lineCommentStart = "#"; - - this.$id = "ace/mode/catala_en"; - this.snippetFileId = "ace/snippets/catala_en"; - }.call(Mode.prototype)); - - exports.Mode = Mode; - } -); -(function () { - ace.require(["ace/mode/catala_en"], function (m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); -})(); diff --git a/syntax_highlighting/en/atom/grammars/catala_en.cson b/syntax_highlighting/en/atom/grammars/catala_en.cson deleted file mode 100644 index 44d81811b..000000000 --- a/syntax_highlighting/en/atom/grammars/catala_en.cson +++ /dev/null @@ -1,209 +0,0 @@ -'fileTypes' : [ - 'catala_en' -] -'name' : 'catala_en' -'patterns' : [ - { - 'include' : '#main' - } -] -'scopeName' : 'source.catala_en' -'uuid' : '' -'repository' : { - 'main' : { - 'patterns' : [ - { - 'begin' : '(^\\s*[\\#]+)' - 'beginCaptures' : { - '1' : { - 'name' : 'markup.heading.title.catala_en' - } - } - 'patterns' : [ - { - 'include' : '#main__1' - } - ] - 'end' : '(\n)' - 'endCaptures' : { - '1' : { - 'name' : 'markup.heading.title.catala_en' - } - } - } - { - 'begin' : '(^\\s*[\\#]+\\s*\\[[^\]]\\s*\\])' - 'beginCaptures' : { - '1' : { - 'name' : 'markup.heading.subtitle.catala_en' - } - } - 'patterns' : [ - { - 'include' : '#main__2' - } - ] - 'end' : '(\n)' - 'endCaptures' : { - '1' : { - 'name' : 'markup.heading.subtitle.catala_en' - } - } - } - { - 'match' : '([^`])' - 'name' : 'entity.law.catala_en' - } - { - 'begin' : '(```catala-metadata)' - 'beginCaptures' : { - '1' : { - 'name' : 'comment.block.documentation.catala_en' - } - } - 'patterns' : [ - { - 'include' : '#code' - } - ] - 'end' : '(```)' - 'endCaptures' : { - '1' : { - 'name' : 'comment.block.documentation.catala_en' - } - } - } - { - 'begin' : '(```catala)' - 'beginCaptures' : { - '1' : { - 'name' : 'comment.block.documentation.catala_en' - } - } - 'patterns' : [ - { - 'include' : '#code' - } - ] - 'end' : '(```)' - 'endCaptures' : { - '1' : { - 'name' : 'comment.block.documentation.catala_en' - } - } - } - ] - } - 'code' : { - 'patterns' : [ - { - 'match' : '(\\s*\\#.*$)' - 'name' : 'comment.line.catala_en' - } - { - 'match' : '(context|input|output|internal)(\\s*)(|output)(\\s+)([a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00ea}\\x{0153}\\x{00e7}][a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00ea}\\x{0153}\\x{00e7}A-Z\\x{00c9}\\x{00c8}\\x{00c0}\\x{00c2}\\x{00d9}\\x{00ce}\\x{00ca}\\x{0152}\\x{00c7}0-9_\\\']*)' - 'captures' : { - '1' : { - 'name' : 'keyword.other.catala_en' - } - '2' : { - 'name' : 'text.catala_en' - } - '3' : { - 'name' : 'keyword.other.catala_en' - } - '4' : { - 'name' : 'text.catala_en' - } - '5' : { - 'name' : 'entity.name.function.catala_en' - } - } - } - { - 'match' : '\\b(match|with\\s+pattern|but\\s+replace|fixed|by|decreasing|increasing|varies|with|we\\s+have|let|in|such\\s+that|exists|for|all|of|if|then|else|initial)\\b' - 'name' : 'keyword.control.catala_en' - } - { - 'match' : '\\b(scope|depends\\s+on|declaration|includes|list\\s+of|content|optional|structure|enumeration|context|input|output|internal|rule|under\\s+condition|condition|data|consequence|fulfilled|equals|assertion|definition|state|label|exception|anything|list\\+empty)\\b' - 'name' : 'keyword.other.catala_en' - } - { - 'match' : '(\\|[0-9]+\\-[0-9]+\\-[0-9]+\\|)' - 'name' : 'constant.numeric.catala_en' - } - { - 'match' : '\\b(true|false)\\b' - 'name' : 'constant.catala_en' - } - { - 'match' : '\\b([0-9]+(,[0-9]*|))\\b' - 'name' : 'constant.numeric.catala_en' - } - { - 'match' : '(\\-\\-|\\;|\\.|\\,|\\:|\\(|\\)|\\[|\\]|\\{|\\})' - 'name' : 'punctuation.catala_en' - } - { - 'match' : '(\\-\\>|\\+\\.|\\+\\@|\\+\\^|\\+\\$|\\+|\\-\\.|\\-\\@|\\-\\^|\\-\\$|\\-|\\*\\.|\\*\\@|\\*\\^|\\*\\$|\\*|/\\.|/\\@|/\\^|/\\$|/|\\!|>\\.|>=\\.|<=\\.|<\\.|>\\@|>=\\@|<=\\@|<\\@|>\\$|>=\\$|<=\\$|<\\$|>\\^|>=\\^|<=\\^|<\\^|>|>=|<=|<|=|not|or|xor|and|\\$|%|year|month|day)' - 'name' : 'keyword.operator.catala_en' - } - { - 'match' : '\\b(integer|boolean|date|duration|money|text|decimal|number|sum)\\b' - 'name' : 'support.type.catala_en' - } - { - 'match' : '\\b([A-Z\\x{00c9}\\x{00c8}\\x{00c0}\\x{00c2}\\x{00d9}\\x{00ce}\\x{00ca}\\x{0152}\\x{00c7}][a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00ea}\\x{0153}\\x{00e7}A-Z\\x{00c9}\\x{00c8}\\x{00c0}\\x{00c2}\\x{00d9}\\x{00ce}\\x{00ca}\\x{0152}\\x{00c7}0-9_\\\']*)(\\.)([a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00ea}\\x{0153}\\x{00e7}][a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00ea}\\x{0153}\\x{00e7}A-Z\\x{00c9}\\x{00c8}\\x{00c0}\\x{00c2}\\x{00d9}\\x{00ce}\\x{00ca}\\x{0152}\\x{00c7}0-9_\\\']*)\\b' - 'captures' : { - '1' : { - 'name' : 'entity.name.class.catala_en' - } - '2' : { - 'name' : 'punctuation.catala_en' - } - '3' : { - 'name' : 'entity.name.function.catala_en' - } - } - } - { - 'match' : '\\b([a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00ea}\\x{0153}\\x{00e7}][a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00ea}\\x{0153}\\x{00e7}A-Z\\x{00c9}\\x{00c8}\\x{00c0}\\x{00c2}\\x{00d9}\\x{00ce}\\x{00ca}\\x{0152}\\x{00c7}0-9_\\\']*)(\\.)([a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00ea}\\x{0153}\\x{00e7}][a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00ea}\\x{0153}\\x{00e7}A-Z\\x{00c9}\\x{00c8}\\x{00c0}\\x{00c2}\\x{00d9}\\x{00ce}\\x{00ca}\\x{0152}\\x{00c7}0-9_\\\'\\.]*)\\b' - 'captures' : { - '1' : { - 'name' : 'entity.name.function.catala_en' - } - '2' : { - 'name' : 'punctuation.catala_en' - } - '3' : { - 'name' : 'meta.variable_id.catala_en' - } - } - } - { - 'match' : '\\b([a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00ea}\\x{0153}\\x{00e7}][a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00ea}\\x{0153}\\x{00e7}A-Z\\x{00c9}\\x{00c8}\\x{00c0}\\x{00c2}\\x{00d9}\\x{00ce}\\x{00ca}\\x{0152}\\x{00c7}0-9_\\\']*)\\b' - 'name' : 'entity.name.function.catala_en' - } - { - 'match' : '\\b([A-Z\\x{00c9}\\x{00c8}\\x{00c0}\\x{00c2}\\x{00d9}\\x{00ce}\\x{00ca}\\x{0152}\\x{00c7}][a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00ea}\\x{0153}\\x{00e7}A-Z\\x{00c9}\\x{00c8}\\x{00c0}\\x{00c2}\\x{00d9}\\x{00ce}\\x{00ca}\\x{0152}\\x{00c7}0-9_\\\']*)\\b' - 'name' : 'entity.name.class.catala_en' - } - ] - } - 'main__1' : { - 'patterns' : [ - { - 'match' : '(.)' - 'name' : 'markup.heading.title.catala_en' - } - ] - } - 'main__2' : { - 'patterns' : [ - { - 'match' : '(.)' - 'name' : 'markup.heading.subtitle.catala_en' - } - ] - } -} diff --git a/syntax_highlighting/en/atom/package.json b/syntax_highlighting/en/atom/package.json deleted file mode 100644 index 460a730be..000000000 --- a/syntax_highlighting/en/atom/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "language-catala-en", - "version": "1.0.0", - "description": "English syntax highlighting for the Catala language", - "engines": { - "atom": "*" - }, - "repository": { - "type": "git", - "url": "https://github.com/CatalaLang/catala.git" - }, - "bugs": { - "url": "https://github.com/CatalaLang/catala/issues" - }, - "dependencies": {}, - "license": "Apache" -} diff --git a/syntax_highlighting/en/catala_en.iro b/syntax_highlighting/en/catala_en.iro deleted file mode 100644 index 434df403d..000000000 --- a/syntax_highlighting/en/catala_en.iro +++ /dev/null @@ -1,282 +0,0 @@ -# This file is part of the Catala compiler, a specification language for tax and social benefits -# computation rules. Copyright (C) 2020 Inria, contributor: Denis Merigoux -# -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software distributed under the License -# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express -# or implied. See the License for the specific language governing permissions and limitations under -# the License. - - -name = catala_en -file_extensions [] = catala_en; - -################################################################ -## Styles -################################################################ - -styles [] { - -.comment : style { - color = light_green - italic = true - textmate_scope = comment.line - pygments_scope = Comment.Single -} - -.sc_id : style { - textmate_scope = meta.variable_id - pygments_scope = String - color = violet_red -} - -.sc_id_def : style { - textmate_scope = entity.name.function - pygments_scope = Name.Variable - color = orange -} - - -.cc_id : style { - color = light_blue - textmate_scope = entity.name.class - pygments_scope = Name.Class -} - - -.law_title : style { - color = yellow - italic = false - textmate_scope = markup.heading.title - pygments_scope = Generic.Heading -} - -.law_subtitle : style { - color = gold - italic = true - textmate_scope = markup.heading.subtitle - pygments_scope = Generic.Heading -} - -.law : style { - color = light_yellow - italic = false - textmate_scope = entity.law - pygments_scope = String -} - -.code_delimiter : style { - color = grey - italic = false - textmate_scope = comment.block.documentation - pygments_scope = String -} - -.primitive : style { - color = purple - textmate_scope = support.type - pygments_scope = Keyword.Type -} - -.whitespace : style { - textmate_scope = text - pygments_scope = String -} - -.keyword_expression : style { - color = pink - textmate_scope = keyword.control - pygments_scope = Keyword.Reserved -} - -.keyword_rule : style { - color = cyan - textmate_scope = keyword.other - pygments_scope = Keyword.Declaration -} - -.punctuation : style { - color = red_2 - ace_scope = punctuation - textmate_scope = punctuation - pygments_scope = Operator -} - -.literal : style { - color = green - textmate_scope = constant - pygments_scope = Keyword.Constant -} - -.literal_numeric : style { - color = violet - textmate_scope = constant.numeric - pygments_scope = Number.Integer -} - - -.operator : style { - color = brown - textmate_scope = keyword.operator - pygments_scope = Operator -} - -} - -################################################# -## Parse contexts -################################################# - -__LOWER_CHARS \= a-zéèàâùîêœç - -__UPPER_CHARS \= A-ZÉÈÀÂÙÎÊŒÇ - -__SC_ID \= [$${__LOWER_CHARS}][$${__LOWER_CHARS}$${__UPPER_CHARS}0-9_\']* - -__SC_ID_COMPOSED \= [$${__LOWER_CHARS}][$${__LOWER_CHARS}$${__UPPER_CHARS}0-9_\'\.]* - -__CC_ID \= [$${__UPPER_CHARS}][$${__LOWER_CHARS}$${__UPPER_CHARS}0-9_\']* - -contexts [] { - -############################################## -## Main Context - Entry point context -############################################## - -main : context { - - : pattern { - regex \= (^\s*[\#]+.*) - styles [] = .law_title; - } - - : pattern { - regex \= (^\s*[\#]+\s*\[[^\]]\s*].*) - styles [] = .law_subtitle; - } - - : pattern { - regex \= ([^`]) - styles [] = .law; - } - - : push { - regex \= (^```catala$) - styles [] = .code_delimiter; - context [] = code; - } - - : push { - regex \= (^```catala-metadata$) - styles [] = .code_delimiter; - context [] = code; - } - - : push { - regex \= (^```catala-test-inline$) - styles [] = .code_delimiter; - context [] = test; - } - -} - -test : context { - - : pop { - regex \= (^```$) - styles [] = .code_delimiter; - } - - : pattern { - regex \= (^[$] catala \S*) - styles [] = .literal ; - } -} - -code : context { - - : pop { - regex \= (^```$) - styles [] = .code_delimiter; - } - - : pattern { - regex \= (\s*\#.*$) - styles [] = .comment ; - } - - : pattern { - regex \= (context|input|output|internal)(\s*)(|output)(\s+)($${__SC_ID}) - styles [] = .keyword_rule, .whitespace, .keyword_rule, .whitespace, .sc_id_def; - } - - : pattern { - regex \= \b(match|with\s+pattern|but\s+replacefixed|by|decreasing|increasing|varies|with|we\s+have|let|in|scope|depends\s+on|declaration|includes|content|rule|under\s+condition|condition|data|consequence|fulfilled|equals|assertion|definition|state|label|exception)\b - styles [] = .keyword_expression ; - } - - : pattern { - regex \= \b(contains|number|sum|such\s+that|exists|for|all|of|if|then|else|is|empty|among|maximum|minimum|round|list\s+empty)\b - styles [] = .keyword_rule ; - } - - : pattern { - regex \= (\|[0-9]+\-[0-9]+\-[0-9]+\|) - styles [] = .literal_numeric ; - } - - : pattern { - regex \= \b(true|false)\b - styles [] = .literal ; - } - - - : pattern { - regex \= \b([0-9]+(,[0-9]*|))\b - styles [] = .literal_numeric ; - } - - - : pattern { - regex \= (\-\-|\;|\.|\,|\:|\(|\)|\[|\]|\{|\}) - styles [] = .punctuation; - } - - : pattern { - regex \= (\-\>|\+\.|\+\@|\+\^|\+\$|\+|\-\.|\-\@|\-\^|\-\$|\-|\*\.|\*\@|\*\^|\*\$|\*|/\.|/\@|/\$|/|\!|>\.|>=\.|<=\.|<\.|>\@|>=\@|<=\@|<\@|>\$|>=\$|<=\$|<\$|>\^|>=\^|<=\^|<\^|>|>=|<=|<|=|not|or|xor|and|\$|€|%|year|month|day) - styles [] = .operator; - } - - : pattern { - regex \= \b(structure|enumeration|list\s+of|integer|boolean|date|duration|money|text|decimal)\b - styles [] = .primitive; - } - - : pattern { - regex \= \b($${__CC_ID})(\.)($${__SC_ID})\b - styles [] = .cc_id, .punctuation, .sc_id_def ; - } - - : pattern { - regex \= \b($${__SC_ID})(\.)($${__SC_ID_COMPOSED})\b - styles [] = .sc_id_def, .punctuation, .sc_id ; - } - - : pattern { - regex \= \b($${__SC_ID})\b - styles [] = .sc_id_def ; - } - - : pattern { - regex \= \b($${__CC_ID})\b - styles [] = .cc_id ; - } - -} - -} diff --git a/syntax_highlighting/en/setup_atom.sh b/syntax_highlighting/en/setup_atom.sh deleted file mode 100755 index 31dd24cc4..000000000 --- a/syntax_highlighting/en/setup_atom.sh +++ /dev/null @@ -1,12 +0,0 @@ -#! /usr/bin/env sh - -set -eu - -FILE=~/.atom/packages/catala_en -SCRIPT=`realpath $0` -SCRIPTPATH=`dirname $SCRIPT` - -if [ ! -L "$FILE" ]; then - echo "Creating link" - ln -s -f $SCRIPTPATH/atom "$FILE" -fi diff --git a/syntax_highlighting/fr/ace/mode-catala_fr.js b/syntax_highlighting/fr/ace/mode-catala_fr.js deleted file mode 100644 index f65a8c0cd..000000000 --- a/syntax_highlighting/fr/ace/mode-catala_fr.js +++ /dev/null @@ -1,207 +0,0 @@ -/* - * To try in Ace editor, copy and paste into the mode creator - * here : http://ace.c9.io/tool/mode_creator.html - */ - -ace.define( - "ace/mode/catala_fr_highlighting_rules", - [ - "require", - "exports", - "module", - "ace/lib/oop", - "ace/mode/text_highlight_rules", - ], - function (require, exports, module) { - "use strict"; - var oop = require("../lib/oop"); - var TextHighlightRules = require("./text_highlight_rules") - .TextHighlightRules; - /* --------------------- START ----------------------------- */ - var CatalaFrHighlightRules = function () { - this.$rules = { - start: [ - { - token: "markup.heading.title", - regex: "(^s*[#]+)", - push: "main__1", - }, - { - token: "markup.heading.subtitle", - regex: "(^s*[#]+s*[[^]]s*])", - push: "main__2", - }, - { - token: "entity.law", - regex: "([^`])", - }, - { - token: "comment.block.documentation", - regex: "(```catala-metadata)", - push: "code", - }, - { - defaultToken: "text", - }, - { - token: "comment.block.documentation", - regex: "(```catala)", - push: "code", - }, - { - defaultToken: "text", - }, - ], - code: [ - { - token: "comment.block.documentation", - regex: "(```)", - next: "pop", - }, - { - token: "comment.line", - regex: "(\\s*\\#.*$)", - }, - { - token: ["keyword.other", "text", "keyword.other", "text", "entity.name.function"], - regex: - "(contexte|entr\u00e9e|r\u00e9sultat|interne)(\\s*)(|r\u00e9sultat)(\\s+)([a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00f4\u00ea\u0153\u00e7][a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00f4\u00ea\u0153\u00e7A-Z\u00c9\u00c8\u00c0\u00c2\u00d9\u00ce\u00d4\u00ca\u0152\u00c70-9_\\']*)", - }, - { - token: "keyword.control", - regex: - "\\b(selon|sous\\s+forme|mais\\s+en\\s+rempla\u00e7ant|fix\u00e9|par|d\u00e9croissant|croissant|varie|avec|on\\s+a|soit|dans|tel\\s+que|existe|pour|tout|de|si|alors|sinon|initial)\\b", - }, - { - token: "keyword.other", - regex: - "\\b(champ\\s+d'application|si\\s+et\\s+seulement\\s+si|d\u00e9pend\\s+de|d\u00e9claration|inclus|liste\\s+de|contenu|optionnel|structure|\u00e9num\u00e9ration|contexte|entr\u00e9e|r\u00e9sultat|interne|r\u00e8gle|sous\\s+condition|condition|donn\u00e9e|cons\u00e9quence|rempli|\u00e9gal\\s+\u00e0|assertion|d\u00e9finition|\u00e9tat|\u00e9tiquette|exception|n'importe\\s+quel)\\b", - }, - { - token: "constant.numeric", - regex: "(\\|[0-9]+\\-[0-9]+\\-[0-9]+\\|)", - }, - { - token: "constant", - regex: "\\b(vrai|faux)\\b", - }, - { - token: "constant.numeric", - regex: "\\b([0-9]+(,[0-9]*|))\\b", - }, - { - token: "punctuation", - regex: "(\\-\\-|\\;|\\.|\\,|\\:|\\(|\\)|\\[|\\]|\\{|\\})", - }, - { - token: "keyword.operator", - regex: - "(\\-\\>|\\+\\.|\\+\\@|\\+\\^|\\+\\u20ac|\\+|\\-\\.|\\-\\@|\\-\\^|\\-\\u20ac|\\-|\\*\\.|\\*\\@|\\*\\^|\\*\\u20ac|\\*|/\\.|/\\@|/\\^|/\\u20ac|/|\\!|>\\.|>=\\.|<=\\.|<\\.|>\\@|>=\\@|<=\\@|<\\@|>\\u20ac|>=\\u20ac|<=\\u20ac|<\\u20ac|>\\^|>=\\^|<=\\^|<\\^|>|>=|<=|<|=|non|ou\\s+bien|ou|et|\\u20ac|%|an|mois|jour)", - }, - { - token: "support.type", - regex: - "\\b(entier|bool\u00e9en|date|dur\u00e9e|argent|texte|d\u00e9cimal|d\u00e9cret|loi|nombre|somme)\\b", - }, - { - token: ["entity.name.class", "punctuation", "entity.name.function"], - regex: - "\\b([A-Z\u00c9\u00c8\u00c0\u00c2\u00d9\u00ce\u00d4\u00ca\u0152\u00c7][a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00f4\u00ea\u0153\u00e7A-Z\u00c9\u00c8\u00c0\u00c2\u00d9\u00ce\u00d4\u00ca\u0152\u00c70-9_\\']*)(\\.)([a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00f4\u00ea\u0153\u00e7][a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00f4\u00ea\u0153\u00e7A-Z\u00c9\u00c8\u00c0\u00c2\u00d9\u00ce\u00d4\u00ca\u0152\u00c70-9_\\']*)\\b", - }, - { - token: ["entity.name.function", "punctuation", "meta.variable_id"], - regex: - "\\b([a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00f4\u00ea\u0153\u00e7][a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00f4\u00ea\u0153\u00e7A-Z\u00c9\u00c8\u00c0\u00c2\u00d9\u00ce\u00d4\u00ca\u0152\u00c70-9_\\']*)(\\.)([a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00f4\u00ea\u0153\u00e7][a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00f4\u00ea\u0153\u00e7A-Z\u00c9\u00c8\u00c0\u00c2\u00d9\u00ce\u00d4\u00ca\u0152\u00c70-9_\\'\\.]*)\\b", - }, - { - token: "entity.name.function", - regex: - "\\b([a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00f4\u00ea\u0153\u00e7][a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00f4\u00ea\u0153\u00e7A-Z\u00c9\u00c8\u00c0\u00c2\u00d9\u00ce\u00d4\u00ca\u0152\u00c70-9_\\']*)\\b", - }, - { - token: "entity.name.class", - regex: - "\\b([A-Z\u00c9\u00c8\u00c0\u00c2\u00d9\u00ce\u00d4\u00ca\u0152\u00c7][a-z\u00e9\u00e8\u00e0\u00e2\u00f9\u00ee\u00f4\u00ea\u0153\u00e7A-Z\u00c9\u00c8\u00c0\u00c2\u00d9\u00ce\u00d4\u00ca\u0152\u00c70-9_\\']*)\\b", - }, - { - defaultToken: "text", - }, - ], - main__1: [ - { - token: "markup.heading.title", - regex: "(\n)", - next: "pop", - }, - { - token: "markup.heading.title", - regex: "(.)", - }, - { - defaultToken: "text", - }, - ], - main__2: [ - { - token: "markup.heading.subtitle", - regex: "(\n)", - next: "pop", - }, - { - token: "markup.heading.subtitle", - regex: "(.)", - }, - { - defaultToken: "text", - }, - ], - }; - this.normalizeRules(); - }; - /* ------------------------ END ------------------------------ */ - oop.inherits(CatalaFrHighlightRules, TextHighlightRules); - exports.CatalaFrHighlightRules = CatalaFrHighlightRules; - } -); - -ace.define( - "ace/mode/catala_fr", - [ - "require", - "exports", - "module", - "ace/lib/oop", - "ace/mode/text", - "ace/mode/catala_fr_highlighting_rules", - ], - function (require, exports, module) { - "use strict"; - - var oop = require("../lib/oop"); - var TextMode = require("./text").Mode; - var CatalaFrHighlightRules = require("./catala_fr_highlighting_rules") - .CatalaFrHighlightRules; - - var Mode = function () { - this.HighlightRules = CatalaFrHighlightRules; - this.$behaviour = this.$defaultBehaviour; - }; - oop.inherits(Mode, TextMode); - - (function () { - this.lineCommentStart = "#"; - - this.$id = "ace/mode/catala_fr"; - this.snippetFileId = "ace/snippets/catala_fr"; - }.call(Mode.prototype)); - - exports.Mode = Mode; - } -); -(function () { - ace.require(["ace/mode/catala_fr"], function (m) { - if (typeof module == "object" && typeof exports == "object" && module) { - module.exports = m; - } - }); -})(); diff --git a/syntax_highlighting/fr/atom/grammars/catala_fr.cson b/syntax_highlighting/fr/atom/grammars/catala_fr.cson deleted file mode 100644 index 727db1c37..000000000 --- a/syntax_highlighting/fr/atom/grammars/catala_fr.cson +++ /dev/null @@ -1,209 +0,0 @@ -'fileTypes' : [ - 'catala_fr' -] -'name' : 'catala_fr' -'patterns' : [ - { - 'include' : '#main' - } -] -'scopeName' : 'source.catala_fr' -'uuid' : '' -'repository' : { - 'main' : { - 'patterns' : [ - { - 'begin' : '(^\\s*[\\#]+)' - 'beginCaptures' : { - '1' : { - 'name' : 'markup.heading.title.catala_fr' - } - } - 'patterns' : [ - { - 'include' : '#main__1' - } - ] - 'end' : '(\n)' - 'endCaptures' : { - '1' : { - 'name' : 'markup.heading.title.catala_fr' - } - } - } - { - 'begin' : '(^\\s*[\\#]+\\s*\\[[^\\]]\\s*\\])' - 'beginCaptures' : { - '1' : { - 'name' : 'markup.heading.subtitle.catala_fr' - } - } - 'patterns' : [ - { - 'include' : '#main__2' - } - ] - 'end' : '(\n)' - 'endCaptures' : { - '1' : { - 'name' : 'markup.heading.subtitle.catala_fr' - } - } - } - { - 'match' : '([^\\`])' - 'name' : 'entity.law.catala_fr' - } - { - 'begin' : '(```catala-metadata)' - 'beginCaptures' : { - '1' : { - 'name' : 'comment.block.documentation.catala_en' - } - } - 'patterns' : [ - { - 'include' : '#code' - } - ] - 'end' : '(```)' - 'endCaptures' : { - '1' : { - 'name' : 'comment.block.documentation.catala_en' - } - } - } - { - 'begin' : '(```catala)' - 'beginCaptures' : { - '1' : { - 'name' : 'comment.block.documentation.catala_fr' - } - } - 'patterns' : [ - { - 'include' : '#code' - } - ] - 'end' : '(```)' - 'endCaptures' : { - '1' : { - 'name' : 'comment.block.documentation.catala_fr' - } - } - } - ] - } - 'code' : { - 'patterns' : [ - { - 'match' : '(\\s*\\#.*$)' - 'name' : 'comment.line.catala_fr' - } - { - 'match' : '(contexte|entr\\x{00e9}e|r\\x{00e9}sultat|interne)(\\s*)(|r\\x{00e9}sultat)(\\s+)([a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00f4}\\x{00ea}\\x{0153}\\x{00e7}][a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00f4}\\x{00ea}\\x{0153}\\x{00e7}A-Z\\x{00c9}\\x{00c8}\\x{00c0}\\x{00c2}\\x{00d9}\\x{00ce}\\x{00d4}\\x{00ca}\\x{0152}\\x{00c7}0-9_\\\']*)' - 'captures' : { - '1' : { - 'name' : 'keyword.other.catala_fr' - } - '2' : { - 'name' : 'text.catala_fr' - } - '3' : { - 'name' : 'keyword.other.catala_fr' - } - '4' : { - 'name' : 'text.catala_fr' - } - '5' : { - 'name' : 'entity.name.function.catala_fr' - } - } - } - { - 'match' : '\\b(selon|sous\\s+forme|mais\\s+en\\s+rempla\\x{00e7}ant|fixé|par|décroissant|croissant|varie|avec|on\\s+a|soit|dans|tel\\s+que|existe|pour|tout|de|si|alors|sinon|initial)\\b' - 'name' : 'keyword.control.catala_fr' - } - { - 'match' : '\\b(champ\\s+d\'application|si\\s+et\\s+seulement\\s+si|dépend\\s+de|déclaration|inclus|liste\\s+de|contenu|optionnel|structure|énumération|contexte|entrée|r\\x{00e9}sultat|interne|règle|sous\\s+condition|condition|donnée|conséquence|rempli|égal\\s+à|assertion|définition|état|étiquette|exception|n\'importe\\s+quel)\\b' - 'name' : 'keyword.other.catala_fr' - } - { - 'match' : '(\\|[0-9]+\\-[0-9]+\\-[0-9]+\\|)' - 'name' : 'constant.numeric.catala_fr' - } - { - 'match' : '\\b(vrai|faux)\\b' - 'name' : 'constant.catala_fr' - } - { - 'match' : '\\b([0-9]+(,[0-9]*|))\\b' - 'name' : 'constant.numeric.catala_fr' - } - { - 'match' : '(\\-\\-|\\;|\\.|\\,|\\:|\\(|\\)|\\[|\\]|\\{|\\})' - 'name' : 'punctuation.catala_fr' - } - { - 'match' : '(\\-\\>|\\+\\.|\\+\\@|\\+\\^|\\+\\x{20ac}|\\+|\\-\\.|\\-\\@|\\-\\^|\\-\\x{20ac}|\\-|\\*\\.|\\*\\@|\\*\\^|\\*\\x{20ac}|\\*|/\\.|/\\@|/\\^|/\\x{20ac}|/|\\!|>\\.|>=\\.|<=\\.|<\\.|>\\@|>=\\@|<=\\@|<\\@|>\\x{20ac}|>=\\x{20ac}|<=\\x{20ac}|<\\x{20ac}|>\\^|>=\\^|<=\\^|<\\^|>|>=|<=|<|=|non|ou\\s+bien|ou|et|\\x{20ac}|%|an|mois|jour)' - 'name' : 'keyword.operator.catala_fr' - } - { - 'match' : '\\b(entier|booléen|date|durée|argent|texte|décimal|décret|loi|nombre|somme)\\b' - 'name' : 'support.type.catala_fr' - } - { - 'match' : '\\b([A-Z\\x{00c9}\\x{00c8}\\x{00c0}\\x{00c2}\\x{00d9}\\x{00ce}\\x{00d4}\\x{00ca}\\x{0152}\\x{00c7}][a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00f4}\\x{00ea}\\x{0153}\\x{00e7}A-Z\\x{00c9}\\x{00c8}\\x{00c0}\\x{00c2}\\x{00d9}\\x{00ce}\\x{00d4}\\x{00ca}\\x{0152}\\x{00c7}0-9_\\\']*)(\\.)([a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00f4}\\x{00ea}\\x{0153}\\x{00e7}][a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00f4}\\x{00ea}\\x{0153}\\x{00e7}A-Z\\x{00c9}\\x{00c8}\\x{00c0}\\x{00c2}\\x{00d9}\\x{00ce}\\x{00d4}\\x{00ca}\\x{0152}\\x{00c7}0-9_\\\']*)\\b' - 'captures' : { - '1' : { - 'name' : 'entity.name.class.catala_fr' - } - '2' : { - 'name' : 'punctuation.catala_fr' - } - '3' : { - 'name' : 'entity.name.function.catala_fr' - } - } - } - { - 'match' : '\\b([a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00f4}\\x{00ea}\\x{0153}\\x{00e7}][a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00f4}\\x{00ea}\\x{0153}\\x{00e7}A-Z\\x{00c9}\\x{00c8}\\x{00c0}\\x{00c2}\\x{00d9}\\x{00ce}\\x{00d4}\\x{00ca}\\x{0152}\\x{00c7}0-9_\\\']*)(\\.)([a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00f4}\\x{00ea}\\x{0153}\\x{00e7}][a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00f4}\\x{00ea}\\x{0153}\\x{00e7}A-Z\\x{00c9}\\x{00c8}\\x{00c0}\\x{00c2}\\x{00d9}\\x{00ce}\\x{00d4}\\x{00ca}\\x{0152}\\x{00c7}0-9_\\\'\\.]*)\\b' - 'captures' : { - '1' : { - 'name' : 'entity.name.function.catala_fr' - } - '2' : { - 'name' : 'punctuation.catala_fr' - } - '3' : { - 'name' : 'meta.variable_id.catala_fr' - } - } - } - { - 'match' : '\\b([a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00f4}\\x{00ea}\\x{0153}\\x{00e7}][a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00f4}\\x{00ea}\\x{0153}\\x{00e7}A-Z\\x{00c9}\\x{00c8}\\x{00c0}\\x{00c2}\\x{00d9}\\x{00ce}\\x{00d4}\\x{00ca}\\x{0152}\\x{00c7}0-9_\\\']*)\\b' - 'name' : 'entity.name.function.catala_fr' - } - { - 'match' : '\\b([A-Z\\x{00c9}\\x{00c8}\\x{00c0}\\x{00c2}\\x{00d9}\\x{00ce}\\x{00d4}\\x{00ca}\\x{0152}\\x{00c7}][a-z\\x{00e9}\\x{00e8}\\x{00e0}\\x{00e2}\\x{00f9}\\x{00ee}\\x{00f4}\\x{00ea}\\x{0153}\\x{00e7}A-Z\\x{00c9}\\x{00c8}\\x{00c0}\\x{00c2}\\x{00d9}\\x{00ce}\\x{00d4}\\x{00ca}\\x{0152}\\x{00c7}0-9_\\\']*)\\b' - 'name' : 'entity.name.class.catala_fr' - } - ] - } - 'main__1' : { - 'patterns' : [ - { - 'match' : '(.)' - 'name' : 'markup.heading.title.catala_fr' - } - ] - } - 'main__2' : { - 'patterns' : [ - { - 'match' : '(.)' - 'name' : 'markup.heading.subtitle.catala_fr' - } - ] - } -} diff --git a/syntax_highlighting/fr/atom/package.json b/syntax_highlighting/fr/atom/package.json deleted file mode 100644 index 24e0fdea4..000000000 --- a/syntax_highlighting/fr/atom/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "language-catala-fr", - "version": "1.0.0", - "description": "French syntax highlighting for the Catala language", - "engines": { - "atom": "*" - }, - "repository": { - "type": "git", - "url": "https://github.com/CatalaLang/catala.git" - }, - "bugs": { - "url": "https://github.com/CatalaLang/catala/issues" - }, - "dependencies": {}, - "license": "Apache" -} diff --git a/syntax_highlighting/fr/catala_fr.iro b/syntax_highlighting/fr/catala_fr.iro deleted file mode 100644 index a1526cfbb..000000000 --- a/syntax_highlighting/fr/catala_fr.iro +++ /dev/null @@ -1,282 +0,0 @@ -# This file is part of the Catala compiler, a specification language for tax and social benefits -# computation rules. Copyright (C) 2020 Inria, contributor: Denis Merigoux -# -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software distributed under the License -# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express -# or implied. See the License for the specific language governing permissions and limitations under -# the License. - - -name = catala_fr -file_extensions [] = catala_fr; - -################################################################ -## Styles -################################################################ - -styles [] { - -.comment : style { - color = light_green - italic = true - textmate_scope = comment.line - pygments_scope = Comment.Single -} - -.sc_id : style { - textmate_scope = meta.variable_id - pygments_scope = String - color = violet_red -} - -.sc_id_def : style { - textmate_scope = entity.name.function - pygments_scope = Name.Variable - color = orange -} - - -.cc_id : style { - color = light_blue - textmate_scope = entity.name.class - pygments_scope = Name.Class -} - - -.law_title : style { - color = yellow - italic = false - textmate_scope = markup.heading.title - pygments_scope = Generic.Heading -} - -.law_subtitle : style { - color = gold - italic = true - textmate_scope = markup.heading.subtitle - pygments_scope = Generic.Heading -} - -.law : style { - color = light_yellow - italic = false - textmate_scope = entity.law - pygments_scope = String -} - -.code_delimiter : style { - color = grey - italic = false - textmate_scope = comment.block.documentation - pygments_scope = String -} - -.primitive : style { - color = purple - textmate_scope = support.type - pygments_scope = Keyword.Type -} - -.whitespace : style { - textmate_scope = text - pygments_scope = String -} - -.keyword_expression : style { - color = pink - textmate_scope = keyword.control - pygments_scope = Keyword.Reserved -} - -.keyword_rule : style { - color = cyan - textmate_scope = keyword.other - pygments_scope = Keyword.Declaration -} - -.punctuation : style { - color = red_2 - ace_scope = punctuation - textmate_scope = punctuation - pygments_scope = Operator -} - -.literal : style { - color = green - textmate_scope = constant - pygments_scope = Keyword.Constant -} - -.literal_numeric : style { - color = violet - textmate_scope = constant.numeric - pygments_scope = Number.Integer -} - - -.operator : style { - color = brown - textmate_scope = keyword.operator - pygments_scope = Operator -} - -} - -################################################# -## Parse contexts -################################################# - -__LOWER_CHARS \= a-zéèàâùîôêœç - -__UPPER_CHARS \= A-ZÉÈÀÂÙÎÔÊŒÇ - -__SC_ID \= [$${__LOWER_CHARS}][$${__LOWER_CHARS}$${__UPPER_CHARS}0-9_\']* - -__SC_ID_COMPOSED \= [$${__LOWER_CHARS}][$${__LOWER_CHARS}$${__UPPER_CHARS}0-9_\'\.]* - -__CC_ID \= [$${__UPPER_CHARS}][$${__LOWER_CHARS}$${__UPPER_CHARS}0-9_\']* - -contexts [] { - -############################################## -## Main Context - Entry point context -############################################## - -main : context { - - : pattern { - regex \= (^\s*[\#]+.*) - styles [] = .law_title; - } - - : pattern { - regex \= (^\s*[\#]+\s*\[[^\]]\s*].*) - styles [] = .law_subtitle; - } - - : pattern { - regex \= ([^`]) - styles [] = .law; - } - - : push { - regex \= (^```catala$) - styles [] = .code_delimiter; - context [] = code; - } - - : push { - regex \= (^```catala-metadata$) - styles [] = .code_delimiter; - context [] = code; - } - - : push { - regex \= (^```catala-test-inline$) - styles [] = .code_delimiter; - context [] = test; - } - -} - -test : context { - - : pop { - regex \= (^```$) - styles [] = .code_delimiter; - } - - : pattern { - regex \= (^[$] catala \S*) - styles [] = .literal ; - } -} - -code : context { - - : pop { - regex \= (^```$) - styles [] = .code_delimiter; - } - - : pattern { - regex \= (\s*\#.*$) - styles [] = .comment ; - } - - : pattern { - regex \= (contexte|entrée|résultat|interne)(\s*)(|résultat)(\s+)($${__SC_ID}) - styles [] = .keyword_rule, .whitespace, .keyword_rule, .whitespace, .sc_id_def; - } - - : pattern { - regex \= \b(selon|sous\s+forme|mais\s+en\s+remplaçant|fixé|par|décroissant|croissant|varie|avec|on\s+a|soit|dans|champ\s+d'application|dépend\s+de|déclaration|inclusion|contenu|règle|sous\s+condition|condition|donnée|conséquence|rempli|égal\s+à|assertion|définition|état|étiquette|exception)\b - styles [] = .keyword_expression ; - } - - : pattern { - regex \= \b(contient|nombre|somme|tel\s+que|existe|pour|tout|de|si|alors|sinon|est|liste\s+vide|parmi|maximum|minimum|arrondi)\b - styles [] = .keyword_rule ; - } - - : pattern { - regex \= (\|[0-9]+\-[0-9]+\-[0-9]+\|) - styles [] = .literal_numeric ; - } - - : pattern { - regex \= \b(vrai|faux)\b - styles [] = .literal ; - } - - - : pattern { - regex \= \b([0-9]+(,[0-9]*|))\b - styles [] = .literal_numeric ; - } - - - : pattern { - regex \= (\-\-|\;|\.|\,|\:|\(|\)|\[|\]|\{|\}) - styles [] = .punctuation; - } - - : pattern { - regex \= (\-\>|\+\.|\+\@|\+\^|\+\u20ac|\+|\-\.|\-\@|\-\^|\-\u20ac|\-|\*\.|\*\@|\*\^|\*\u20ac|\*|/\.|/\@|/\u20ac|/|\!|>\.|>=\.|<=\.|<\.|>\@|>=\@|<=\@|<\@|>\u20ac|>=\u20ac|<=\u20ac|<\u20ac|>\^|>=\^|<=\^|<\^|>|>=|<=|<|=|non|ou\s+bien|ou|et|\u20ac|%|an|mois|jour) - styles [] = .operator; - } - - : pattern { - regex \= \b(structure|énumération|liste\s+de|entier|booléen|date|durée|argent|texte|décimal|décret|loi|nombre|somme)\b - styles [] = .primitive; - } - - : pattern { - regex \= \b($${__CC_ID})(\.)($${__SC_ID})\b - styles [] = .cc_id, .punctuation, .sc_id_def ; - } - - : pattern { - regex \= \b($${__SC_ID})(\.)($${__SC_ID_COMPOSED})\b - styles [] = .sc_id_def, .punctuation, .sc_id ; - } - - : pattern { - regex \= \b($${__SC_ID})\b - styles [] = .sc_id_def ; - } - - : pattern { - regex \= \b($${__CC_ID})\b - styles [] = .cc_id ; - } - -} - -} diff --git a/syntax_highlighting/fr/setup_atom.sh b/syntax_highlighting/fr/setup_atom.sh deleted file mode 100755 index fae88ec51..000000000 --- a/syntax_highlighting/fr/setup_atom.sh +++ /dev/null @@ -1,12 +0,0 @@ -#! /usr/bin/env sh - -set -eu - -FILE=~/.atom/packages/catala_fr -SCRIPT=`realpath $0` -SCRIPTPATH=`dirname $SCRIPT` - -if [ ! -L "$FILE" ]; then - echo "Creating link" - ln -s -f $SCRIPTPATH/atom "$FILE" -fi diff --git a/syntax_highlighting/pl/atom/grammars/catala_pl.cson b/syntax_highlighting/pl/atom/grammars/catala_pl.cson deleted file mode 100644 index c16e65203..000000000 --- a/syntax_highlighting/pl/atom/grammars/catala_pl.cson +++ /dev/null @@ -1,163 +0,0 @@ -'fileTypes' : [ - 'catala_pl' -] -'name' : 'catala_pl' -'patterns' : [ - { - 'include' : '#main' - } -] -'scopeName' : 'source.catala_pl' -'uuid' : '' -'repository' : { - 'main' : { - 'patterns' : [ - { - 'match' : '(^\\s*[\\#]+.*)' - 'name' : 'markup.heading.title.catala_pl' - } - { - 'match' : '(^\\s*[\\#]+\\s*\\[[^\\]]\\s*].*)' - 'name' : 'markup.heading.subtitle.catala_pl' - } - { - 'match' : '([^\\x{0060}])' - 'name' : 'entity.law.catala_pl' - } - { - 'begin' : '(```catala-metadata)' - 'beginCaptures' : { - '1' : { - 'name' : 'comment.block.documentation.catala_pl' - } - } - 'patterns' : [ - { - 'include' : '#code' - } - ] - 'end' : '(```)' - 'endCaptures' : { - '1' : { - 'name' : 'comment.block.documentation.catala_pl' - } - } - } - { - 'begin' : '(```catala)' - 'beginCaptures' : { - '1' : { - 'name' : 'comment.block.documentation.catala_pl' - } - } - 'patterns' : [ - { - 'include' : '#code' - } - ] - 'end' : '(```)' - 'endCaptures' : { - '1' : { - 'name' : 'comment.block.documentation.catala_pl' - } - } - } - ] - } - 'code' : { - 'patterns' : [ - { - 'match' : '(\\s*\\#.*$)' - 'name' : 'comment.line.catala_pl' - } - { - 'match' : '(kontekst|wejście|wyjście|wewnętrzny)(\\s*)(|wyjście)(\\s+)([a-z\\x{0105}\\x{0107}\\x{0119}\\x{0142}\\x{0144}\\x{00f3}\\x{015b}\\x{017c}\\x{017a}][a-z\\x{0105}\\x{0107}\\x{0119}\\x{0142}\\x{0144}\\x{00f3}\\x{015b}\\x{017c}\\x{017a}A-Z\\x{0104}\\x{0106}\\x{0118}\\x{0141}\\x{0143}\\x{00d3}\\x{015a}\\x{017b}\\x{0179}0-9_\\\']*)' - 'captures' : { - '1' : { - 'name' : 'keyword.other.catala_pl' - } - '2' : { - 'name' : 'text.catala_pl' - } - '3' : { - 'name' : 'keyword.other.catala_pl' - } - '4' : { - 'name' : 'text.catala_pl' - } - '5' : { - 'name' : 'entity.name.function.catala_pl' - } - } - } - { - 'match' : '\\b(pasuje|ze\\s+wzorem|staloprzecinkowa|przez|malejacy|rosnacy|rozna|wraz z|mamy|w|takich ze|istnieje|dla|wszystkie|z|jezeli|wtedy|inaczej|poczatkowy)\\b' - 'name' : 'keyword.control.catala_pl' - } - { - 'match' : '\\b(zakres|zalezy\\s+od|deklaracja|kolekcja|typu|opcjonalny|struktura|enumeracja|kontekst|wejście|wyjście|wewnętrzny|zasada|pod\\s+warunkuem|czas|konsekwencja|spelnione|wynosi|asercja|definicja|stan|etykieta|wyjątek|cokolwiek)\\b' - 'name' : 'keyword.other.catala_pl' - } - { - 'match' : '(\\|[0-9]+\\-[0-9]+\\-[0-9]+\\|)' - 'name' : 'constant.numeric.catala_pl' - } - { - 'match' : '\\b(prawda|falsz)\\b' - 'name' : 'constant.catala_pl' - } - { - 'match' : '\\b([0-9]+(,[0-9]*|))\\b' - 'name' : 'constant.numeric.catala_pl' - } - { - 'match' : '(\\-\\-|\\;|\\.|\\,|\\:|\\(|\\)|\\[|\\]|\\{|\\})' - 'name' : 'punctuation.catala_pl' - } - { - 'match' : '(\\-\\>|\\+\\.|\\+\\@|\\+\\^|\\+\\$|\\+|\\-\\.|\\-\\@|\\-\\^|\\-\\$|\\-|\\*\\.|\\*\\@|\\*\\^|\\*\\$|\\*|/\\.|/\\@|/\\^|/\\$|/|\\!|>\\.|>=\\.|<=\\.|<\\.|>\\@|>=\\@|<=\\@|<\\@|>\\$|>=\\$|<=\\$|<\\$|>\\^|>=\\^|<=\\^|<\\^|>|>=|<=|<|=|nie|lub|xor|i|\\$|%|rok|miesiac|dzien)' - 'name' : 'keyword.operator.catala_pl' - } - { - 'match' : '\\b(calkowita|zerojedynkowy|czas|czas trwania|pieniądze|warunek|tekst|dziesiętny|suma)\\b' - 'name' : 'support.type.catala_pl' - } - { - 'match' : '\\b([A-Z\\x{0104}\\x{0106}\\x{0118}\\x{0141}\\x{0143}\\x{00d3}\\x{015a}\\x{017b}\\x{0179}][a-z\\x{0105}\\x{0107}\\x{0119}\\x{0142}\\x{0144}\\x{00f3}\\x{015b}\\x{017c}\\x{017a}A-Z\\x{0104}\\x{0106}\\x{0118}\\x{0141}\\x{0143}\\x{00d3}\\x{015a}\\x{017b}\\x{0179}0-9_\\\']*)(\\.)([a-z\\x{0105}\\x{0107}\\x{0119}\\x{0142}\\x{0144}\\x{00f3}\\x{015b}\\x{017c}\\x{017a}][a-z\\x{0105}\\x{0107}\\x{0119}\\x{0142}\\x{0144}\\x{00f3}\\x{015b}\\x{017c}\\x{017a}A-Z\\x{0104}\\x{0106}\\x{0118}\\x{0141}\\x{0143}\\x{00d3}\\x{015a}\\x{017b}\\x{0179}0-9_\\\']*)\\b' - 'captures' : { - '1' : { - 'name' : 'entity.name.class.catala_pl' - } - '2' : { - 'name' : 'punctuation.catala_pl' - } - '3' : { - 'name' : 'entity.name.function.catala_pl' - } - } - } - { - 'match' : '\\b([a-z\\x{0105}\\x{0107}\\x{0119}\\x{0142}\\x{0144}\\x{00f3}\\x{015b}\\x{017c}\\x{017a}][a-z\\x{0105}\\x{0107}\\x{0119}\\x{0142}\\x{0144}\\x{00f3}\\x{015b}\\x{017c}\\x{017a}A-Z\\x{0104}\\x{0106}\\x{0118}\\x{0141}\\x{0143}\\x{00d3}\\x{015a}\\x{017b}\\x{0179}0-9_\\\']*)(\\.)([a-z\\x{0105}\\x{0107}\\x{0119}\\x{0142}\\x{0144}\\x{00f3}\\x{015b}\\x{017c}\\x{017a}][a-z\\x{0105}\\x{0107}\\x{0119}\\x{0142}\\x{0144}\\x{00f3}\\x{015b}\\x{017c}\\x{017a}A-Z\\x{0104}\\x{0106}\\x{0118}\\x{0141}\\x{0143}\\x{00d3}\\x{015a}\\x{017b}\\x{0179}0-9_\\\'\\.]*)\\b' - 'captures' : { - '1' : { - 'name' : 'entity.name.function.catala_pl' - } - '2' : { - 'name' : 'punctuation.catala_pl' - } - '3' : { - 'name' : 'meta.variable_id.catala_pl' - } - } - } - { - 'match' : '\\b([a-z\\x{0105}\\x{0107}\\x{0119}\\x{0142}\\x{0144}\\x{00f3}\\x{015b}\\x{017c}\\x{017a}][a-z\\x{0105}\\x{0107}\\x{0119}\\x{0142}\\x{0144}\\x{00f3}\\x{015b}\\x{017c}\\x{017a}A-Z\\x{0104}\\x{0106}\\x{0118}\\x{0141}\\x{0143}\\x{00d3}\\x{015a}\\x{017b}\\x{0179}0-9_\\\']*)\\b' - 'name' : 'entity.name.function.catala_pl' - } - { - 'match' : '\\b([A-Z\\x{0104}\\x{0106}\\x{0118}\\x{0141}\\x{0143}\\x{00d3}\\x{015a}\\x{017b}\\x{0179}][a-z\\x{0105}\\x{0107}\\x{0119}\\x{0142}\\x{0144}\\x{00f3}\\x{015b}\\x{017c}\\x{017a}A-Z\\x{0104}\\x{0106}\\x{0118}\\x{0141}\\x{0143}\\x{00d3}\\x{015a}\\x{017b}\\x{0179}0-9_\\\']*)\\b' - 'name' : 'entity.name.class.catala_pl' - } - ] - } -} diff --git a/syntax_highlighting/pl/atom/package.json b/syntax_highlighting/pl/atom/package.json deleted file mode 100644 index b8594f053..000000000 --- a/syntax_highlighting/pl/atom/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "language-catala-pl", - "version": "1.0.0", - "description": "Polish syntax highlighting for the Catala language", - "engines": { - "atom": "*" - }, - "repository": { - "type": "git", - "url": "https://github.com/CatalaLang/catala.git" - }, - "bugs": { - "url": "https://github.com/CatalaLang/catala/issues" - }, - "dependencies": {}, - "license": "Apache" - } diff --git a/syntax_highlighting/pl/catala_pl.iro b/syntax_highlighting/pl/catala_pl.iro deleted file mode 100644 index 5ed2dab8c..000000000 --- a/syntax_highlighting/pl/catala_pl.iro +++ /dev/null @@ -1,264 +0,0 @@ -# This file is part of the Catala compiler, a specification language for tax and social benefits -# computation rules. Copyright (C) 2020 Inria, contributor: Denis Merigoux -# -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software distributed under the License -# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express -# or implied. See the License for the specific language governing permissions and limitations under -# the License. - - -name = catala_pl -file_extensions [] = catala_pl; - -################################################################ -## Styles -################################################################ - -styles [] { - -.comment : style { - color = light_green - italic = true - textmate_scope = comment.line - pygments_scope = Comment.Single -} - -.sc_id : style { - textmate_scope = meta.variable_id - pygments_scope = String - color = violet_red -} - -.sc_id_def : style { - textmate_scope = entity.name.function - pygments_scope = Name.Variable - color = orange -} - - -.cc_id : style { - color = light_blue - textmate_scope = entity.name.class - pygments_scope = Name.Class -} - - -.law_title : style { - color = yellow - italic = false - textmate_scope = markup.heading.title - pygments_scope = Generic.Heading -} - -.law_subtitle : style { - color = gold - italic = true - textmate_scope = markup.heading.subtitle - pygments_scope = Generic.Heading -} - -.law : style { - color = light_yellow - italic = false - textmate_scope = entity.law - pygments_scope = String -} - -.code_delimiter : style { - color = grey - italic = false - textmate_scope = comment.block.documentation - pygments_scope = String -} - -.primitive : style { - color = purple - textmate_scope = support.type - pygments_scope = Keyword.Type -} - -.whitespace : style { - textmate_scope = text - pygments_scope = String -} - -.keyword_expression : style { - color = pink - textmate_scope = keyword.control - pygments_scope = Keyword.Reserved -} - -.keyword_rule : style { - color = cyan - textmate_scope = keyword.other - pygments_scope = Keyword.Declaration -} - -.punctuation : style { - color = red_2 - ace_scope = punctuation - textmate_scope = punctuation - pygments_scope = Operator -} - -.literal : style { - color = green - textmate_scope = constant - pygments_scope = Keyword.Constant -} - -.literal_numeric : style { - color = violet - textmate_scope = constant.numeric - pygments_scope = Number.Integer -} - - -.operator : style { - color = brown - textmate_scope = keyword.operator - pygments_scope = Operator -} - -} - -################################################# -## Parse contexts -################################################# - -__LOWER_CHARS \= a-ząćęłńóśżź - -__UPPER_CHARS \= A-ZĄĆĘŁŃÓŚŻŹ - -__SC_ID \= [$${__LOWER_CHARS}][$${__LOWER_CHARS}$${__UPPER_CHARS}0-9_\']* - -__SC_ID_COMPOSED \= [$${__LOWER_CHARS}][$${__LOWER_CHARS}$${__UPPER_CHARS}0-9_\'\.]* - -__CC_ID \= [$${__UPPER_CHARS}][$${__LOWER_CHARS}$${__UPPER_CHARS}0-9_\']* - -contexts [] { - -############################################## -## Main Context - Entry point context -############################################## - -main : context { - - : pattern { - regex \= (^\s*[\#]+.*) - styles [] = .law_title; - } - - : pattern { - regex \= (^\s*[\#]+\s*\[[^\]]\s*].*) - styles [] = .law_subtitle; - } - - : pattern { - regex \= ([^`]) - styles [] = .law; - } - - : push { - regex \= (```catala) - styles [] = .code_delimiter; - context [] = code; - } - - : push { - regex \= (```catala-metadata) - styles [] = .code_delimiter; - context [] = code; - } - -} - - -code : context { - - : pop { - regex \= (```) - styles [] = .code_delimiter; - } - - : pattern { - regex \= (\s*\#.*$) - styles [] = .comment ; - } - - : pattern { - regex \= (kontekst|wejście|wyjście|wewnętrzny)(\s*)(|wyjście)(\s+)($${__SC_ID}) - styles [] = .keyword_rule, .whitespace, .keyword_rule, .whitespace, .sc_id_def; - } - - : pattern { - regex \= \b(pasuje|ze\s+wzorem|staloprzecinkowa|przez|malejacy|rosnacy|rozna|wraz z|mamy|niech|in|takich ze|istnieje|dla|wszystkie|z|jezeli|wtedy|inaczej|poczatkowy)\b - styles [] = .keyword_expression ; - } - - : pattern { - regex \= \b(zakres|zalezy\s+od|deklaracja|kolekcja|typu|opcjonalny|struktura|enumeracja|kontekst|zasada|pod\s+warunkuem|czas|konsekwencja|spelnione|wynosi|asercja|definicja|stan|etykieta|wyjątek)\b - styles [] = .keyword_rule ; - } - - : pattern { - regex \= (\|[0-9]+\-[0-9]+\-[0-9]+\|) - styles [] = .literal_numeric ; - } - - : pattern { - regex \= \b(prawda|falsz)\b - styles [] = .literal ; - } - - - : pattern { - regex \= \b([0-9]+(,[0-9]*|))\b - styles [] = .literal_numeric ; - } - - - : pattern { - regex \= (\-\-|\;|\.|\,|\:|\(|\)|\[|\]|\{|\}) - styles [] = .punctuation; - } - - : pattern { - regex \= (\-\>|\+\.|\+\@|\+\^|\+\$|\+|\-\.|\-\@|\-\^|\-\$|\-|\*\.|\*\@|\*\^|\*\$|\*|/\.|/\@|/\$|/|\!|>\.|>=\.|<=\.|<\.|>\@|>=\@|<=\@|<\@|>\$|>=\$|<=\$|<\$|>\^|>=\^|<=\^|<\^|>|>=|<=|<|=|nie|lub|xor|i|\$|%|rok|miesiac|dzien) - styles [] = .operator; - } - - : pattern { - regex \= \b(calkowita|zerojedynkowy|czas|czas trwania|pieniądze|warunek|tekst|dziesiętny|suma)\b - styles [] = .primitive; - } - - : pattern { - regex \= \b($${__CC_ID})(\.)($${__SC_ID})\b - styles [] = .cc_id, .punctuation, .sc_id_def ; - } - - : pattern { - regex \= \b($${__SC_ID})(\.)($${__SC_ID_COMPOSED})\b - styles [] = .sc_id_def, .punctuation, .sc_id ; - } - - : pattern { - regex \= \b($${__SC_ID})\b - styles [] = .sc_id_def ; - } - - : pattern { - regex \= \b($${__CC_ID})\b - styles [] = .cc_id ; - } - -} - -} diff --git a/syntax_highlighting/pl/setup_atom.sh b/syntax_highlighting/pl/setup_atom.sh deleted file mode 100755 index 2d66b139e..000000000 --- a/syntax_highlighting/pl/setup_atom.sh +++ /dev/null @@ -1,12 +0,0 @@ -#! /usr/bin/env sh - -set -eu - -FILE=~/.atom/packages/catala_pl -SCRIPT=`realpath $0` -SCRIPTPATH=`dirname $SCRIPT` - -if [ ! -L "$FILE" ]; then - echo "Creating link" - ln -s -f $SCRIPTPATH/atom "$FILE" -fi