Ⅰ. 插件描述
A Vim syntax-definition for .mly files and the Menhir parser-generatorⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'elliottcable/vim-menhir'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'elliottcable/vim-menhir'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'elliottcable/vim-menhir'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/elliottcable/vim-menhir
Ⅳ. 文档说明
vim-menhir
This is my bad attempt at a Vim syntax-definition for .mly files — parser definitions for
[Menhir][] (or the built-in [ocamlyacc][]). It embeds whichever OCaml grammar you use for normal.ml files into the appropriate sections of your parser-generators, as well; complex OCaml headers
and footers should be supported.

As-yet unfinished work:
- I want to properly highlight the syntax of actual nonterminal definitions. I have yet to get that
far. - I need to support the new syntax
released in November 2018. It shouldn't be too hard, it shares a lot with the oldocamlyacc
one.
I'm pretty involved with other projects, this may languish. Feel free to reach out at
[@ELLIOTTCABLE][], Freenode, or elsewhere, if you have any questions / I miss an Issue!