Skip to content

Commit

Permalink
Final release version
Browse files Browse the repository at this point in the history
  • Loading branch information
margual56 committed Nov 29, 2022
1 parent 658b635 commit a44398f
Show file tree
Hide file tree
Showing 8 changed files with 150 additions and 814 deletions.
9 changes: 4 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"]
}
]
}
}
31 changes: 23 additions & 8 deletions CHANGELOG.md
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
695 changes: 21 additions & 674 deletions LICENSE

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions README.md
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).
6 changes: 3 additions & 3 deletions language-configuration.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"comments": {
// symbol used for single line comment. Remove this entry if your language does not support line comments
// symbol used for single line comment.
"lineComment": "//"
},
// symbols used as brackets
Expand All @@ -13,9 +13,9 @@
["{", "}"],
["(", ")"]
],
// symbols that can be used to surround a selection
// symbols that that can be used to surround a selection
"surroundingPairs": [
["{", "}"],
["(", ")"]
]
}
}
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 24 additions & 29 deletions package.json
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"
}]
]
}
}
122 changes: 51 additions & 71 deletions syntaxes/turingmachine.tmLanguage.json
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"
}

0 comments on commit a44398f

Please sign in to comment.