Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add documentation and license information

  • Loading branch information...
commit 82da35963c7ae6e1f718b7f9dcec13b436d9e4da 1 parent 9da55a1
@laverdet laverdet authored
View
25 INSTALL
@@ -0,0 +1,25 @@
+Building XHP requires:
+
+ * PHP 5.2.x or 5.3.x
+ * gcc 4.0 or higher
+ * flex 2.5.35 or higher
+ * Bison 2.3 or higher
+ * re2c 0.13.5 or higher
+
+You may have luck with different versions of these packages, but these are the
+versions that have been tested to work.
+
+If PHP was configured correctly, and you meet the system requirements (Linux)
+you should be able to get XHP running just like you would most PHP extensions:
+
+ phpize
+ ./configure
+ make
+ make install
+
+Then add `extension=xhp.so` to your php.ini and you should be good to go. An
+easy way to test if XHP is working is by running:
+
+ php -r 'echo "XHP!\n"; exit; <a />;'
+
+If you get a syntax error then XHP is not working.
View
68 LICENSE.PHP
@@ -0,0 +1,68 @@
+--------------------------------------------------------------------
+ The PHP License, version 3.01
+Copyright (c) 1999 - 2009 The PHP Group. All rights reserved.
+--------------------------------------------------------------------
+
+Redistribution and use in source and binary forms, with or without
+modification, is permitted provided that the following conditions
+are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ 3. The name "PHP" must not be used to endorse or promote products
+ derived from this software without prior written permission. For
+ written permission, please contact group@php.net.
+
+ 4. Products derived from this software may not be called "PHP", nor
+ may "PHP" appear in their name, without prior written permission
+ from group@php.net. You may indicate that your software works in
+ conjunction with PHP by saying "Foo for PHP" instead of calling
+ it "PHP Foo" or "phpfoo"
+
+ 5. The PHP Group may publish revised and/or new versions of the
+ license from time to time. Each version will be given a
+ distinguishing version number.
+ Once covered code has been published under a particular version
+ of the license, you may always continue to use it under the terms
+ of that version. You may also choose to use such covered code
+ under the terms of any subsequent version of the license
+ published by the PHP Group. No one other than the PHP Group has
+ the right to modify the terms applicable to covered code created
+ under this License.
+
+ 6. Redistributions of any form whatsoever must retain the following
+ acknowledgment:
+ "This product includes PHP software, freely available from
+ <http://www.php.net/software/>".
+
+THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
+ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
+DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+OF THE POSSIBILITY OF SUCH DAMAGE.
+
+--------------------------------------------------------------------
+
+This software consists of voluntary contributions made by many
+individuals on behalf of the PHP Group.
+
+The PHP Group can be contacted via Email at group@php.net.
+
+For more information on the PHP Group and the PHP project,
+please see <http://www.php.net>.
+
+PHP includes the Zend Engine, freely available at
+<http://www.zend.com>.
View
56 LICENSE.ZEND
@@ -0,0 +1,56 @@
+--------------------------------------------------------------------
+ The Zend Engine License, version 2.00
+Copyright (c) 1999-2002 Zend Technologies Ltd. All rights reserved.
+--------------------------------------------------------------------
+
+Redistribution and use in source and binary forms, with or without
+modification, is permitted provided that the following conditions
+are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+ 3. The names "Zend" and "Zend Engine" must not be used to endorse
+ or promote products derived from this software without prior
+ permission from Zend Technologies Ltd. For written permission,
+ please contact license@zend.com.
+
+ 4. Zend Technologies Ltd. may publish revised and/or new versions
+ of the license from time to time. Each version will be given a
+ distinguishing version number.
+ Once covered code has been published under a particular version
+ of the license, you may always continue to use it under the
+ terms of that version. You may also choose to use such covered
+ code under the terms of any subsequent version of the license
+ published by Zend Technologies Ltd. No one other than Zend
+ Technologies Ltd. has the right to modify the terms applicable
+ to covered code created under this License.
+
+ 5. Redistributions of any form whatsoever must retain the following
+ acknowledgment:
+ "This product includes the Zend Engine, freely available at
+ http://www.zend.com"
+
+ 6. All advertising materials mentioning features or use of this
+ software must display the following acknowledgment:
+ "The Zend Engine is freely available at http://www.zend.com"
+
+THIS SOFTWARE IS PROVIDED BY ZEND TECHNOLOGIES LTD. ``AS IS'' AND
+ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ZEND
+TECHNOLOGIES LTD. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+--------------------------------------------------------------------
View
17 ext.cpp
@@ -1,3 +1,20 @@
+/*
+ +----------------------------------------------------------------------+
+ | XHP |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 2009 Facebook, Inc. (http://www.facebook.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.00 of the Zend license, |
+ | that is bundled with this package in the file LICENSE.ZEND, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.zend.com/license/2_00.txt. |
+ | If you did not receive a copy of the Zend license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@zend.com so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+*/
+
#include "ext.hpp"
#include "xhp/xhp_preprocess.hpp"
#include "php.h"
View
17 ext.hpp
@@ -1,3 +1,20 @@
+/*
+ +----------------------------------------------------------------------+
+ | XHP |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 2009 Facebook, Inc. (http://www.facebook.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.00 of the Zend license, |
+ | that is bundled with this package in the file LICENSE.ZEND, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.zend.com/license/2_00.txt. |
+ | If you did not receive a copy of the Zend license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@zend.com so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+*/
+
#pragma once
#ifdef HAVE_CONFIG_H
#include "../config.h"
View
15 php-lib/core.php
@@ -1,4 +1,19 @@
<?php
+/*
+ +----------------------------------------------------------------------+
+ | XHP |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2009 Facebook, Inc. (http://www.facebook.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE.PHP, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+*/
abstract class :x:base {
abstract public function __construct();
View
15 php-lib/html.php
@@ -1,4 +1,19 @@
<?php
+/*
+ +----------------------------------------------------------------------+
+ | XHP |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2009 Facebook, Inc. (http://www.facebook.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE.PHP, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+*/
/**
* This is the base library of HTML elements for use in XHP. This includes all
View
16 xhp/code_rope.cpp
@@ -1,3 +1,19 @@
+/*
+ +----------------------------------------------------------------------+
+ | XHP |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2009 Facebook, Inc. (http://www.facebook.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE.PHP, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+*/
+
#include "code_rope.hpp"
using namespace std;
View
16 xhp/code_rope.hpp
@@ -1,3 +1,19 @@
+/*
+ +----------------------------------------------------------------------+
+ | XHP |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2009 Facebook, Inc. (http://www.facebook.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE.PHP, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+*/
+
#include <string>
#include <ext/rope>
#include <ext/pool_allocator.h>
View
16 xhp/fastpath.hpp
@@ -1,3 +1,19 @@
+/*
+ +----------------------------------------------------------------------+
+ | XHP |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2009 Facebook, Inc. (http://www.facebook.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE.PHP, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+*/
+
#pragma once
#include "xhp_preprocess.hpp"
View
16 xhp/fastpath.re
@@ -1,3 +1,19 @@
+/*
+ +----------------------------------------------------------------------+
+ | XHP |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2009 Facebook, Inc. (http://www.facebook.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE.PHP, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+*/
+
#include "fastpath.hpp"
#include <stdio.h>
View
17 xhp/parser.y
@@ -1,3 +1,20 @@
+/*
+ +----------------------------------------------------------------------+
+ | XHP |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 2009 Facebook, Inc. (http://www.facebook.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.00 of the Zend license, |
+ | that is bundled with this package in the file LICENSE.ZEND, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.zend.com/license/2_00.txt. |
+ | If you did not receive a copy of the Zend license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@zend.com so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+*/
+
%{
#include "xhp.hpp"
// PHP's if/else rules use right reduction rather than left reduction which
View
17 xhp/scanner.l
@@ -1,3 +1,20 @@
+/*
+ +----------------------------------------------------------------------+
+ | XHP |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 2009 Facebook, Inc. (http://www.facebook.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.00 of the Zend license, |
+ | that is bundled with this package in the file LICENSE.ZEND, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.zend.com/license/2_00.txt. |
+ | If you did not receive a copy of the Zend license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@zend.com so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+*/
+
%{
#include "xhp.hpp"
#define push_state(s) xhp_new_push_state(s, yyg)
View
16 xhp/xhp.hpp
@@ -1,3 +1,19 @@
+/*
+ +----------------------------------------------------------------------+
+ | XHP |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2009 Facebook, Inc. (http://www.facebook.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE.PHP, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+*/
+
#pragma once
#include <stdint.h>
View
16 xhp/xhp_preprocess.cpp
@@ -1,3 +1,19 @@
+/*
+ +----------------------------------------------------------------------+
+ | XHP |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2009 Facebook, Inc. (http://www.facebook.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE.PHP, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+*/
+
#include "xhp.hpp"
#include "xhp_preprocess.hpp"
#include "fastpath.hpp"
View
16 xhp/xhp_preprocess.hpp
@@ -1,3 +1,19 @@
+/*
+ +----------------------------------------------------------------------+
+ | XHP |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2009 Facebook, Inc. (http://www.facebook.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE.PHP, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+*/
+
#pragma once
#include <iostream>
#include <string>
View
16 xhp/xhpize.cpp
@@ -1,3 +1,19 @@
+/*
+ +----------------------------------------------------------------------+
+ | XHP |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2009 Facebook, Inc. (http://www.facebook.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE.PHP, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+*/
+
#include "xhp_preprocess.hpp"
#include <vector>
#include <string>
Please sign in to comment.
Something went wrong with that request. Please try again.