Skip to content

Commit 7c23d6a

Browse files
committed
update to BSD3 license
1 parent 2a93e58 commit 7c23d6a

28 files changed

+137
-494
lines changed

LICENSE

+27-339
Large diffs are not rendered by default.

bin/build.js

+2-19
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,11 @@
11
#!/usr/bin/env node
22

33
/**
4-
* Glayzzle : the PHP engine on NodeJS
5-
*
6-
* Copyright (C) 2014 Glayzzle
7-
* This program is free software; you can redistribute it and/or modify
8-
* it under the terms of the GNU General Public License as published by
9-
* the Free Software Foundation; either version 2 of the License, or
10-
* (at your option) any later version.
11-
*
12-
* This program is distributed in the hope that it will be useful,
13-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15-
* GNU General Public License for more details.
16-
*
17-
* You should have received a copy of the GNU General Public License along
18-
* with this program; if not, write to the Free Software Foundation, Inc.,
19-
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20-
*
4+
* Copyright (C) 2014 Glayzzle (BSD3 License)
5+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
216
* @url http://glayzzle.com
22-
* @license GNU-2
237
*/
248

25-
269
// requiring libs
2710
var util = require('util');
2811
var jison = require('jison');

bin/formats/ast.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/**
2-
* Glayzzle : PHP on NodeJS
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
34
* @url http://glayzzle.com
4-
* @author Ioan CHIRIAC
5-
* @license BSD-3-Clause
65
*/
76
var fs = require('fs');
87
var util = require('util');

bin/formats/cmd.js

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
4+
* @url http://glayzzle.com
5+
*/
16
var child_process = require('child_process');
27
var fs = require('fs');
38

bin/formats/parser.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
/**
2-
* Glayzzle : PHP on NodeJS
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
34
* @url http://glayzzle.com
4-
* @author Ioan CHIRIAC
5-
* @license BSD-3-Clause
65
*/
7-
86
var util = require('util');
97

