Is there a Sublime Text Syntax for Flex and Bison?

后端 未结 5 2341
既然无缘
既然无缘 2021-02-19 13:52

I\'m looking for a syntax in Sublime Text that highlights my Flex and Bison files (or lex/yacc) in a way that makes them readable... Sublime Text automatically chooses Lisp for

5条回答
  •  执念已碎
    2021-02-19 14:25

    The one thalesmello posted works well for Flex. For Bison, I've found this one - it's pretty minimal but it's a start:

    https://github.com/Jackneill/sublime-text-packages/tree/master/Packages/Bison

    Please let me know if you find something better!

    edit: I take it back - the Flex one highlights start states & C/C++ code in pink and it looks quite terrible. For basic lex files it looks okay, but it needs work. :)

    edit again: as sonu kumar pointed out, the project has been removed from github. For an alternative you could try the built-in OCamlyacc highlighting (pretty decent), or another alternative: https://bitbucket.org/artyom_smirnov/sublime-text-bison-highlighter (needs some work)

    I'm using Sublime a lot more & do a fair bit of work in Flex/Bison, so I might get around to writing one... one day. :D

提交回复
热议问题