[Oberon] Wanted: Oberon Syntax in TextMate, Sublime Text or Atom Grammar
Paul Reed
paulreed at paddedcell.com
Tue Aug 11 16:38:04 CEST 2020
On 2018-08-02 21:22, Colby Russell wrote:
> https://marketplace.visualstudio.com/items?itemName=colbyrussell.vscode-oberon-support
> ...uploaded it a while back after noticing that there weren't any
> others available
With many thanks to Colby and vladfolts, and other valiant illuminators
of the concepts involved, below is a JSON version of their Oberon-07
textmate/vs grammar, updated to fix a couple of things including nested
comments. In case it's useful. Works for me; YMMV.
Cheers,
Paul
{"scopeName": "source.oberon", "fileTypes": ["Mod"],
"patterns": [
{"match":
"\\b(FOR|REPEAT|IF|ELSIF|UNTIL|WHILE|DO|ELSE|THEN|CASE|BY|RETURN|TO|IMPORT|BEGIN|TYPE|CONST|MODULE|VAR|PROCEDURE|END)\\b",
"name": "keyword.delimiter.oberon"},
{"match": "\\b(IS|DIV|MOD|OR|IN)\\b",
"name": "keyword.operator.oberon"},
{"match": "\\b(POINTER|RECORD|ARRAY|MAP|OF)\\b",
"name": "storage.type.oberon"},
{"match": "\\b(FALSE|NIL|TRUE)\\b",
"name": "constant.language.oberon"},
{"match":
"\\b(ABS|ASR|CHR|FLT|INC|LSL|NEW|ROR|ASSERT|DEC|EXCL|FLOOR|INCL|LEN|ODD|ORD|PACK|UNPK)\\b",
"name": "support.function.oberon"},
{"match": "\\b(CHAR|REAL|BYTE|INTEGER|LONGINT|SET|BOOLEAN)\\b",
"name": "support.type.oberon"},
{"match":
"\\b(([0-9][0-9A-F]*[H])|([0-9]+[.][0-9]*([ED][+-]?[0-9]+)?)|([0-9]+))\\b",
"name": "constant.numeric.oberon"},
{"begin": "\"", "end": "\"",
"name": "string.quoted.double.oberon"},
{"match": "\\b([0-9][0-9A-F]*X)\\b",
"name": "string.quoted.other.oberon"},
{"include": "#comment"} ],
"repository": {"comment":
{"begin": "\\(\\*", "end": "\\*\\)",
"patterns": [{"include":"#comment"}],
"name": "comment.block.oberon",
"captures":
{"0":{"name":"punctuation.definition.comment.oberon"}}}},
"name": "Oberon", "uuid": "2AA78D88-FD4B-11E6-937E-CFB8A4F7030F"}
More information about the Oberon
mailing list