108
module.exports = {

bin/formats/php.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/**
2-
* Glayzzle : PHP on NodeJS
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
34
* @url http://glayzzle.com
4-
* @author Ioan CHIRIAC
5-
* @license BSD-3-Clause
65
*/
76
module.exports = {
87
handles: function(filename, ext) {

bin/formats/phpt.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/**
2-
* Glayzzle : PHP on NodeJS
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
34
* @url http://glayzzle.com
4-
* @author Ioan CHIRIAC
5-
* @license BSD-3-Clause
65
*/
76
var util = require('util');
87
module.exports = {

bin/formats/token.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/**
2-
* Glayzzle : PHP on NodeJS
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
34
* @url http://glayzzle.com
4-
* @author Ioan CHIRIAC
5-
* @license BSD-3-Clause
65
*/
76
var fs = require('fs');
87
var cmd = require('./cmd');

bin/formats/token.php

+6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
<?php
2+
3+
/**
4+
* Copyright (C) 2014 Glayzzle (BSD3 License)
5+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
6+
* @url http://glayzzle.com
7+
*/
28
$tokens = token_get_all(
39
file_get_contents($argv[1])
410
);

bin/test.js

+2-18
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,9 @@
11
#!/usr/bin/env node
22

33
/**
4-
* Glayzzle : the PHP engine on NodeJS
5-
*
6-
* Copyright (C) 2014 Glayzzle
7-
* This program is free software; you can redistribute it and/or modify
8-
* it under the terms of the GNU General Public License as published by
9-
* the Free Software Foundation; either version 2 of the License, or
10-
* (at your option) any later version.
11-
*
12-
* This program is distributed in the hope that it will be useful,
13-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15-
* GNU General Public License for more details.
16-
*
17-
* You should have received a copy of the GNU General Public License along
18-
* with this program; if not, write to the Free Software Foundation, Inc.,
19-
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20-
*
4+
* Copyright (C) 2014 Glayzzle (BSD3 License)
5+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
216
* @url http://glayzzle.com
22-
* @license GNU-2
237
*/
248

259
var util = require('util');

main.js

+2-19
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,8 @@
11
/**
2-
* Glayzzle : the PHP engine on NodeJS
3-
*
4-
* Copyright (C) 2014 Glayzzle
5-
* This program is free software; you can redistribute it and/or modify
6-
* it under the terms of the GNU General Public License as published by
7-
* the Free Software Foundation; either version 2 of the License, or
8-
* (at your option) any later version.
9-
*
10-
* This program is distributed in the hope that it will be useful,
11-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
* GNU General Public License for more details.
14-
*
15-
* You should have received a copy of the GNU General Public License along
16-
* with this program; if not, write to the Free Software Foundation, Inc.,
17-
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18-
*
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
194
* @url http://glayzzle.com
20-
* @license GNU-2
215
*/
22-
236
var engine = {
247
// parsing helper
258
parse: function(buffer) {

src/lexer.js

+2-19
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,9 @@
11
/**
2-
* Glayzzle : the PHP engine on NodeJS
3-
*
4-
* Copyright (C) 2014 Glayzzle
5-
* This program is free software; you can redistribute it and/or modify
6-
* it under the terms of the GNU General Public License as published by
7-
* the Free Software Foundation; either version 2 of the License, or
8-
* (at your option) any later version.
9-
*
10-
* This program is distributed in the hope that it will be useful,
11-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
* GNU General Public License for more details.
14-
*
15-
* You should have received a copy of the GNU General Public License along
16-
* with this program; if not, write to the Free Software Foundation, Inc.,
17-
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18-
*
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
194
* @url http://glayzzle.com
20-
* @license GNU-2
215
*/
226

23-
247
var T_HALT_COMPILER = 101,
258
T_USE = 102,
269
T_ENCAPSED_AND_WHITESPACE = 103,

src/lexer/license.txt

+2-19
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,5 @@
11
/**
2-
* Glayzzle : the PHP engine on NodeJS
3-
*
4-
* Copyright (C) 2014 Glayzzle
5-
* This program is free software; you can redistribute it and/or modify
6-
* it under the terms of the GNU General Public License as published by
7-
* the Free Software Foundation; either version 2 of the License, or
8-
* (at your option) any later version.
9-
*
10-
* This program is distributed in the hope that it will be useful,
11-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
* GNU General Public License for more details.
14-
*
15-
* You should have received a copy of the GNU General Public License along
16-
* with this program; if not, write to the Free Software Foundation, Inc.,
17-
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18-
*
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
194
* @url http://glayzzle.com
20-
* @license GNU-2
215
*/
22-

src/parser.js

+2-18
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,7 @@
11
/**
2-
* Glayzzle : the PHP engine on NodeJS
3-
*
4-
* Copyright (C) 2014 Glayzzle
5-
* This program is free software; you can redistribute it and/or modify
6-
* it under the terms of the GNU General Public License as published by
7-
* the Free Software Foundation; either version 2 of the License, or
8-
* (at your option) any later version.
9-
*
10-
* This program is distributed in the hope that it will be useful,
11-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
* GNU General Public License for more details.
14-
*
15-
* You should have received a copy of the GNU General Public License along
16-
* with this program; if not, write to the Free Software Foundation, Inc.,
17-
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18-
*
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
194
* @url http://glayzzle.com
20-
* @license GNU-2
215
*/
226

237
var fs = require('fs');

src/parser/array.js

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
4+
* @url http://glayzzle.com
5+
*/
6+
17
module.exports = function(api, tokens, EOF) {
28
return {
39
/**

src/parser/class.js

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
4+
* @url http://glayzzle.com
5+
*/
6+
17
module.exports = function(api, tokens, EOF) {
28
return {
39
/**

src/parser/expr.js

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
4+
* @url http://glayzzle.com
5+
*/
6+
17
module.exports = function(api, tokens, EOF) {
28
return {
39

src/parser/function.js

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
4+
* @url http://glayzzle.com
5+
*/
6+
17
module.exports = function(api, tokens, EOF) {
28
return {
39
/**

src/parser/if.js

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
4+
* @url http://glayzzle.com
5+
*/
6+
17
module.exports = function(api, tokens, EOF) {
28
return {
39
/**

src/parser/loops.js

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
4+
* @url http://glayzzle.com
5+
*/
6+
17
module.exports = function(api, tokens, EOF) {
28
return {
39
read_while: function() {

src/parser/main.js

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
4+
* @url http://glayzzle.com
5+
*/
6+
17
module.exports = function(api, tokens, EOF) {
28
return {
39
/**

src/parser/namespace.js

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
4+
* @url http://glayzzle.com
5+
*/
6+
17
module.exports = function(api, tokens, EOF) {
28
return {
39
/**

src/parser/scalar.js

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
4+
* @url http://glayzzle.com
5+
*/
6+
17
module.exports = function(api, tokens, EOF) {
28
return {
39
/**

src/parser/statement.js

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
4+
* @url http://glayzzle.com
5+
*/
16
module.exports = function(api, tokens, EOF) {
27
return {
38
/**
@@ -93,14 +98,7 @@ module.exports = function(api, tokens, EOF) {
9398
* </ebnf>
9499
*/
95100
,read_inner_statement: function() {
96-
switch(this.token) {
97-
case '{':
98-
return this.read_code_block(false);
99-
case tokens.T_IF:
100-
return this.read_if();
101-
default:
102-
return this.read_token();
103-
}
101+
return this.read_statement();
104102
}
105103
/**
106104
* Reads statements

src/parser/switch.js

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
4+
* @url http://glayzzle.com
5+
*/
16
module.exports = function(api, tokens, EOF) {
27
return {
38
/**

src/parser/try.js

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
4+
* @url http://glayzzle.com
5+
*/
16
module.exports = function(api, tokens, EOF) {
27
return {
38
/**

src/parser/variable.js

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* Copyright (C) 2014 Glayzzle (BSD3 License)
3+
* @authors https://github.com/glayzzle/glayzzle-parser/graphs/contributors
4+
* @url http://glayzzle.com
5+
*/
16
module.exports = function(api, tokens, EOF) {
27
return {
38
/**

0 commit comments

Comments
 (0)