0
0
bleve/genparser.sh

14 lines
468 B
Bash
Raw Normal View History

#! /bin/sh
echo Running nex...
nex query_string.nex
echo Running goyacc...
go tool yacc -o query_string.y.go query_string.y
# remove first line which pollutes godocs
tail -n +2 query_string.y.go > query_string.y.go.new
mv query_string.y.go.new query_string.y.go
2014-08-30 05:31:40 +02:00
# change public Lexer to private lexer
sed -i '' -e 's/Lexer/lexer/g' query_string.nn.go
sed -i '' -e 's/Newlexer/newLexer/g' query_string.nn.go
sed -i '' -e 's/debuglexer/debugLexer/g' query_string.nn.go