-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d9540c2
Showing
783 changed files
with
20,805 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
[The "BSD 3-clause license"] | ||
Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are 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. Neither the name of the copyright holder nor the names of its contributors | ||
may be used to endorse or promote products derived from this software | ||
without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 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 AUTHOR 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. | ||
|
||
===== | ||
|
||
MIT License for codepointat.js from https://git.io/codepointat | ||
MIT License for fromcodepoint.js from https://git.io/vDW1m | ||
|
||
Copyright Mathias Bynens <https://mathiasbynens.be/> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Copyright (c) 2002-2016, the original author or authors. | ||
All rights reserved. | ||
|
||
http://www.opensource.org/licenses/bsd-license.php | ||
|
||
Redistribution and use in source and binary forms, with or | ||
without modification, are permitted provided that the following | ||
conditions are met: | ||
|
||
Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
|
||
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. | ||
|
||
Neither the name of JLine nor the names of its contributors | ||
may be used to endorse or promote products derived from this | ||
software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS 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 COPYRIGHT OWNER OR 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. | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
============================================================================ | ||
|
||
Copyright (c) 2002 JSON.org | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
The Software shall be used for Good, not Evil. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
Copyright 2017 Stefan Irimescu and Ghislain Fourny | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
|
||
======================================================================= | ||
Sparksoniq Subcomponents: | ||
|
||
The Sparksoniq project contains subcomponents with separate copyright | ||
notices and license terms. Your use of the source code for the these | ||
subcomponents is subject to the terms and conditions of the following | ||
licenses. | ||
|
||
|
||
======================================================================== | ||
For ANTLR v4 | ||
======================================================================== | ||
|
||
See license/LICENSE-ANTLR.txt | ||
|
||
======================================================================== | ||
For JLine 3.0.2 | ||
======================================================================== | ||
|
||
See license/LICENSE-JLine.txt | ||
|
||
======================================================================== | ||
For org.json | ||
======================================================================== | ||
|
||
See license/LICENSE-org.json.txt | ||
|
||
======================================================================== | ||
For Spark 1.6.2 | ||
======================================================================== | ||
|
||
See license/LICENSE-Spark.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Sparksoniq was started in February 2017 at ETH Zurich as the Master's thesis of Stefan Irimescu, under the supervision of Ghislain Fourny and Gustavo Alonso. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Jsoniq on Spark | ||
|
||
CURRENT STATUS: | ||
- Grammar, ANTLR generated parser + lexer, ANTLR generated AST; | ||
- Expression Tree | ||
- Static Context (in scope variables only) | ||
- Runtime iterators | ||
- Working basic FLOWRs (for, let, where, return) | ||
|
||
Unsupported/Unimplemented features | ||
- prolog | ||
- modules | ||
- separate variable declarations | ||
- switch/if/try/catch/quantified expressions | ||
- string concat/cast/treat/instance of expressions | ||
- advanced object lookup/context expression/ {||} pairs | ||
|
||
FILES | ||
- pom.xml - Maven Build File; | ||
- build_antlr_parser.xml - ANT build File, generates Parser, Lexer, Tokens; | ||
- src/test/java/iq/frontend/FrontendTests.java - JUnit Tests for Parser | ||
- src/test/java/iq/frontend/RuntimeTests.java - JUnit Tests for local runtime iterators | ||
- src/test/java/iq/frontend/SparkRuntimeTests.java - JUnit Tests for spark runtime iterators | ||
|
||
SETUP | ||
- Requirements: maven, Spark (tested on 2.1.0), org.json parser | ||
- 1) Packaging (with requirements) - mvn clean compile assembly:single | ||
- 2) Tests: - mvn -Dtest=FrontendTests test && - mvn -Dtest=RuntimeTests test && - mvn -Dtest=SparkRuntimeTests test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<project name="antlr-parser" default="generate-parser" basedir="."> | ||
|
||
<!-- A very simple ant file that primarily existsrunLocal run cup and lex; | ||
it also includes targets to build the compiler runLocal run tests for those | ||
who would rather not use Eclipse --> | ||
|
||
<!-- Set project properties. --> | ||
<property name="src.dir" value="${basedir}/src/main/java/jiqs"/> | ||
<property name="parser.dir" value="${src.dir}/jsoniq/compiler/parser"/> | ||
<property name="antlr.jar" value="/usr/local/lib/antlr-4.6-complete.jar"/> | ||
|
||
|
||
<target name="clean-parser"> | ||
<delete file="/jiqs/jsoniq/compiler/parser/Jsoniq.tokens"/> | ||
<delete file="/jiqs/jsoniq/compiler/parser/JsoniqLexer.java"/> | ||
<delete file="/jiqs/jsoniq/compiler/parser/JsoniqParser.java"/> | ||
<delete file="/jiqs/jsoniq/compiler/parser/JsoniqBaseVisitor.java"/> | ||
<delete file="/jiqs/jsoniq/compiler/parser/JsoniqVisitor.java"/> | ||
<delete file="/jiqs/jsoniq/compiler/parser/JsoniqLexer.tokens"/> | ||
</target> | ||
|
||
|
||
<target name="generate-parser"> | ||
<echo message="ANTLR4 ${parser.dir}/Jsoniq.g4" level="info"/> | ||
<echo>${basedir}</echo> | ||
<java classname="org.antlr.v4.Tool" failonerror="true" classpath="${antlr.jar}"> | ||
<arg value="${parser.dir}/Jsoniq.g4" /> | ||
<arg value="-o" /> | ||
<arg value="${parser.dir}" /> | ||
<arg value="-no-listener" /> | ||
<arg value="-visitor" /> | ||
</java> | ||
</target> | ||
|
||
|
||
</project> |
Oops, something went wrong.