Skip to content

Exploration using tree rotations with a recursive descent parser

Notifications You must be signed in to change notification settings

rur/rotationparser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rotation Parser

Expression parsing exploration

Explore using tree rotations with a recursive descent parser to enforce operator precedence when building an AST.

Just curious to find out how far this approach will take me.

Repl command

Interactive expression parser to help while experimenting with the expression syntax.

$ go run ./cmd/parseXpr
...

eXpr: 1 + 2
=> "+"
    ├── "2"
    └── "1"

eXpr: -123 * 3.4 + 5 - 19 / 4.3
=> "-"
    ├── "/"
    │    ├── "4.3"
    │    └── "19"
    └── "+"
         ├── "5"
         └── "*"
              ├── "3.4"
              └── "-123"

eXpr: ...

About

Exploration using tree rotations with a recursive descent parser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages