nom-lua

Crates.ionom-lua
lib.rsnom-lua
version0.0.2
sourcesrc
created_at2017-05-08 19:01:45.502878
updated_at2017-05-08 19:01:45.502878
descriptionLua 5.3 parser written in nom
homepagehttps://github.com/afonso360/nom-lua
repositoryhttps://github.com/afonso360/nom-lua
max_upload_size
id13748
size62,858
Afonso Bordado (afonso360)

documentation

https://docs.rs/nom-lua/0.0.2/nom-lua

README

nom-lua travis-badge appveyor-badge coveralls-badge license-badge docs-badge

Lua 5.3 parser written with nom

Syntax

  • chunk (needs tests)
  • block
  • stat
    • ";"
    • varlist = explist
    • functioncall (deps functioncall)
    • label
    • "break"
    • goto
    • do end
    • while
    • repeat until
    • if
    • for
    • for in
    • function (deps funcname)
    • local function
    • local
  • retstat (needs tests)
  • label
  • varlist (deps var)
  • var
  • namelist (needs tests)
  • explist (needs tests)
  • exp (needs tests)
    • Numeral
    • Nil
    • Bool
    • LiteralString
    • "..."
    • functiondef
    • prefixexp
    • tableconstructor
    • op
  • prefixexp (needs to be finished)
  • functioncall (deps args, prefixexp)
  • args (deps explist, tableconstructor, LiteralString)
  • funcname
  • functiondef
  • funcbody
  • parlist
  • tableconstructor (needs tests)
  • fieldlist (needs tests)
  • field
  • fieldsep
  • Binop (percedence error)
  • Unop
  • Name
  • Numeral
    • Digit
    • Hex Digit
    • Float
    • Hex Float
  • LitrealString
    • Short Literal

      • linebreaks
      • byte
      • unicode
      • escape
      • '\z'
    • Literal

TODO

  • Different integer and floating point values (i32, f32)

  • Better syntax errors

  • Fallback to floats on overflow

  • Benchmarks

  • Fuzzing

  • Change tests to fail instead of panicking

  • Enforce ASTNodes correctness on more operations For example, BinOp could take a BinOp enum instead of ASTNode

  • Build all features on CI

License

nom-lua is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.

Commit count: 86

cargo fmt