File tree Expand file tree Collapse file tree 4 files changed +997
-4
lines changed
Expand file tree Collapse file tree 4 files changed +997
-4
lines changed Original file line number Diff line number Diff line change 66# https://help.github.com/articles/ignoring-files/#create-a-global-gitignore
77
88parser /lemon
9+ parser /scanner.c
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ On a Unix-based platform you can easily compile and install the extension from s
1212
1313Prerequisite packages are:
1414
15- * GCC compiler (Linux/Solaris/FreeBSD) or Xcode (MacOS)
15+ * GCC/Clang compiler (Linux/Solaris/FreeBSD) or Xcode (MacOS)
1616* [ ` re2c ` ] ( http://re2c.org/ ) >= 0.13
1717
1818## License
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33CC=${CC:- }
4- GCC_BIN=${GCC_BIN:- $(which gcc 2>/ dev/ null)}
5- CLANG_BIN=${CLANG_BIN:- $(which clang 2>/ dev/ null)}
4+
5+ GCC_BIN=${GCC_BIN:- $(command -v gcc 2>/ dev/ null)}
6+ CLANG_BIN=${CLANG_BIN:- $(command -v clang 2>/ dev/ null)}
7+
8+ RE2C_BIN=${RE2C_BIN:- $(command -v re2c 2>/ dev/ null)}
69
710if [ x" $CC " != x ]; then
811 if [ x" $GCC_BIN " != x ]; then
@@ -15,10 +18,17 @@ if [ x"$CC" != x ]; then
1518fi
1619
1720if [ x" $CC " = x ]; then
18- echo -e " Unable to locate the compiler"
21+ echo -e " error: unable to locate the compiler"
1922 exit 1
2023fi
2124
25+ if [ x" $RE2C_BIN " = x ]; then
26+ echo -e " error: unable to locate the re2c"
27+ exit 2
28+ fi
29+
30+ ${RE2C_BIN} -o scanner.c scanner.re
31+
2232rm -f * .o * .lo
2333
2434# Compile lemon
You can’t perform that action at this time.
0 commit comments