Skip to content

Commit

Permalink
wip(interpreter,parser)
Browse files Browse the repository at this point in the history
  • Loading branch information
Emil Valeev committed Aug 1, 2023
1 parent 67d0e8d commit f64d3ab
Show file tree
Hide file tree
Showing 19 changed files with 1,905 additions and 1,052 deletions.
8 changes: 8 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
"cwd": "${workspaceFolder}/internal/compiler/frontend",
"args": ["neva.g4"]
},
{
"name": "cmd/interpreter",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/interpreter",
"cwd": "${workspaceFolder}"
},
{
"name": "cmd/tmp",
"type": "go",
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: antlr
antlr:
@cd internal/compiler/frontend && \
@antlr4 -Dlanguage=Go -no-visitor -package parsing ./neva.g4 -o generated
@cd internal/parser && \
antlr4 -Dlanguage=Go -no-visitor -package parsing ./neva.g4 -o generated
26 changes: 17 additions & 9 deletions cmd/interpreter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ import (
)

var prog = `
use { io }
use {
std io
}
components {
main(sig any) (code any) {
net {
in.sig -> out.code
}
}
types {
MyInt int
MyFloat float
MyStr str
MyBool bool
}
interfaces {
Reader(path string) (i int, e err)
}
`

Expand All @@ -29,9 +34,12 @@ func main() {
runTime, _ := runtime.New(connector, runner)
transformer := interpreter.MustNewTransformer()
llrGen := llrgen.New()
p := parser.MustNew()
p := parser.New()

intr := interpreter.MustNew(p, llrGen, transformer, runTime)

intr.Interpret(context.Background(), []byte(prog))
_, err := intr.Interpret(context.Background(), []byte(prog))
if err != nil {
panic(err)
}
}
4 changes: 2 additions & 2 deletions internal/interpreter/interpreter.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ type Interpreter struct {
}

type Parser interface {
Parse(context.Context, []byte) (map[string]shared.HLPackage, error)
Parse(context.Context, []byte) (map[string]shared.HLFile, error)
}

type LowLvlGenerator interface {
Generate(context.Context, map[string]shared.HLPackage) (shared.LowLvlProgram, error)
Generate(context.Context, map[string]shared.HLFile) (shared.LowLvlProgram, error)
}

type Transformer interface {
Expand Down
12 changes: 6 additions & 6 deletions internal/llrgen/llrgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func New() Generator {

var ErrNoPkgs = errors.New("no packages")

func (g Generator) Generate(ctx context.Context, prog map[string]shared.HLPackage) (shared.LowLvlProgram, error) {
func (g Generator) Generate(ctx context.Context, prog map[string]shared.HLFile) (shared.LowLvlProgram, error) {
if len(prog) == 0 {
return shared.LowLvlProgram{}, ErrNoPkgs
}
Expand Down Expand Up @@ -78,7 +78,7 @@ var (
func (g Generator) processNode(
ctx context.Context,
nodeCtx nodeContext,
pkgs map[string]shared.HLPackage,
pkgs map[string]shared.HLFile,
result shared.LowLvlProgram,
) error {
entity, err := g.lookupEntity(pkgs, nodeCtx.entityRef)
Expand Down Expand Up @@ -187,7 +187,7 @@ type handleNetworkResult struct {
// handleNetwork inserts ir connections into the given result
// and returns information about how many slots of each port is actually used in network.
func (g Generator) handleNetwork(
pkgs map[string]shared.HLPackage,
pkgs map[string]shared.HLFile,
net []shared.Connection, // pass only net
nodeCtx nodeContext,
result shared.LowLvlProgram,
Expand Down Expand Up @@ -265,7 +265,7 @@ func (Generator) handleInPortsCreation(nodeCtx nodeContext, result shared.LowLvl
// It also creates and inserts void routines and connections for outports unused by parent.
// It returns slice of ir port addrs that could be used to create a func routine.
func (Generator) handleOutPortsCreation(
outports shared.Ports,
outports map[string]shared.Port,
nodeCtx nodeContext,
result shared.LowLvlProgram,
) []shared.LLPortAddr {
Expand All @@ -292,7 +292,7 @@ func (Generator) handleOutPortsCreation(
return runtimeFuncOutportAddrs
}

func (Generator) lookupEntity(pkgs map[string]shared.HLPackage, ref shared.EntityRef) (shared.Entity, error) {
func (Generator) lookupEntity(pkgs map[string]shared.HLFile, ref shared.EntityRef) (shared.Entity, error) {
pkg, ok := pkgs[ref.Pkg]
if !ok {
return shared.Entity{}, fmt.Errorf("%w: %v", ErrPkgNotFound, ref.Pkg)
Expand Down Expand Up @@ -320,7 +320,7 @@ type giverSpecEl struct {
// If not, then it acts just like a mapReceiverPortSide without any side-effects.
// Otherwise it first builds the message, then inserts it into result, then returns params for giver creation.
func (g Generator) handleSenderSide(
pkgs map[string]shared.HLPackage,
pkgs map[string]shared.HLFile,
nodeCtxPath string,
side shared.SenderConnectionSide,
result shared.LowLvlProgram,
Expand Down
15 changes: 7 additions & 8 deletions internal/parser/generated/neva.interp

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions internal/parser/generated/neva.tokens
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ WS=36
'}'=4
'@/'=5
'/'=6
'type'=7
'types'=7
'pub'=8
'<'=9
'>'=10
','=11
'['=12
']'=13
'|'=14
'io'=15
'interfaces'=15
'('=16
')'=17
'const'=18
Expand All @@ -57,8 +57,8 @@ WS=36
'false'=21
'nil'=22
':'=23
'comp'=24
'node'=25
'components'=24
'nodes'=25
'.'=26
'net'=27
'->'=28
Expand Down
10 changes: 5 additions & 5 deletions internal/parser/generated/nevaLexer.interp
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ null
'}'
'@/'
'/'
'type'
'types'
'pub'
'<'
'>'
','
'['
']'
'|'
'io'
'interfaces'
'('
')'
'const'
Expand All @@ -23,8 +23,8 @@ null
'false'
'nil'
':'
'comp'
'node'
'components'
'nodes'
'.'
'net'
'->'
Expand Down Expand Up @@ -123,4 +123,4 @@ mode names:
DEFAULT_MODE

atn:
[4, 0, 36, 218, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 5, 30, 174, 8, 30, 10, 30, 12, 30, 177, 9, 30, 1, 31, 1, 31, 1, 32, 4, 32, 182, 8, 32, 11, 32, 12, 32, 183, 1, 33, 5, 33, 187, 8, 33, 10, 33, 12, 33, 190, 9, 33, 1, 33, 1, 33, 4, 33, 194, 8, 33, 11, 33, 12, 33, 195, 1, 34, 1, 34, 5, 34, 200, 8, 34, 10, 34, 12, 34, 203, 9, 34, 1, 34, 1, 34, 1, 35, 3, 35, 208, 8, 35, 1, 35, 1, 35, 1, 36, 4, 36, 213, 8, 36, 11, 36, 12, 36, 214, 1, 36, 1, 36, 1, 201, 0, 37, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 0, 65, 32, 67, 33, 69, 34, 71, 35, 73, 36, 1, 0, 3, 3, 0, 65, 90, 95, 95, 97, 122, 1, 0, 48, 57, 2, 0, 9, 9, 32, 32, 224, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 1, 75, 1, 0, 0, 0, 3, 78, 1, 0, 0, 0, 5, 82, 1, 0, 0, 0, 7, 84, 1, 0, 0, 0, 9, 86, 1, 0, 0, 0, 11, 89, 1, 0, 0, 0, 13, 91, 1, 0, 0, 0, 15, 96, 1, 0, 0, 0, 17, 100, 1, 0, 0, 0, 19, 102, 1, 0, 0, 0, 21, 104, 1, 0, 0, 0, 23, 106, 1, 0, 0, 0, 25, 108, 1, 0, 0, 0, 27, 110, 1, 0, 0, 0, 29, 112, 1, 0, 0, 0, 31, 115, 1, 0, 0, 0, 33, 117, 1, 0, 0, 0, 35, 119, 1, 0, 0, 0, 37, 125, 1, 0, 0, 0, 39, 127, 1, 0, 0, 0, 41, 132, 1, 0, 0, 0, 43, 138, 1, 0, 0, 0, 45, 142, 1, 0, 0, 0, 47, 144, 1, 0, 0, 0, 49, 149, 1, 0, 0, 0, 51, 154, 1, 0, 0, 0, 53, 156, 1, 0, 0, 0, 55, 160, 1, 0, 0, 0, 57, 163, 1, 0, 0, 0, 59, 166, 1, 0, 0, 0, 61, 170, 1, 0, 0, 0, 63, 178, 1, 0, 0, 0, 65, 181, 1, 0, 0, 0, 67, 188, 1, 0, 0, 0, 69, 197, 1, 0, 0, 0, 71, 207, 1, 0, 0, 0, 73, 212, 1, 0, 0, 0, 75, 76, 5, 47, 0, 0, 76, 77, 5, 47, 0, 0, 77, 2, 1, 0, 0, 0, 78, 79, 5, 117, 0, 0, 79, 80, 5, 115, 0, 0, 80, 81, 5, 101, 0, 0, 81, 4, 1, 0, 0, 0, 82, 83, 5, 123, 0, 0, 83, 6, 1, 0, 0, 0, 84, 85, 5, 125, 0, 0, 85, 8, 1, 0, 0, 0, 86, 87, 5, 64, 0, 0, 87, 88, 5, 47, 0, 0, 88, 10, 1, 0, 0, 0, 89, 90, 5, 47, 0, 0, 90, 12, 1, 0, 0, 0, 91, 92, 5, 116, 0, 0, 92, 93, 5, 121, 0, 0, 93, 94, 5, 112, 0, 0, 94, 95, 5, 101, 0, 0, 95, 14, 1, 0, 0, 0, 96, 97, 5, 112, 0, 0, 97, 98, 5, 117, 0, 0, 98, 99, 5, 98, 0, 0, 99, 16, 1, 0, 0, 0, 100, 101, 5, 60, 0, 0, 101, 18, 1, 0, 0, 0, 102, 103, 5, 62, 0, 0, 103, 20, 1, 0, 0, 0, 104, 105, 5, 44, 0, 0, 105, 22, 1, 0, 0, 0, 106, 107, 5, 91, 0, 0, 107, 24, 1, 0, 0, 0, 108, 109, 5, 93, 0, 0, 109, 26, 1, 0, 0, 0, 110, 111, 5, 124, 0, 0, 111, 28, 1, 0, 0, 0, 112, 113, 5, 105, 0, 0, 113, 114, 5, 111, 0, 0, 114, 30, 1, 0, 0, 0, 115, 116, 5, 40, 0, 0, 116, 32, 1, 0, 0, 0, 117, 118, 5, 41, 0, 0, 118, 34, 1, 0, 0, 0, 119, 120, 5, 99, 0, 0, 120, 121, 5, 111, 0, 0, 121, 122, 5, 110, 0, 0, 122, 123, 5, 115, 0, 0, 123, 124, 5, 116, 0, 0, 124, 36, 1, 0, 0, 0, 125, 126, 5, 61, 0, 0, 126, 38, 1, 0, 0, 0, 127, 128, 5, 116, 0, 0, 128, 129, 5, 114, 0, 0, 129, 130, 5, 117, 0, 0, 130, 131, 5, 101, 0, 0, 131, 40, 1, 0, 0, 0, 132, 133, 5, 102, 0, 0, 133, 134, 5, 97, 0, 0, 134, 135, 5, 108, 0, 0, 135, 136, 5, 115, 0, 0, 136, 137, 5, 101, 0, 0, 137, 42, 1, 0, 0, 0, 138, 139, 5, 110, 0, 0, 139, 140, 5, 105, 0, 0, 140, 141, 5, 108, 0, 0, 141, 44, 1, 0, 0, 0, 142, 143, 5, 58, 0, 0, 143, 46, 1, 0, 0, 0, 144, 145, 5, 99, 0, 0, 145, 146, 5, 111, 0, 0, 146, 147, 5, 109, 0, 0, 147, 148, 5, 112, 0, 0, 148, 48, 1, 0, 0, 0, 149, 150, 5, 110, 0, 0, 150, 151, 5, 111, 0, 0, 151, 152, 5, 100, 0, 0, 152, 153, 5, 101, 0, 0, 153, 50, 1, 0, 0, 0, 154, 155, 5, 46, 0, 0, 155, 52, 1, 0, 0, 0, 156, 157, 5, 110, 0, 0, 157, 158, 5, 101, 0, 0, 158, 159, 5, 116, 0, 0, 159, 54, 1, 0, 0, 0, 160, 161, 5, 45, 0, 0, 161, 162, 5, 62, 0, 0, 162, 56, 1, 0, 0, 0, 163, 164, 5, 105, 0, 0, 164, 165, 5, 110, 0, 0, 165, 58, 1, 0, 0, 0, 166, 167, 5, 111, 0, 0, 167, 168, 5, 117, 0, 0, 168, 169, 5, 116, 0, 0, 169, 60, 1, 0, 0, 0, 170, 175, 3, 63, 31, 0, 171, 174, 3, 63, 31, 0, 172, 174, 3, 65, 32, 0, 173, 171, 1, 0, 0, 0, 173, 172, 1, 0, 0, 0, 174, 177, 1, 0, 0, 0, 175, 173, 1, 0, 0, 0, 175, 176, 1, 0, 0, 0, 176, 62, 1, 0, 0, 0, 177, 175, 1, 0, 0, 0, 178, 179, 7, 0, 0, 0, 179, 64, 1, 0, 0, 0, 180, 182, 7, 1, 0, 0, 181, 180, 1, 0, 0, 0, 182, 183, 1, 0, 0, 0, 183, 181, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 66, 1, 0, 0, 0, 185, 187, 7, 1, 0, 0, 186, 185, 1, 0, 0, 0, 187, 190, 1, 0, 0, 0, 188, 186, 1, 0, 0, 0, 188, 189, 1, 0, 0, 0, 189, 191, 1, 0, 0, 0, 190, 188, 1, 0, 0, 0, 191, 193, 5, 46, 0, 0, 192, 194, 7, 1, 0, 0, 193, 192, 1, 0, 0, 0, 194, 195, 1, 0, 0, 0, 195, 193, 1, 0, 0, 0, 195, 196, 1, 0, 0, 0, 196, 68, 1, 0, 0, 0, 197, 201, 5, 34, 0, 0, 198, 200, 9, 0, 0, 0, 199, 198, 1, 0, 0, 0, 200, 203, 1, 0, 0, 0, 201, 202, 1, 0, 0, 0, 201, 199, 1, 0, 0, 0, 202, 204, 1, 0, 0, 0, 203, 201, 1, 0, 0, 0, 204, 205, 5, 34, 0, 0, 205, 70, 1, 0, 0, 0, 206, 208, 5, 13, 0, 0, 207, 206, 1, 0, 0, 0, 207, 208, 1, 0, 0, 0, 208, 209, 1, 0, 0, 0, 209, 210, 5, 10, 0, 0, 210, 72, 1, 0, 0, 0, 211, 213, 7, 2, 0, 0, 212, 211, 1, 0, 0, 0, 213, 214, 1, 0, 0, 0, 214, 212, 1, 0, 0, 0, 214, 215, 1, 0, 0, 0, 215, 216, 1, 0, 0, 0, 216, 217, 6, 36, 0, 0, 217, 74, 1, 0, 0, 0, 9, 0, 173, 175, 183, 188, 195, 201, 207, 214, 1, 6, 0, 0]
[4, 0, 36, 234, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 5, 30, 190, 8, 30, 10, 30, 12, 30, 193, 9, 30, 1, 31, 1, 31, 1, 32, 4, 32, 198, 8, 32, 11, 32, 12, 32, 199, 1, 33, 5, 33, 203, 8, 33, 10, 33, 12, 33, 206, 9, 33, 1, 33, 1, 33, 4, 33, 210, 8, 33, 11, 33, 12, 33, 211, 1, 34, 1, 34, 5, 34, 216, 8, 34, 10, 34, 12, 34, 219, 9, 34, 1, 34, 1, 34, 1, 35, 3, 35, 224, 8, 35, 1, 35, 1, 35, 1, 36, 4, 36, 229, 8, 36, 11, 36, 12, 36, 230, 1, 36, 1, 36, 1, 217, 0, 37, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 0, 65, 32, 67, 33, 69, 34, 71, 35, 73, 36, 1, 0, 3, 3, 0, 65, 90, 95, 95, 97, 122, 1, 0, 48, 57, 2, 0, 9, 9, 32, 32, 240, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 1, 75, 1, 0, 0, 0, 3, 78, 1, 0, 0, 0, 5, 82, 1, 0, 0, 0, 7, 84, 1, 0, 0, 0, 9, 86, 1, 0, 0, 0, 11, 89, 1, 0, 0, 0, 13, 91, 1, 0, 0, 0, 15, 97, 1, 0, 0, 0, 17, 101, 1, 0, 0, 0, 19, 103, 1, 0, 0, 0, 21, 105, 1, 0, 0, 0, 23, 107, 1, 0, 0, 0, 25, 109, 1, 0, 0, 0, 27, 111, 1, 0, 0, 0, 29, 113, 1, 0, 0, 0, 31, 124, 1, 0, 0, 0, 33, 126, 1, 0, 0, 0, 35, 128, 1, 0, 0, 0, 37, 134, 1, 0, 0, 0, 39, 136, 1, 0, 0, 0, 41, 141, 1, 0, 0, 0, 43, 147, 1, 0, 0, 0, 45, 151, 1, 0, 0, 0, 47, 153, 1, 0, 0, 0, 49, 164, 1, 0, 0, 0, 51, 170, 1, 0, 0, 0, 53, 172, 1, 0, 0, 0, 55, 176, 1, 0, 0, 0, 57, 179, 1, 0, 0, 0, 59, 182, 1, 0, 0, 0, 61, 186, 1, 0, 0, 0, 63, 194, 1, 0, 0, 0, 65, 197, 1, 0, 0, 0, 67, 204, 1, 0, 0, 0, 69, 213, 1, 0, 0, 0, 71, 223, 1, 0, 0, 0, 73, 228, 1, 0, 0, 0, 75, 76, 5, 47, 0, 0, 76, 77, 5, 47, 0, 0, 77, 2, 1, 0, 0, 0, 78, 79, 5, 117, 0, 0, 79, 80, 5, 115, 0, 0, 80, 81, 5, 101, 0, 0, 81, 4, 1, 0, 0, 0, 82, 83, 5, 123, 0, 0, 83, 6, 1, 0, 0, 0, 84, 85, 5, 125, 0, 0, 85, 8, 1, 0, 0, 0, 86, 87, 5, 64, 0, 0, 87, 88, 5, 47, 0, 0, 88, 10, 1, 0, 0, 0, 89, 90, 5, 47, 0, 0, 90, 12, 1, 0, 0, 0, 91, 92, 5, 116, 0, 0, 92, 93, 5, 121, 0, 0, 93, 94, 5, 112, 0, 0, 94, 95, 5, 101, 0, 0, 95, 96, 5, 115, 0, 0, 96, 14, 1, 0, 0, 0, 97, 98, 5, 112, 0, 0, 98, 99, 5, 117, 0, 0, 99, 100, 5, 98, 0, 0, 100, 16, 1, 0, 0, 0, 101, 102, 5, 60, 0, 0, 102, 18, 1, 0, 0, 0, 103, 104, 5, 62, 0, 0, 104, 20, 1, 0, 0, 0, 105, 106, 5, 44, 0, 0, 106, 22, 1, 0, 0, 0, 107, 108, 5, 91, 0, 0, 108, 24, 1, 0, 0, 0, 109, 110, 5, 93, 0, 0, 110, 26, 1, 0, 0, 0, 111, 112, 5, 124, 0, 0, 112, 28, 1, 0, 0, 0, 113, 114, 5, 105, 0, 0, 114, 115, 5, 110, 0, 0, 115, 116, 5, 116, 0, 0, 116, 117, 5, 101, 0, 0, 117, 118, 5, 114, 0, 0, 118, 119, 5, 102, 0, 0, 119, 120, 5, 97, 0, 0, 120, 121, 5, 99, 0, 0, 121, 122, 5, 101, 0, 0, 122, 123, 5, 115, 0, 0, 123, 30, 1, 0, 0, 0, 124, 125, 5, 40, 0, 0, 125, 32, 1, 0, 0, 0, 126, 127, 5, 41, 0, 0, 127, 34, 1, 0, 0, 0, 128, 129, 5, 99, 0, 0, 129, 130, 5, 111, 0, 0, 130, 131, 5, 110, 0, 0, 131, 132, 5, 115, 0, 0, 132, 133, 5, 116, 0, 0, 133, 36, 1, 0, 0, 0, 134, 135, 5, 61, 0, 0, 135, 38, 1, 0, 0, 0, 136, 137, 5, 116, 0, 0, 137, 138, 5, 114, 0, 0, 138, 139, 5, 117, 0, 0, 139, 140, 5, 101, 0, 0, 140, 40, 1, 0, 0, 0, 141, 142, 5, 102, 0, 0, 142, 143, 5, 97, 0, 0, 143, 144, 5, 108, 0, 0, 144, 145, 5, 115, 0, 0, 145, 146, 5, 101, 0, 0, 146, 42, 1, 0, 0, 0, 147, 148, 5, 110, 0, 0, 148, 149, 5, 105, 0, 0, 149, 150, 5, 108, 0, 0, 150, 44, 1, 0, 0, 0, 151, 152, 5, 58, 0, 0, 152, 46, 1, 0, 0, 0, 153, 154, 5, 99, 0, 0, 154, 155, 5, 111, 0, 0, 155, 156, 5, 109, 0, 0, 156, 157, 5, 112, 0, 0, 157, 158, 5, 111, 0, 0, 158, 159, 5, 110, 0, 0, 159, 160, 5, 101, 0, 0, 160, 161, 5, 110, 0, 0, 161, 162, 5, 116, 0, 0, 162, 163, 5, 115, 0, 0, 163, 48, 1, 0, 0, 0, 164, 165, 5, 110, 0, 0, 165, 166, 5, 111, 0, 0, 166, 167, 5, 100, 0, 0, 167, 168, 5, 101, 0, 0, 168, 169, 5, 115, 0, 0, 169, 50, 1, 0, 0, 0, 170, 171, 5, 46, 0, 0, 171, 52, 1, 0, 0, 0, 172, 173, 5, 110, 0, 0, 173, 174, 5, 101, 0, 0, 174, 175, 5, 116, 0, 0, 175, 54, 1, 0, 0, 0, 176, 177, 5, 45, 0, 0, 177, 178, 5, 62, 0, 0, 178, 56, 1, 0, 0, 0, 179, 180, 5, 105, 0, 0, 180, 181, 5, 110, 0, 0, 181, 58, 1, 0, 0, 0, 182, 183, 5, 111, 0, 0, 183, 184, 5, 117, 0, 0, 184, 185, 5, 116, 0, 0, 185, 60, 1, 0, 0, 0, 186, 191, 3, 63, 31, 0, 187, 190, 3, 63, 31, 0, 188, 190, 3, 65, 32, 0, 189, 187, 1, 0, 0, 0, 189, 188, 1, 0, 0, 0, 190, 193, 1, 0, 0, 0, 191, 189, 1, 0, 0, 0, 191, 192, 1, 0, 0, 0, 192, 62, 1, 0, 0, 0, 193, 191, 1, 0, 0, 0, 194, 195, 7, 0, 0, 0, 195, 64, 1, 0, 0, 0, 196, 198, 7, 1, 0, 0, 197, 196, 1, 0, 0, 0, 198, 199, 1, 0, 0, 0, 199, 197, 1, 0, 0, 0, 199, 200, 1, 0, 0, 0, 200, 66, 1, 0, 0, 0, 201, 203, 7, 1, 0, 0, 202, 201, 1, 0, 0, 0, 203, 206, 1, 0, 0, 0, 204, 202, 1, 0, 0, 0, 204, 205, 1, 0, 0, 0, 205, 207, 1, 0, 0, 0, 206, 204, 1, 0, 0, 0, 207, 209, 5, 46, 0, 0, 208, 210, 7, 1, 0, 0, 209, 208, 1, 0, 0, 0, 210, 211, 1, 0, 0, 0, 211, 209, 1, 0, 0, 0, 211, 212, 1, 0, 0, 0, 212, 68, 1, 0, 0, 0, 213, 217, 5, 34, 0, 0, 214, 216, 9, 0, 0, 0, 215, 214, 1, 0, 0, 0, 216, 219, 1, 0, 0, 0, 217, 218, 1, 0, 0, 0, 217, 215, 1, 0, 0, 0, 218, 220, 1, 0, 0, 0, 219, 217, 1, 0, 0, 0, 220, 221, 5, 34, 0, 0, 221, 70, 1, 0, 0, 0, 222, 224, 5, 13, 0, 0, 223, 222, 1, 0, 0, 0, 223, 224, 1, 0, 0, 0, 224, 225, 1, 0, 0, 0, 225, 226, 5, 10, 0, 0, 226, 72, 1, 0, 0, 0, 227, 229, 7, 2, 0, 0, 228, 227, 1, 0, 0, 0, 229, 230, 1, 0, 0, 0, 230, 228, 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 232, 1, 0, 0, 0, 232, 233, 6, 36, 0, 0, 233, 74, 1, 0, 0, 0, 9, 0, 189, 191, 199, 204, 211, 217, 223, 230, 1, 6, 0, 0]
8 changes: 4 additions & 4 deletions internal/parser/generated/nevaLexer.tokens
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ WS=36
'}'=4
'@/'=5
'/'=6
'type'=7
'types'=7
'pub'=8
'<'=9
'>'=10
','=11
'['=12
']'=13
'|'=14
'io'=15
'interfaces'=15
'('=16
')'=17
'const'=18
Expand All @@ -57,8 +57,8 @@ WS=36
'false'=21
'nil'=22
':'=23
'comp'=24
'node'=25
'components'=24
'nodes'=25
'.'=26
'net'=27
'->'=28
Expand Down
Loading

0 comments on commit f64d3ab

Please sign in to comment.