Skip to content

Commit

Permalink
Add parser
Browse files Browse the repository at this point in the history
  • Loading branch information
reshke committed Aug 2, 2024
1 parent d0de610 commit 4533d31
Show file tree
Hide file tree
Showing 8 changed files with 1,492 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/core/parser/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
y.output
6 changes: 6 additions & 0 deletions pkg/core/parser/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
yaccgen:
goyacc -o gram.go -p yy gram.y
gen:
ragel -Z -G2 -o lex.go lex.rl

build: gen yaccgen
9 changes: 9 additions & 0 deletions pkg/core/parser/ast.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package parser

type Node interface {
iNode()
}

type SayHelloCommand struct {
Node
}
Loading

0 comments on commit 4533d31

Please sign in to comment.