(Mini)IITRAN grammar for tree-sitter.
References
-
IITRAN / 360: Self-Instructional Manual and Text by Charles R. Bauer
-
Courtesy to professor Stefan Muller (visit his website here) for coming up with the grammar for MiniIITRAN for CS 443: Compiler Construction course at Illinois Institute of Technology.
Follow this isntruction
to add new parser and this instruction
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
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
autocmd BufNewFile,BufRead *.iit set filetype=iitran
to set filetype of the current buffer with .iit
file extension to iitran
.