Skip to content

dmyates/ruby-lua-table-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Lua Table Parser

It parses Lua tables into Ruby hashes without actually executing any Lua.

Based on Lars Christensen's Lua object Treetop grammar.

Example

LuaTableParser.new.parse_table("{ a = "b" }") # => { 'a' => 'b' }

Known limitations

  • Can't parse '' or [[]] delimited strings.
  • Input must be wrapped in {}s (i.e. mytable = { ... } won't parse).

Todo

  • Unit tests
  • Work on above limitations

About

Convert Lua tables to Ruby hashes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages