Code Monkey home page Code Monkey logo

tib's People

Contributors

jaydenmilne avatar

Stargazers

 avatar

Watchers

 avatar  avatar

tib's Issues

Use less recursion in the parser

Right now a new layer of recursion is added for each line that is parsed. This is wasteful, this functionality could be accomplished with a loop. This will mean paring down the grammar a bit.

Implement Disp

Disp should be rudimentially implemented, instead of always outputting the result of executing a line.

VariableManager should return garbage data of the correct type

When a program requests a variable that has not been set, VariableManager::get initializes a Value without providing a value (Value defaults to an uninitialized double) and returns it to make initialization errors obvious. However, get should at least check the type of the variable and return garbage data of the correct type, so Str1 at least returns a garbage string and not a double.

`Value` class is janky and terrible

The Value class is terrible. If we used some inheritance scheme, we might have to do runtime type checking, but we would be able to be much more dynamic

String parsing does not respect precedence levels

When parsing a string tib will continue until it finds an apostrophe or the end of the line. TI-BASIC will parse a string until it finds a token with higher precedence,

In essence, tib will parse
"burrito->Str1 as the string "burrito->Str1" while TI-BASIC will interpret it as "burrito"β†’Str1 and will set Str1 to "burrito".

Since tib uses ->, a hyphen and a greater than symbol, to represent the STO character β†’ it would be difficult to recognize the combination -> as a string terminator, since then a string could not contain -> without escaping it somehow, which would be annoying.

Research needs to be done to see what other symbols have this different precedence. Maybe an alternate -> symbol could be used?

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.