Skip to content

Commit 4e29243

Browse files
committed
Initial commit
0 parents  commit 4e29243

File tree

6 files changed

+5312
-0
lines changed

6 files changed

+5312
-0
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Please do not use this ignore file to define platform specific files.
2+
#
3+
# For these purposes create a global .gitignore file, which is a list of rules
4+
# for ignoring files in every Git repository on your computer.
5+
#
6+
# https://help.github.com/articles/ignoring-files/#create-a-global-gitignore

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2013-2017 Zephir Team and contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Zephir Parser
2+
3+
Zephir Parser delivered as a C extension for the PHP language.
4+
5+
6+
## License
7+
8+
Zephir Parser is open source software licensed under the MIT License. See the LICENSE file for more

parser/build

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
3+
CC=${CC:-}
4+
GCC_BIN=${GCC_BIN:-$(which gcc 2>/dev/null)}
5+
CLANG_BIN=${CLANG_BIN:-$(which clang 2>/dev/null)}
6+
7+
if [ x"$CC" != x ]; then
8+
if [ x"$GCC_BIN" != x ]; then
9+
export CC="gcc"
10+
else
11+
if [ x"$CLANG_BIN" != x ]; then
12+
export CC="clang"
13+
fi
14+
fi
15+
fi
16+
17+
if [ x"$CC" = x ]; then
18+
echo -e "Unable to locate the compiler"
19+
exit 1
20+
fi
21+
22+
rm -f *.o *.lo
23+
24+
# Compile lemon
25+
if [ ! -f lemon ]; then
26+
${CC} -w lemon.c -o lemon
27+
fi

0 commit comments

Comments
 (0)