Skip to content

Commit

Permalink
use sedlex for utf-8 aware lexing (closes HaxeFoundation#5163)
Browse files Browse the repository at this point in the history
  • Loading branch information
nadako committed Apr 11, 2017
1 parent b218ae1 commit 4941ec4
Show file tree
Hide file tree
Showing 9 changed files with 462 additions and 447 deletions.
1 change: 1 addition & 0 deletions .merlin
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ S src/**
B _build/src/**
S libs/**
B libs/**
PKG sedlex
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ install_osx: &install_osx
- travis_retry brew install opam;
- export OPAMYES=1
- opam init
- opam install camlp4 ocamlfind
- opam install camlp4 sedlex ocamlfind
- eval `opam config env`
# Install neko
- travis_retry brew install neko --HEAD;
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# - use 'make -f Makefile.win' to build for Windows
# - use 'make MSVC=1 -f Makefile.win' to build for Windows with OCaml/MSVC
#
.SUFFIXES : .ml .mli .cmo .cmi .cmx .mll .mly
.SUFFIXES : .ml .mli .cmo .cmi .cmx .mly

INSTALL_DIR=$(DESTDIR)/usr
INSTALL_BIN_DIR=$(INSTALL_DIR)/bin
Expand All @@ -29,7 +29,7 @@ STATICLINK?=0

HAXE_DIRECTORIES=compiler context generators generators/gencommon macro filters optimization syntax typing display
EXTLIB_LIBS=extlib extc neko javalib ziplib swflib xml-light ttflib ilib objsize pcre
FINDLIB_LIBS=unix str threads
FINDLIB_LIBS=unix str threads sedlex

# Includes, packages and compiler

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ install:
- 7z x "opam32.tar.xz" -so | 7z x -aoa -si -ttar
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && bash opam32/install.sh"'
- '%CYG_ROOT%/bin/bash -lc "opam init mingw \"https://github.com/fdopen/opam-repository-mingw.git\" --comp 4.02.3+mingw32c --switch 4.02.3+mingw32c --auto-setup --yes"'
- '%CYG_ROOT%/bin/bash -lc "opam install camlp4 ocamlfind --yes"'
- '%CYG_ROOT%/bin/bash -lc "opam install camlp4 sedlex ocamlfind --yes"'
# Install neko
- choco install neko --prerelease --ignore-dependencies -s 'https://ci.appveyor.com/nuget/neko' -y
- choco install chocolatey-core.extension php --ignore-dependencies -y
Expand Down
4 changes: 0 additions & 4 deletions compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ if [ ! -f "_build/src/syntax/parser.ml" -o "src/syntax/parser.mly" -nt "_build/s
camlp4o -impl src/syntax/parser.mly -o _build/src/syntax/parser.ml
fi

if [ ! -f "_build/src/syntax/lexer.ml" -o "src/syntax/lexer.mll" -nt "_build/src/syntax/lexer.ml" ]; then
ocamllex -o _build/src/syntax/lexer.ml src/syntax/lexer.mll
fi

if [ "$1" -eq "0" -a ! -f "_build/src/compiler/version.ml" ]; then
echo let version_extra = None > _build/src/compiler/version.ml
fi
Loading

0 comments on commit 4941ec4

Please sign in to comment.