lua-parser

Lua 5.3 lexer and parser for transforming source code to AST and vice versa. Includes ongoing semantic analysis for type information.

JVM
macOS
Linux
Windows
JS
GitHub stars25
Dependents0
LicenseApache License 2.0
Creation dateover 3 years ago

Last activityabout 3 hours ago
Latest release1.0.3 (almost 2 years ago)

lua-parser

work in progress

A Lua 5.3 Lexer & Parser written in pure Kotlin.

Features

  • [X] Kotlin Multiplatform support (JVM / JS / Native)
  • [x] Parse source to AST
  • [x] Transform AST to source code
  • [ ] Semantic analysis. Provide type information (Work in progress)

Usage

  • Add the dependency to your gradle file
implementation("io.github.dingyi222666:luaparser:1.0.3")

Ok. Use it like this:

val lexer = LuaLexer("print('hello world')")
val parser = LuaParser()

val root = parser.parse(lexer)

println(AST2Lua().asCode(root))

More usage coming soon.

Special thanks

GavinHigham/lpil53

fstirlitz/luaparse

Rosemose/sora-editor

JVM
macOS
Linux
Windows
JS
GitHub stars25
Dependents0
LicenseApache License 2.0
Creation dateover 3 years ago

Last activityabout 3 hours ago
Latest release1.0.3 (almost 2 years ago)

lua-parser

work in progress

A Lua 5.3 Lexer & Parser written in pure Kotlin.

Features

  • [X] Kotlin Multiplatform support (JVM / JS / Native)
  • [x] Parse source to AST
  • [x] Transform AST to source code
  • [ ] Semantic analysis. Provide type information (Work in progress)

Usage

  • Add the dependency to your gradle file
implementation("io.github.dingyi222666:luaparser:1.0.3")

Ok. Use it like this:

val lexer = LuaLexer("print('hello world')")
val parser = LuaParser()

val root = parser.parse(lexer)

println(AST2Lua().asCode(root))

More usage coming soon.

Special thanks

GavinHigham/lpil53

fstirlitz/luaparse

Rosemose/sora-editor