Code Monkey home page Code Monkey logo

bychan's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bychan's Issues

Is there a good way of throwing Runtime errors while running Repl?

This library is absolutely a wonderful treasure I've found. Thank you.


The solution might already exist, if that's the case, then I couldn't find it. Perhaps writing a documentation would attract more people using it?

Anyway, Is there a way to elegantly abort evaluation with a runtime error message similar to parser.abort()? For example, divide-by-zero error or arithmetic errors. I just don't want to see a log from Java. Or do I have to extend Repl? In any case, I think it would be a good thing to have a switch on whether or not to dump the whole error log while running Repl.

Is there a way to check if next token is END?

I just checked out the minilang example and read through the code. When I saw the StatementNode, I was struggling to find a way to add an ending semicolon for conventional purpose. In your example, the ; is used to separate statements, but there isn't a way to end a script with the last statement ending with a ; because the parser isn't able to parse the end and would result in:

'Premature end reached' @  position ..., current lexeme is END ...

Is there a way to check whether the next token is the END or is what I'm thinking incorrect and looking ahead isn't the right thing to do and that there are other ways?

Empty input

What happens if you input the empty string to parse?

Nonclementure

previous -> left?
bindingpower should be consistently named
infix, suffix -> nud, led?
same infix and suffix iface?

Repl

Make an automatic repl with Language.repl().run()

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.