Giter Site home page Giter Site logo

lark_syntax's People

Contributors

danmou avatar erezsh avatar evandrocoan avatar rickmark avatar robroseknows avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lark_syntax's Issues

TextMate 2 .tmbundle support?

Unless I'm mistaken, these files need to be bundled into a .tmbundle in order to be used in TextMate 2. Are there any plans to make this available?

Thanks.

Syntax break when line ends with repeat-exactly-n-times

Was goofing around a little and noticed that syntax highlighting breaks when a line ends with the exact repetition form. It seems to get back on track if I add any other literal, rule, the range form, etc.

screen shot 2018-10-16 at 5 43 25 pm

In case it ends up mattering, plugin version 1.2.1, ST3 build 3180, on macos 10.14.

Syntax break after escaped double quotes "\""

image

BACKTICK     : "`"
PERCENTAGE   : "%"
EXCLAMATION  : "!"
DOUBLE_QUOTE : "\""

?parens       : OPEN_PAREN | CLOSE_PAREN | OPEN_BRACKET | CLOSE_BRACKET
OPEN_BRACKET  : "["
CLOSE_BRACKET : "]"
OPEN_BRACE    : "{"
CLOSE_BRACE   : "}"
OPEN_PAREN    : "("
CLOSE_PAREN   : ")"

Syntax breaks after regular expression: /\/\*([\s\S]*?)\*\//

image

// General non terminal constructs
free_input_string: /(\\{|\\}|[^\n{}])+/

SINGLE_LINE_COMMENT: /(\#|\/\/)[^\n]*/
// MULTI_LINE_COMMENT: /\/\*([\s\S]*?)\*\//

NEWLINE: (CR? LF)+
_NEWLINE: ( /\r?\n[\t ]*/ | SINGLE_LINE_COMMENT )+
INTEGER: "0".."9"

Commenting out the line fixes it:
image

interactive feedback on currently open grammar file ?

Would it be feasible to add a feature for the user to check his grammar in the editor ?

I am thinking something along the lines of https://omrelli.ug/nearley-playground/
that provides an interactive feedback to the user creating a grammar, via examples.
Or maybe being able to use the lark for syntax highlighting in other open files...

Of course, many kind of visualisations are possible (showing parse trees, etc.).
The point here is to get some bare minimum of interactive feedback directly in the editor, without having to code anything.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.