2014-07-11 20:49:59 +02:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
echo Running nex...
|
2014-08-29 21:19:02 +02:00
|
|
|
nex query_string.nex
|
2014-07-11 20:49:59 +02:00
|
|
|
echo Running goyacc...
|
2014-10-23 21:56:59 +02:00
|
|
|
go tool yacc -o query_string.y.go query_string.y
|
2014-08-29 20:18:36 +02:00
|
|
|
# remove first line which pollutes godocs
|
2014-10-23 21:56:59 +02:00
|
|
|
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
|