Giter Site home page Giter Site logo

vul's People

Contributors

valyrie avatar

Stargazers

 avatar

Watchers

 avatar

vul's Issues

Track source file in token

Tokens do not currently track which file they originate, in. This makes recovering the text which produced a token impossible.

Prefixed numbers starting with a _ should be invalid

Currently, the lexer accepts prefixed numbers that start with a _, such as 0h_A and 0y_. This behavior is erroneous, particularly in the second case, where it is possible to construct an integer literal without any digits.

Suffixed integer literals

Additional flexibility when specifying integer literals via suffixing of the form C053h would be a nice quality of life addition to the lexer.

Inconsistent code formatting

Currently, code formatting is not enforced in any consistent way -- it would be preferable to have some sort of autoformatter on commits, or at least a formatting discipline documented somewhere.

Signed numeric literals

It is impossible to generate a signed numeric literal in the lexer. This should be remedied by permitted a prefix of - or + to a numeric literal during lexing.

_ as a wildcard identifier

The usage of _ as a wildcard identifier is desirable for destructing and pattern matching where the specific value of a field is irrelevant. This would make future implementation of a match ... with ... construct much nicer.

Byte and raw string literals

Support for special strings, such as python's raw string syntax, would be desirable.

At the moment, I've only figured out the following special strings:
raw strings of the form r"text", which do not parse escape sequences
non-terminated strings of the form b"text", which do not have a terminating \0 appended

Symbolic constants

Symbolic constants of the form :symbol and :"symbol" would be quite nice to have when writing code for which the precise value of a constant doesn't matter, only that it is unique.

Implementing the parser

The parser, and anything downstream of it, have yet to be implemented; but once the lexer is complete enough, the parser should be the next target.

Output.t should handle missing directories

When created from a path, Output.t tries to open that path. If the path doesn't exist, it fail with a cryptic message about being unable to open the output file.

In this case, it would be good if the error raised an exception that explained the particular issue to the user, and perhaps gave them a hint as to how to fix it?

Cmdline interface needs hints

Currently, the cmdline interface prints quite cryptic errors when the user makes a mistake invoking the tool.
Ideally, vul.ml could print some sort of help text for these sorts of cases, guiding the user towards the correct usage (even if that's just telling them to run vul -h)

Implementation of basic sexp parser

Before more advanced work on the parser can happen, support for s-expressions needs to be finished.
More advanced syntax will be built on top of this.

Fix cons construction

Cons isn't being constructed in a way that enables differentiation between (x y) and (x (y))

Unit type

The lexer needs to be able to generate the unit type ()

Quoted special identifier support

It is impossible to encode identifiers which contain special characters, such as (. Implementation of a lexical construct in the form of i"identifier" would remedy this.

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.