-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
150 additions
and
814 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,32 @@ | ||
# Change Log | ||
# Changelog | ||
|
||
All notable changes to the "turing-machine" extension will be documented in this file. | ||
All notable changes to the "turing-machine" extension will be documented in this | ||
file. | ||
|
||
## [2.0.0] - 29/11/2022 | ||
|
||
- Forked syntax highlighter from | ||
[Stef Gijsberts](https://github.com/Stef-Gijsberts/pest-Syntax-Highlighting-for-vscode)' | ||
Pest syntax Highlighter | ||
- Made the appropriate changes to fit the turing machine syntax | ||
|
||
## [1.1.2] - 15/11/2021 | ||
* Updated definition of "state" (now states don't have to have a number in the name) | ||
|
||
- Updated definition of "state" (now states don't have to have a number in the | ||
name) | ||
|
||
## [1.1.1] - 15/11/2021 | ||
* Reduced the VScode version requirement, so that the extension works on any version above 1.40 | ||
|
||
- Reduced the VScode version requirement, so that the extension works on any | ||
version above 1.40 | ||
|
||
## [1.1.0] - 15/11/2021 | ||
* Improved (fixed) the formal definition of the language. That should mean that theming is more accurate | ||
* Improved syntax highlighting colors | ||
* Created light theme syntax highlighting | ||
|
||
- Improved (fixed) the formal definition of the language. That should mean | ||
that theming is more accurate | ||
- Improved syntax highlighting colors | ||
- Created light theme syntax highlighting | ||
|
||
## [1.0.0] - 13/11/2021 | ||
* Added everything needed to make the extension work | ||
|
||
- Added everything needed to make the extension work |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
[![CI](https://github.com/margual56/vscode-turing-machine/actions/workflows/publish.yml/badge.svg)](https://github.com/margual56/vscode-turing-machine/actions/workflows/publish.yml) | ||
[![CI](https://github.com/margual56/turing-vscode/actions/workflows/publish.yml/badge.svg)](https://github.com/margual56/vscode-turing-machine/actions/workflows/publish.yml) | ||
|
||
# Turing Machine language support for Visual Studio Code | ||
This extension enables syntax highlighting for .tm files | ||
# Turing Machine | ||
|
||
![A demo view of what it looks like](images/demo.png) | ||
A syntax highlighter for | ||
[Turing Machine syntax](https://github.com/margual56/turing-machine-2.0) grammar | ||
files. | ||
|
||
**Enjoy!** | ||
|
||
Check out the [Turing Machine Simulator](https://github.com/margual56/TuringMachine) | ||
![A demo view of what it looks like](images/demo.png) | ||
|
||
Check out the new | ||
[Turing Machine Simulator](https://github.com/margual56/turing-machine-2.0)! | ||
|
||
## Marketplace links | ||
* [Microsoft VScode marketplace](https://marketplace.visualstudio.com/items?itemName=MarcosGutirrezAlonso.turing-machine) | ||
* [Open-vsx marketplace](https://open-vsx.org/extension/MarcosGutirrezAlonso/turing-machine) | ||
|
||
- [Microsoft VScode marketplace](https://marketplace.visualstudio.com/items?itemName=MarcosGutirrezAlonso.turing-machine) | ||
- [Open-vsx marketplace](https://open-vsx.org/extension/MarcosGutirrezAlonso/turing-machine) | ||
|
||
## Features | ||
|
||
Syntax Highlighting and file icons. | ||
|
||
Note: This extension does **NOT** provide error highlighting support or hints. That feature is another whole ordeal I won't get into, sorry :) | ||
|
||
## Release Notes | ||
(See the [changelog](https://github.com/margual56/vscode-turing-machine/blob/ffe6e163b2331c86f5d2ffc609fd6811dbaabeb5/CHANGELOG.md) for a more detailed log). | ||
|
||
### [1.1.2] | ||
* Updated definition of "state" (now states don't have to have a number in the name) | ||
|
||
### [1.1.1] | ||
* Reduced the VScode version requirement, so that the extension works on any version above 1.40 | ||
Note: This extension does **NOT** provide error highlighting support or hints. | ||
That feature is another whole ordeal I won't get into, sorry :) | ||
|
||
### [1.1.0] | ||
## Thanks | ||
|
||
* Theming improvements | ||
This extension is a fork of | ||
[Stef Gijsberts](https://github.com/Stef-Gijsberts/pest-Syntax-Highlighting-for-vscode)' | ||
Pest syntax highlighter. Go check it out! | ||
|
||
### [1.0.0] | ||
## What's new? | ||
|
||
* Initial extension support | ||
All notable changes are listed in the | ||
[changelog](https://github.com/margual56/turing-vscode/blob/master/CHANGELOG.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,45 @@ | ||
{ | ||
"name": "turing-machine", | ||
"displayName": "turing-machine", | ||
"description": "Support for the Turing Machine language", | ||
"displayName": "Turing Machine", | ||
"description": "Syntax highlighting for Turing Machine's syntax", | ||
"version": "2.0.0", | ||
"icon": "images/icon.png", | ||
"version": "1.1.2", | ||
"publisher": "MarcosGutirrezAlonso", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/margual56/vscode-turing-machine" | ||
}, | ||
"engines": { | ||
"vscode": "^1.40.0" | ||
"vscode": "^1.21.0" | ||
}, | ||
"categories": [ | ||
"Programming Languages" | ||
], | ||
"contributes": { | ||
"iconThemes": [ | ||
"languages": [ | ||
{ | ||
"id": "turingmachineicon", | ||
"label": "TuringMachineIcon", | ||
"path": "./icon-theme.json" | ||
"id": "tmfile", | ||
"aliases": [ | ||
"tmfile", | ||
"turingfile" | ||
], | ||
"extensions": [ | ||
".tm" | ||
], | ||
"configuration": "./language-configuration.json", | ||
"icon": { | ||
"light": "./images/file-icon.png", | ||
"dark": "./images/file-icon.png" | ||
} | ||
} | ||
], | ||
"themes": [ | ||
"grammars": [ | ||
{ | ||
"label": "Visual Studio Dark", | ||
"uiTheme": "vs-dark", | ||
"path": "./themes/dark.json" | ||
}, | ||
{ | ||
"label": "Visual Studio Light", | ||
"uiTheme": "vs", | ||
"path": "./themes/light.json" | ||
"language": "tmfile", | ||
"scopeName": "source.turingfile", | ||
"path": "./syntaxes/tmfile.tmLanguage.json" | ||
} | ||
], | ||
"languages": [{ | ||
"id": "turingmachine", | ||
"aliases": ["Turing Machine", "turingmachine"], | ||
"extensions": [".tm"], | ||
"configuration": "./language-configuration.json" | ||
}], | ||
"grammars": [{ | ||
"language": "turingmachine", | ||
"scopeName": "source.tm", | ||
"path": "./syntaxes/turingmachine.tmLanguage.json" | ||
}] | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,52 @@ | ||
{ | ||
"name": "Turing Machine", | ||
"patterns": [ | ||
{ "include": "#tape"}, | ||
{ "include": "#finalStates"}, | ||
{ "include": "#instruction" }, | ||
{ "include": "#state"}, | ||
{ "include": "#value"}, | ||
{ "include": "#action"} | ||
], | ||
"repository": { | ||
"instruction": { | ||
"patterns": [ | ||
{ "include": "#statement" }, | ||
{ "include": "#comment" } | ||
] | ||
}, | ||
"statement": { | ||
"begin": "\\s*\\(", | ||
"end": "\\)", | ||
"beginCaptures": { | ||
"0": { "name": "keyword.statement.open" } | ||
}, | ||
"endCaptures": { | ||
"0": { "name": "keyword.statement.close" } | ||
}, | ||
"patterns": [ { "include": "#state"}, { "include": "#value"}, { "include": "#action"} ], | ||
"name": "keyword.statement" | ||
}, | ||
"tape": { | ||
"begin": "\\s*\\{", | ||
"end": "\\}", | ||
"beginCaptures": { | ||
"0": { "name": "keyword.tape.open" } | ||
}, | ||
"endCaptures": { | ||
"0": { "name": "keyword.tape.close" } | ||
}, | ||
"patterns": [ { "include": "#state"}, { "include": "#value"} ], | ||
"name": "keyword.tape" | ||
}, | ||
"finalStates": { | ||
"begin": "\\s*#define\\s*F\\s*=\\s*\\{", | ||
"end": "\\}", | ||
"beginCaptures": { | ||
"0": { "name": "keyword.finalStates.open" } | ||
}, | ||
"endCaptures": { | ||
"0": { "name": "keyword.finalStates.close" } | ||
}, | ||
"name": "keyword.finalStates", | ||
"patterns": [ { "include": "#state"} ] | ||
}, | ||
"value": { | ||
"match": "\\s*(0|1)\\s*", | ||
"name": "keyword.value" | ||
}, | ||
"comment": { | ||
"match": "//.*$", | ||
"name": "comment" | ||
}, | ||
"state": { | ||
"match": "\\s*([A-Za-z]+[0-9]?)\\s*", | ||
"name": "keyword.state" | ||
}, | ||
"action": { | ||
"match": "\\s*(H|L|R)\\s*", | ||
"name": "keyword.action" | ||
} | ||
}, | ||
"scopeName": "source.tm" | ||
} | ||
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", | ||
"name": "turingfile", | ||
"fileTypes": ["tm"], | ||
"patterns": [ | ||
{ | ||
"include": "#keywords" | ||
}, | ||
{ | ||
"include": "#strings" | ||
}, | ||
{ | ||
"include": "#comments" | ||
} | ||
], | ||
"repository": { | ||
"keywords": { | ||
"patterns": [ | ||
{ | ||
"name": "keyword.control.turingfile", | ||
"match": "I|F" | ||
}, | ||
{ | ||
"name": "constant.character.escape.turingfile", | ||
"match": "R|L|H" | ||
}, | ||
{ | ||
"name": "variable.language.implicit.turingfile", | ||
"match": "([a-zA-Z][^HLR])+[0-9]*" | ||
}, | ||
|
||
{ | ||
"name": "constant.numeric.turingfile", | ||
"match": "1|0" | ||
} | ||
] | ||
}, | ||
"comments": { | ||
"patterns": [ | ||
{ | ||
"name": "comment.line.turingfile", | ||
"match": "//.*" | ||
}, | ||
{ | ||
"name": "comment.block.documentation.turingfile", | ||
"match": "///.*" | ||
} | ||
] | ||
} | ||
}, | ||
"scopeName": "source.turingfile" | ||
} |