Closed rgaiacs closed 8 years ago
@fred-wang Could you help with this?
$ git rev-parse HEAD
589f5c6c804f8a15a9dc3655f62967148bf55b3c
$ git clean -fxd
$ ./configure
checking for bash... /bin/bash
checking for closure-compiler... no
checking for nodejs... nodejs
checking for curl... curl
checking for egrep... egrep
checking for git... git
checking for jison... jison
checking for kill... kill
checking for make... make
checking for npm... npm
checking for pkill... pkill
checking for python... python
checking for sed... sed
checking for xsltproc... xsltproc
configure: creating ./config.status
config.status: creating Makefile
$ make build
curl http://www.w3.org/2003/entities/2007xml/unicode.xml -o unicode.xml
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 8010k 100 8010k 0 0 187k 0 0:00:42 0:00:42 --:--:-- 96194
xsltproc extractChars.xsl unicode.xml > chars.txt
python generateCharCommands.py chars.txt char-commands.txt;
cat char-commands.txt base-commands.txt | egrep -v "^#" | \
sort --reverse --field-separator='"' --key=2,2 > commands.txt
cat main.jisonlex commands.txt > TeXZilla.jisonlex
echo "[\uD800-\uDBFF] return \"HIGH_SURROGATE\";" >> TeXZilla.jisonlex
echo "[\uDC00-\uDFFF] return \"LOW_SURROGATE\";" >> TeXZilla.jisonlex
echo ". return \"BMP_CHARACTER\";" >> TeXZilla.jisonlex
Generating the parser, this may take some time...
jison --outfile TeXZilla-web.js --module-type js --parser-type lalr TeXZilla.jison TeXZilla.jisonlex
sed -i "s|\\\\b)/|)/|g" TeXZilla-web.js # jison issue 204
sed -i "s|var TeXZillaWeb =|var TeXZilla =|" TeXZilla-web.js
sed -i "/typeof this.yy.parseError === 'function'/i this.parseError = parseError;" TeXZilla-web.js
sed -i "/typeof this.yy.parseError === 'function'/,/}"$"/d" TeXZilla-web.js
sed -i "1 i \"use strict\";" TeXZilla-web.js
cat MPL-header.js TeXZilla-web.js >> tmp.js
mv tmp.js TeXZilla-web.js
cp TeXZilla-web.js TeXZilla.js
sed "1,6d" commonJS.js >> TeXZilla.js
$ ./npmbin.sh
/home/raniere/src/TeXZilla/TeXZilla.js:876
function lex() {
^^^^^^^^
SyntaxError: In strict mode code, functions can only be declared at top level or immediately within another function.
at exports.runInThisContext (vm.js:75:16)
at Module._compile (module.js:445:25)
at Object.Module._extensions..js (module.js:480:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:503:10)
at startup (node.js:132:16)
at node.js:817:3
Previous reported upstream at https://github.com/zaach/jison/issues/285. =(
https://github.com/zaach/jison/issues/285#issuecomment-152290435 seems to say that this is fixed. Can you check again?