1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-01-16 03:21:03 +02:00

Changed parser generation

This commit is contained in:
Tim Voronov 2018-09-27 14:36:16 -04:00
parent 110bd25170
commit f8973aa504
9 changed files with 15 additions and 10 deletions

View File

@ -22,5 +22,4 @@ before_install:
- sudo curl -O https://www.antlr.org/download/antlr-4.7.1-complete.jar
- export CLASSPATH=".:/usr/local/lib/antlr-4.7.1-complete.jar:$CLASSPATH"
- alias antlr4='java -jar /usr/local/lib/antlr-4.7.1-complete.jar'
- alias grun='java org.antlr.v4.gui.TestRig'
- type antlr4
- alias grun='java org.antlr.v4.gui.TestRig'

View File

@ -6,6 +6,7 @@ VERSION ?= $(shell git describe --tags --always --dirty)
DIR_BIN = ./bin
DIR_PKG = ./pkg
DIR_CMD = ./cmd
DIR_PKG_PARSER = ${PWD}/pkg/parser
default: build
@ -23,7 +24,13 @@ test:
go test ${DIR_PKG}/...
generate:
go generate ${DIR_PKG}/...
antlr4 -Xexact-output-dir \
-o ${DIR_PKG_PARSER}/fql \
-package fql \
-visitor \
-Dlanguage=Go \
${DIR_PKG_PARSER}/antlr/FqlLexer.g4 \
${DIR_PKG_PARSER}/antlr/FqlParser.g4
doc:
godoc -http=:6060 -index

View File

@ -1,4 +1,4 @@
// Code generated from antlr/FqlLexer.g4 by ANTLR 4.7.1. DO NOT EDIT.
// Code generated from /Users/timofei.voronov/Work/src/github.com/MontFerret/ferret/pkg/parser/antlr/FqlLexer.g4 by ANTLR 4.7.1. DO NOT EDIT.
package fql

View File

@ -1,4 +1,4 @@
// Code generated from antlr/FqlParser.g4 by ANTLR 4.7.1. DO NOT EDIT.
// Code generated from /Users/timofei.voronov/Work/src/github.com/MontFerret/ferret/pkg/parser/antlr/FqlParser.g4 by ANTLR 4.7.1. DO NOT EDIT.
package fql // FqlParser
import (

View File

@ -1,4 +1,4 @@
// Code generated from antlr/FqlParser.g4 by ANTLR 4.7.1. DO NOT EDIT.
// Code generated from /Users/timofei.voronov/Work/src/github.com/MontFerret/ferret/pkg/parser/antlr/FqlParser.g4 by ANTLR 4.7.1. DO NOT EDIT.
package fql // FqlParser
import "github.com/antlr/antlr4/runtime/Go/antlr"

View File

@ -1,4 +1,4 @@
// Code generated from antlr/FqlParser.g4 by ANTLR 4.7.1. DO NOT EDIT.
// Code generated from /Users/timofei.voronov/Work/src/github.com/MontFerret/ferret/pkg/parser/antlr/FqlParser.g4 by ANTLR 4.7.1. DO NOT EDIT.
package fql // FqlParser
import "github.com/antlr/antlr4/runtime/Go/antlr"

View File

@ -1,4 +1,4 @@
// Code generated from antlr/FqlParser.g4 by ANTLR 4.7.1. DO NOT EDIT.
// Code generated from /Users/timofei.voronov/Work/src/github.com/MontFerret/ferret/pkg/parser/antlr/FqlParser.g4 by ANTLR 4.7.1. DO NOT EDIT.
package fql // FqlParser
import "github.com/antlr/antlr4/runtime/Go/antlr"

View File

@ -1,4 +1,4 @@
// Code generated from antlr/FqlParser.g4 by ANTLR 4.7.1. DO NOT EDIT.
// Code generated from /Users/timofei.voronov/Work/src/github.com/MontFerret/ferret/pkg/parser/antlr/FqlParser.g4 by ANTLR 4.7.1. DO NOT EDIT.
package fql // FqlParser
import "github.com/antlr/antlr4/runtime/Go/antlr"

View File

@ -1,4 +1,3 @@
//go:generate antlr4 -Xexact-output-dir -o fql -package fql -visitor -Dlanguage=Go antlr/FqlLexer.g4 antlr/FqlParser.g4
package parser
import (