Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/b72u68/tree-sitter-iitran
IITRAN grammar for tree-sitter
https://github.com/b72u68/tree-sitter-iitran
iitran lexer parser syntax-highlighting tree-sitter tree-sitter-parser
Last synced: 17 days ago
JSON representation
IITRAN grammar for tree-sitter
- Host: GitHub
- URL: https://github.com/b72u68/tree-sitter-iitran
- Owner: b72u68
- License: mit
- Created: 2022-09-04T02:40:50.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-09-12T02:51:58.000Z (over 2 years ago)
- Last Synced: 2024-11-26T02:20:31.684Z (2 months ago)
- Topics: iitran, lexer, parser, syntax-highlighting, tree-sitter, tree-sitter-parser
- Language: C
- Homepage:
- Size: 85 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# tree-sitter-iitran
(Mini)IITRAN grammar for [tree-sitter](https://tree-sitter.github.io/tree-sitter/).
References
- [IITRAN - Wikipedia](https://en.wikipedia.org/wiki/IITRAN)
- [IITRAN / 360: Self-Instructional Manual and Text]() by Charles R. Bauer
- Courtesy to professor Stefan Muller (visit his website [here](http://cs.iit.edu/~smuller/))
for coming up with the grammar for MiniIITRAN for [CS 443: Compiler Construction](http://cs.iit.edu/~smuller/cs443-f22/index.html)
course at Illinois Institute of Technology.## Installation
Follow this [isntruction](https://github.com/nvim-treesitter/nvim-treesitter#adding-parsers)
to add new parser and this [instruction](https://github.com/nvim-treesitter/nvim-treesitter#adding-queries)
to add queries to `nvim-treesitter`.To make Neovim detect `iitran` filetype and inject `queries` script, follow the
instruction in [Neovim's `vim.filetype.add()`]()
or choose one of the following methods and make edit to your `init.vim`- Add new filetype to Vim/Neovim
```vimscript
lua << EOF
vim.filetype.add({
extension = {
iit='iitran'
}
})
EOF
```so Vim/Neovim can detect `iitran` file type from the file extension `.iit`.
- Add autocommand to detect filetype in opening buffer
```vimscript
autocmd BufNewFile,BufRead *.iit set filetype=iitran
```to set filetype of the current buffer with `.iit` file extension to `iitran`.