Hi,

Tony Mechelynck wrote:
> Vim syntax highlighting is pretty powerful (more than I care to delve 
> into throroughly), but if it is still not enough for you, I suppose you 
> could write your own function, set it by "setlocal 
> indentexpr=OcamlOmlet()" or similar in the appropriate indent/ocaml.vim 
> script -- and there you could use as complex processing as you cared to.

Thanks for your reply, but that's already what omlet and the standard ocaml
indentation do. In both cases, the function does a bit of parsing, relies a 
bit on the syntax attributes, and indents. But it does not store any parsing 
information in a global variable, so everything is to be done again the next 
time. Basically I'm asking whether there's a simple way to store these parsing 
attributes, without having to maintain them to much as the user edits the 
buffer.

Regarding the power of vim syntax highlighting, I don't know it in depth
but I'm quite sure that it doesn't match a proper LALR parser. Now another
question is whether I really need a full parser to indent ocaml code. I'm not 
sure either, but the part I needed and wrote by hand was insufficient and
already complex enough for me to want to generate it from the grammar.

Cheers,

David

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui