123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- /*!-----------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Version: 0.31.1(337587859b1c171314b40503171188b6cea6a32a)
- * Released under the MIT license
- * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
- *-----------------------------------------------------------------------------*/
- // src/basic-languages/pla/pla.ts
- var conf = {
- comments: {
- lineComment: "#"
- },
- brackets: [
- ["[", "]"],
- ["<", ">"],
- ["(", ")"]
- ],
- autoClosingPairs: [
- { open: "[", close: "]" },
- { open: "<", close: ">" },
- { open: "(", close: ")" }
- ],
- surroundingPairs: [
- { open: "[", close: "]" },
- { open: "<", close: ">" },
- { open: "(", close: ")" }
- ]
- };
- var language = {
- defaultToken: "",
- tokenPostfix: ".pla",
- brackets: [
- { open: "[", close: "]", token: "delimiter.square" },
- { open: "<", close: ">", token: "delimiter.angle" },
- { open: "(", close: ")", token: "delimiter.parenthesis" }
- ],
- keywords: [
- ".i",
- ".o",
- ".mv",
- ".ilb",
- ".ob",
- ".label",
- ".type",
- ".phase",
- ".pair",
- ".symbolic",
- ".symbolic-output",
- ".kiss",
- ".p",
- ".e",
- ".end"
- ],
- comment: /#.*$/,
- identifier: /[a-zA-Z]+[a-zA-Z0-9_\-]*/,
- plaContent: /[01\-~\|]+/,
- tokenizer: {
- root: [
- { include: "@whitespace" },
- [/@comment/, "comment"],
- [
- /\.([a-zA-Z_\-]+)/,
- {
- cases: {
- "@eos": { token: "keyword.$1" },
- "@keywords": {
- cases: {
- ".type": { token: "keyword.$1", next: "@type" },
- "@default": { token: "keyword.$1", next: "@keywordArg" }
- }
- },
- "@default": { token: "keyword.$1" }
- }
- }
- ],
- [/@identifier/, "identifier"],
- [/@plaContent/, "string"]
- ],
- whitespace: [[/[ \t\r\n]+/, ""]],
- type: [{ include: "@whitespace" }, [/\w+/, { token: "type", next: "@pop" }]],
- keywordArg: [
- [
- /[ \t\r\n]+/,
- {
- cases: {
- "@eos": { token: "", next: "@pop" },
- "@default": ""
- }
- }
- ],
- [/@comment/, "comment", "@pop"],
- [
- /[<>()\[\]]/,
- {
- cases: {
- "@eos": { token: "@brackets", next: "@pop" },
- "@default": "@brackets"
- }
- }
- ],
- [
- /\-?\d+/,
- {
- cases: {
- "@eos": { token: "number", next: "@pop" },
- "@default": "number"
- }
- }
- ],
- [
- /@identifier/,
- {
- cases: {
- "@eos": { token: "identifier", next: "@pop" },
- "@default": "identifier"
- }
- }
- ],
- [
- /[;=]/,
- {
- cases: {
- "@eos": { token: "delimiter", next: "@pop" },
- "@default": "delimiter"
- }
- }
- ]
- ]
- }
- };
- export {
- conf,
- language
- };
|