Add license headers
Project: http://git-wip-us.apache.org/repos/asf/jena/repo Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/2d8b550a Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/2d8b550a Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/2d8b550a Branch: refs/heads/master Commit: 2d8b550a71fdfd91ee495d7377dd9ea4f34b6e33 Parents: 06339ad Author: Andy Seaborne <[email protected]> Authored: Tue Oct 21 16:41:29 2014 +0100 Committer: Andy Seaborne <[email protected]> Committed: Tue Oct 21 16:41:29 2014 +0100 ---------------------------------------------------------------------- jena-arq/Grammar/BinaryRDF.thrift | 18 +++++++ jena-arq/Grammar/Final/jj2html_11 | 16 +++++++ jena-arq/Grammar/JSON/json | 16 +++++++ jena-arq/Grammar/Notes | 2 + jena-arq/Grammar/XMLchars.txt | 56 ---------------------- jena-arq/Grammar/gen-thrift | 1 + jena-arq/Grammar/grammarExtracts | 16 +++++++ jena-arq/Grammar/jj2html | 16 +++++++ jena-arq/Grammar/jj2tokens | 2 + jena-arq/Grammar/sparql2html | 1 + jena-arq/Grammar/tokens2bnf | 88 +++++++++++++++++----------------- 11 files changed, 133 insertions(+), 99 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/jena/blob/2d8b550a/jena-arq/Grammar/BinaryRDF.thrift ---------------------------------------------------------------------- diff --git a/jena-arq/Grammar/BinaryRDF.thrift b/jena-arq/Grammar/BinaryRDF.thrift index 2b87266..841d7e7 100644 --- a/jena-arq/Grammar/BinaryRDF.thrift +++ b/jena-arq/Grammar/BinaryRDF.thrift @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + // Encoding in Thrift iof RDF terms and other items // for Graph, Datasets, Result Set and Patches http://git-wip-us.apache.org/repos/asf/jena/blob/2d8b550a/jena-arq/Grammar/Final/jj2html_11 ---------------------------------------------------------------------- diff --git a/jena-arq/Grammar/Final/jj2html_11 b/jena-arq/Grammar/Final/jj2html_11 index db29beb..f8d7282 100755 --- a/jena-arq/Grammar/Final/jj2html_11 +++ b/jena-arq/Grammar/Final/jj2html_11 @@ -1,4 +1,20 @@ #!/usr/bin/perl +## Licensed to the Apache Software Foundation (ASF) under one +## or more contributor license agreements. See the NOTICE file +## distributed with this work for additional information +## regarding copyright ownership. The ASF licenses this file +## to you 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. + # Grammar into HTML # Read in sparql.txt and the tokens.txt file http://git-wip-us.apache.org/repos/asf/jena/blob/2d8b550a/jena-arq/Grammar/JSON/json ---------------------------------------------------------------------- diff --git a/jena-arq/Grammar/JSON/json b/jena-arq/Grammar/JSON/json index 254e646..ac77ed0 100755 --- a/jena-arq/Grammar/JSON/json +++ b/jena-arq/Grammar/JSON/json @@ -1,4 +1,20 @@ #!/bin/bash +## Licensed to the Apache Software Foundation (ASF) under one +## or more contributor license agreements. See the NOTICE file +## distributed with this work for additional information +## regarding copyright ownership. The ASF licenses this file +## to you 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. + # Parser builder GRAMMAR="${GRAMMAR:-"json.jj"}" http://git-wip-us.apache.org/repos/asf/jena/blob/2d8b550a/jena-arq/Grammar/Notes ---------------------------------------------------------------------- diff --git a/jena-arq/Grammar/Notes b/jena-arq/Grammar/Notes index b5d4cdc..3133beb 100644 --- a/jena-arq/Grammar/Notes +++ b/jena-arq/Grammar/Notes @@ -1,3 +1,5 @@ +## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0 + ==== The Grammars See Archive for old, historical material. http://git-wip-us.apache.org/repos/asf/jena/blob/2d8b550a/jena-arq/Grammar/XMLchars.txt ---------------------------------------------------------------------- diff --git a/jena-arq/Grammar/XMLchars.txt b/jena-arq/Grammar/XMLchars.txt deleted file mode 100644 index 9e4aa70..0000000 --- a/jena-arq/Grammar/XMLchars.txt +++ /dev/null @@ -1,56 +0,0 @@ -// June 2005: - - XML 1.1 now has: - NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | - [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | - [#x370-#x37D] | [#x37F-#x1FFF] | - [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | - [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | - [#x10000-#xEFFFF] - -[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | - [#x0300-#x036F] | [#x203F-#x2040] - - - -Whitespace - - #x9 |#xD|#xA|' '| - - #x00A0 -- No break space - [#2000-#200B] -- Spaces of various widths - #x205F -- medium mathematical space - #x3000 ideographic space - - -Previously XML was: - XML 1.1 http:www.w3.org/TR/xml11/ - XML Namespces 1.1 http:www.w3.org/TR/xml-names11/ - Prefix ':' LocalPart - Prefix is an NCName - LocalPart is an NCName - - An XML Name, minus the ":" - NCName ::= NCNameStartChar NCNameChar* - NCNameChar ::= NameChar - ':' - NCNameStartChar ::= NameStartChar - ':' - - NameChar and NameSartChar defined in XML 1.1 - NameStartChar := ":" | [A-Z] | "_" | [a-z] | - was: [#xC0-#x2FF] | - now: [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | - [#x370-#x37D] | [#x37F-#x1FFF] | - [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | - [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | - [#x3001-#xD7FF] | [#xF900-#xEFFFF] - - NameChar := NameStartChar | "-" | "." | [0-9] | #xB7 | - [#x0300-#x036F] | [#x203F-#x2040] - -== Escapes - - \n = #xD - \r = #xA - \ = #x5C - " = #x22 - ' = #x27 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/jena/blob/2d8b550a/jena-arq/Grammar/gen-thrift ---------------------------------------------------------------------- diff --git a/jena-arq/Grammar/gen-thrift b/jena-arq/Grammar/gen-thrift index 307ba6a..b9ae9c1 100755 --- a/jena-arq/Grammar/gen-thrift +++ b/jena-arq/Grammar/gen-thrift @@ -1,4 +1,5 @@ #!/bin/bash +## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0 if [ "$#" != 1 ] then http://git-wip-us.apache.org/repos/asf/jena/blob/2d8b550a/jena-arq/Grammar/grammarExtracts ---------------------------------------------------------------------- diff --git a/jena-arq/Grammar/grammarExtracts b/jena-arq/Grammar/grammarExtracts index 03f066a..4c070d2 100644 --- a/jena-arq/Grammar/grammarExtracts +++ b/jena-arq/Grammar/grammarExtracts @@ -1,4 +1,20 @@ #!/bin/perl +## Licensed to the Apache Software Foundation (ASF) under one +## or more contributor license agreements. See the NOTICE file +## distributed with this work for additional information +## regarding copyright ownership. The ASF licenses this file +## to you 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. + # Grammar HTML to a form of HTML suitable for cut&paste as fragments. # Remove definition links. http://git-wip-us.apache.org/repos/asf/jena/blob/2d8b550a/jena-arq/Grammar/jj2html ---------------------------------------------------------------------- diff --git a/jena-arq/Grammar/jj2html b/jena-arq/Grammar/jj2html index db29beb..f8d7282 100755 --- a/jena-arq/Grammar/jj2html +++ b/jena-arq/Grammar/jj2html @@ -1,4 +1,20 @@ #!/usr/bin/perl +## Licensed to the Apache Software Foundation (ASF) under one +## or more contributor license agreements. See the NOTICE file +## distributed with this work for additional information +## regarding copyright ownership. The ASF licenses this file +## to you 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. + # Grammar into HTML # Read in sparql.txt and the tokens.txt file http://git-wip-us.apache.org/repos/asf/jena/blob/2d8b550a/jena-arq/Grammar/jj2tokens ---------------------------------------------------------------------- diff --git a/jena-arq/Grammar/jj2tokens b/jena-arq/Grammar/jj2tokens index 2cf5c04..5b9398a 100644 --- a/jena-arq/Grammar/jj2tokens +++ b/jena-arq/Grammar/jj2tokens @@ -1,4 +1,6 @@ #!/usr/bin/perl +## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0 + # Extract tokens (will need more editting) $/ = undef ; http://git-wip-us.apache.org/repos/asf/jena/blob/2d8b550a/jena-arq/Grammar/sparql2html ---------------------------------------------------------------------- diff --git a/jena-arq/Grammar/sparql2html b/jena-arq/Grammar/sparql2html index b2d2c03..71f2f93 100644 --- a/jena-arq/Grammar/sparql2html +++ b/jena-arq/Grammar/sparql2html @@ -1,3 +1,4 @@ +## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0 echo "Grammar to X.html, fragments file to Y.html" jj2html 'sparql.txt' 'tokens.txt' > X.html grammarExtracts < X.html > Y.html http://git-wip-us.apache.org/repos/asf/jena/blob/2d8b550a/jena-arq/Grammar/tokens2bnf ---------------------------------------------------------------------- diff --git a/jena-arq/Grammar/tokens2bnf b/jena-arq/Grammar/tokens2bnf index ec35cbd..e5dcbf7 100644 --- a/jena-arq/Grammar/tokens2bnf +++ b/jena-arq/Grammar/tokens2bnf @@ -1,43 +1,45 @@ -#!/bin/perl -# Convert javacc token format to BNF - -$/ = undef ; -$_ = <> ; -s!//.*!!g ; -s!\r!!g ; -s/\n+/\n/g ; -s/^\n// ; - -#@t = split(/\n(?=\<|\[)/, $tokens) ; -@t = split(/\n/) ; - -## for $t (@t) -## { -## ($tokenname,$tokenbody) = split(/::=/, $t) ; -## print $tokenname,"\n" ; -## -## } - -# Rewrite to XML BNF -## #xN // [a-zA-Z], [#xN-#xN] // [abc], [#xN#xN#xN] // -## [^a-z], [^#xN-#xN] // [^abc], [^#xN#xN#xN] - -# Rules -# 1 -- ~["X","Y"] => [^XY] -# 2 -- ["a"-"z","A"-"Z"] => [a-zA-Z] -# 3 -- ["!","&"] => [!&] -# 4 -- \uXXXX => #xXXXX - -## Rule 1 -s/~\[/\[^/g ; - -## Rule 2 -s/\["([^"]*)"-"([^"]*)"\]/\[$1-$2\]/g ; - -## Rule 3 -## s/\[.*"([^\],"]*)".*\]/\[$1\]/g ; - -## Rule 4 -s/\\u(....)/#x$1/g ; - -print $_ ; +#!/bin/perl +## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0 + +# Convert javacc token format to BNF + +$/ = undef ; +$_ = <> ; +s!//.*!!g ; +s!\r!!g ; +s/\n+/\n/g ; +s/^\n// ; + +#@t = split(/\n(?=\<|\[)/, $tokens) ; +@t = split(/\n/) ; + +## for $t (@t) +## { +## ($tokenname,$tokenbody) = split(/::=/, $t) ; +## print $tokenname,"\n" ; +## +## } + +# Rewrite to XML BNF +## #xN // [a-zA-Z], [#xN-#xN] // [abc], [#xN#xN#xN] // +## [^a-z], [^#xN-#xN] // [^abc], [^#xN#xN#xN] + +# Rules +# 1 -- ~["X","Y"] => [^XY] +# 2 -- ["a"-"z","A"-"Z"] => [a-zA-Z] +# 3 -- ["!","&"] => [!&] +# 4 -- \uXXXX => #xXXXX + +## Rule 1 +s/~\[/\[^/g ; + +## Rule 2 +s/\["([^"]*)"-"([^"]*)"\]/\[$1-$2\]/g ; + +## Rule 3 +## s/\[.*"([^\],"]*)".*\]/\[$1\]/g ; + +## Rule 4 +s/\\u(....)/#x$1/g ; + +print $_ ;
