From d7586315804a11de13ead5de10b4ddb22057f6af Mon Sep 17 00:00:00 2001 From: Robin Jadoul Date: Mon, 30 Jan 2017 16:34:56 +0100 Subject: [PATCH] Add license information --- CMakeLists.txt | 21 ++++++++++++++++++++ Doxyfile.in | 21 ++++++++++++++++++++ LICENSE | 21 ++++++++++++++++++++ Parsodus-completion.bash | 21 ++++++++++++++++++++ README.md | 3 +++ cmake/ParsodusConfig.cmake | 21 ++++++++++++++++++++ examples/CMakeLists.txt | 21 ++++++++++++++++++++ examples/brainfuck/CMakeLists.txt | 21 ++++++++++++++++++++ examples/brainfuck/bfLexer.lxs | 21 ++++++++++++++++++++ examples/brainfuck/bfParser.pds | 21 ++++++++++++++++++++ examples/brainfuck/generator.cpp | 23 ++++++++++++++++++++++ examples/brainfuck/generator.h | 23 ++++++++++++++++++++++ examples/brainfuck/instruction.h | 23 ++++++++++++++++++++++ examples/brainfuck/main.cpp | 23 ++++++++++++++++++++++ examples/brainfuck/parser.cpp | 23 ++++++++++++++++++++++ examples/brainfuck/parser.h | 23 ++++++++++++++++++++++ examples/calc/AST.cpp | 23 ++++++++++++++++++++++ examples/calc/AST.h | 23 ++++++++++++++++++++++ examples/calc/CMakeLists.txt | 21 ++++++++++++++++++++ examples/calc/calcLexer.lxs | 21 ++++++++++++++++++++ examples/calc/calcParser.pds | 21 ++++++++++++++++++++ examples/calc/main.cpp | 23 ++++++++++++++++++++++ examples/calc/parser.cpp | 23 ++++++++++++++++++++++ examples/calc/parser.h | 23 ++++++++++++++++++++++ examples/json/CMakeLists.txt | 21 ++++++++++++++++++++ examples/json/JSONLexer.lxs | 21 ++++++++++++++++++++ examples/json/JSONParser.pds | 21 ++++++++++++++++++++ examples/json/json.cpp | 23 ++++++++++++++++++++++ examples/json/json.h | 23 ++++++++++++++++++++++ examples/json/main.cpp | 23 ++++++++++++++++++++++ examples/json/parser.cpp | 23 ++++++++++++++++++++++ examples/json/parser.h | 23 ++++++++++++++++++++++ include/Parsodus/backend.h | 23 ++++++++++++++++++++++ include/Parsodus/backendmanager.h | 23 ++++++++++++++++++++++ include/Parsodus/backends/cppLR.h | 23 ++++++++++++++++++++++ include/Parsodus/config.h | 23 ++++++++++++++++++++++ include/Parsodus/driver.h | 23 ++++++++++++++++++++++ include/Parsodus/grammar.h | 23 ++++++++++++++++++++++ include/Parsodus/inputparser.h | 23 ++++++++++++++++++++++ include/Parsodus/lrtables/LALR1Itemset.h | 23 ++++++++++++++++++++++ include/Parsodus/lrtables/LR0Item.h | 23 ++++++++++++++++++++++ include/Parsodus/lrtables/LR0Itemset.h | 23 ++++++++++++++++++++++ include/Parsodus/lrtables/LR0ItemsetBase.h | 23 ++++++++++++++++++++++ include/Parsodus/lrtables/LR1Item.h | 23 ++++++++++++++++++++++ include/Parsodus/lrtables/LR1Itemset.h | 23 ++++++++++++++++++++++ include/Parsodus/lrtables/LR1ItemsetBase.h | 23 ++++++++++++++++++++++ include/Parsodus/lrtables/SLR1Itemset.h | 23 ++++++++++++++++++++++ include/Parsodus/lrtables/generator.h | 23 ++++++++++++++++++++++ include/Parsodus/lrtables/table.h | 23 ++++++++++++++++++++++ include/Parsodus/parser.h | 23 ++++++++++++++++++++++ include/Parsodus/parsodusParser.h | 23 ++++++++++++++++++++++ include/Parsodus/util/firstset.h | 23 ++++++++++++++++++++++ include/Parsodus/util/followset.h | 23 ++++++++++++++++++++++ include/Parsodus/util/parserType.h | 23 ++++++++++++++++++++++ include/Parsodus/util/symbols.h | 23 ++++++++++++++++++++++ parser.example.pds | 17 ---------------- run_tests.py | 22 +++++++++++++++++++++ src/CMakeLists.txt | 21 ++++++++++++++++++++ src/backend.cpp | 23 ++++++++++++++++++++++ src/backendmanager.cpp | 23 ++++++++++++++++++++++ src/config.h.in | 23 ++++++++++++++++++++++ src/driver.cpp | 23 ++++++++++++++++++++++ src/inputparser.cpp | 23 ++++++++++++++++++++++ src/lrtables/LALR1Itemset.cpp | 23 ++++++++++++++++++++++ src/lrtables/LR0Item.cpp | 23 ++++++++++++++++++++++ src/lrtables/LR0Itemset.cpp | 23 ++++++++++++++++++++++ src/lrtables/LR1Item.cpp | 23 ++++++++++++++++++++++ src/lrtables/LR1Itemset.cpp | 23 ++++++++++++++++++++++ src/lrtables/SLR1Itemset.cpp | 23 ++++++++++++++++++++++ src/main.cpp | 23 ++++++++++++++++++++++ src/parser.cpp | 23 ++++++++++++++++++++++ src/parsodusLexer.lxs | 21 ++++++++++++++++++++ src/parsodusParser.pds | 21 ++++++++++++++++++++ src/util/firstset.cpp | 23 ++++++++++++++++++++++ src/util/followset.cpp | 23 ++++++++++++++++++++++ templates/c++/lr.cpp | 11 +++++++++++ templates/c++/lr.h | 11 +++++++++++ tests/CMakeLists.txt | 21 ++++++++++++++++++++ tests/lr0_shift-red.cpp | 23 ++++++++++++++++++++++ tests/lr1_only.cpp | 23 ++++++++++++++++++++++ 80 files changed, 1734 insertions(+), 17 deletions(-) create mode 100644 LICENSE delete mode 100644 parser.example.pds diff --git a/CMakeLists.txt b/CMakeLists.txt index 95b53e3..63abcd0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,24 @@ +# Parsodus - A language agnostic parser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert +# +# 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. + cmake_minimum_required(VERSION 3.2.2) project(Parsodus VERSION 1.0) diff --git a/Doxyfile.in b/Doxyfile.in index c2f9ea7..bbd722a 100644 --- a/Doxyfile.in +++ b/Doxyfile.in @@ -1,3 +1,24 @@ +# Parsodus - A language agnostic parser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert +# +# 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. + # Doxyfile 1.8.9.1 # This file describes the settings to be used by the documentation system diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c551d80 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +Parsodus - A language agnostic parser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + +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. + diff --git a/Parsodus-completion.bash b/Parsodus-completion.bash index b8a0aff..c5bf167 100644 --- a/Parsodus-completion.bash +++ b/Parsodus-completion.bash @@ -1,3 +1,24 @@ +# Parsodus - A language agnostic parser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert +# +# 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. + _Parsodus_completion () { local langs diff --git a/README.md b/README.md index f1fc3b8..165e84c 100644 --- a/README.md +++ b/README.md @@ -133,3 +133,6 @@ Feel free to play around and experiment with them. * Thomas Avé * Robin Jadoul * Kobe Wullaert + +## License +This program is distributed under the terms of the MIT license. The generated code falls under the permissive zlib/libpng license. diff --git a/cmake/ParsodusConfig.cmake b/cmake/ParsodusConfig.cmake index 0d392ea..974d515 100644 --- a/cmake/ParsodusConfig.cmake +++ b/cmake/ParsodusConfig.cmake @@ -1,3 +1,24 @@ +# Parsodus - A language agnostic parser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert +# +# 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. + get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) include(${SELF_DIR}/ParsodusTargets.cmake) get_filename_component(PARSODUS_INCLUDE_DIRS "${SELF_DIR}/../../../include/" ABSOLUTE) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index f22da4b..739d16a 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,3 +1,24 @@ +# Parsodus - A language agnostic parser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert +# +# 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. + add_subdirectory(json) add_subdirectory(calc) add_subdirectory(brainfuck) diff --git a/examples/brainfuck/CMakeLists.txt b/examples/brainfuck/CMakeLists.txt index 9f12abd..ba1c890 100644 --- a/examples/brainfuck/CMakeLists.txt +++ b/examples/brainfuck/CMakeLists.txt @@ -1,3 +1,24 @@ +# Parsodus - A language agnostic parser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert +# +# 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. + add_custom_command(DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/bfLexer.lxs" COMMAND "${LEXESIS_EXE}" ARGS -d "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/bfLexer.lxs" OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/BfLexer.h" "${CMAKE_CURRENT_BINARY_DIR}/BfLexer.cpp") diff --git a/examples/brainfuck/bfLexer.lxs b/examples/brainfuck/bfLexer.lxs index 7dd40dc..cd94af7 100644 --- a/examples/brainfuck/bfLexer.lxs +++ b/examples/brainfuck/bfLexer.lxs @@ -1,3 +1,24 @@ +# Parsodus - A language agnostic parser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert +# +# 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. + PLUS = \+ MINUS = - GREATER = > diff --git a/examples/brainfuck/bfParser.pds b/examples/brainfuck/bfParser.pds index 1968618..7f5b1a3 100644 --- a/examples/brainfuck/bfParser.pds +++ b/examples/brainfuck/bfParser.pds @@ -1,3 +1,24 @@ +# Parsodus - A language agnostic parser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert +# +# 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. + parser: SLR(1) lexesis: bfLexer.lxs terminals: diff --git a/examples/brainfuck/generator.cpp b/examples/brainfuck/generator.cpp index 7ba5bf2..acbaf45 100644 --- a/examples/brainfuck/generator.cpp +++ b/examples/brainfuck/generator.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "generator.h" #include "instruction.h" #include diff --git a/examples/brainfuck/generator.h b/examples/brainfuck/generator.h index 4e38f7d..9e93ed1 100644 --- a/examples/brainfuck/generator.h +++ b/examples/brainfuck/generator.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #ifndef GENERATOR_H #define GENERATOR_H diff --git a/examples/brainfuck/instruction.h b/examples/brainfuck/instruction.h index d91701f..c658454 100644 --- a/examples/brainfuck/instruction.h +++ b/examples/brainfuck/instruction.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef INSTRUCTION_H #define INSTRUCTION_H diff --git a/examples/brainfuck/main.cpp b/examples/brainfuck/main.cpp index 45333ee..ed7a71f 100644 --- a/examples/brainfuck/main.cpp +++ b/examples/brainfuck/main.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "parser.h" #include "BfLexer.h" #include "generator.h" diff --git a/examples/brainfuck/parser.cpp b/examples/brainfuck/parser.cpp index 379d137..15ed2fd 100644 --- a/examples/brainfuck/parser.cpp +++ b/examples/brainfuck/parser.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "parser.h" #include "instruction.h" diff --git a/examples/brainfuck/parser.h b/examples/brainfuck/parser.h index 327b2b6..7e2b010 100644 --- a/examples/brainfuck/parser.h +++ b/examples/brainfuck/parser.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSER_H #define PARSER_H diff --git a/examples/calc/AST.cpp b/examples/calc/AST.cpp index 5bccb4d..0e7b07a 100644 --- a/examples/calc/AST.cpp +++ b/examples/calc/AST.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "AST.h" #include diff --git a/examples/calc/AST.h b/examples/calc/AST.h index 2538539..97c71a0 100644 --- a/examples/calc/AST.h +++ b/examples/calc/AST.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef CALC_AST_H #define CALC_AST_H diff --git a/examples/calc/CMakeLists.txt b/examples/calc/CMakeLists.txt index 8f2d821..53976a5 100644 --- a/examples/calc/CMakeLists.txt +++ b/examples/calc/CMakeLists.txt @@ -1,3 +1,24 @@ +# Parsodus - A language agnostic parser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert +# +# 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. + add_custom_command(DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/calcLexer.lxs" COMMAND "${LEXESIS_EXE}" ARGS -d "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/calcLexer.lxs" OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/CalcLexer.h" "${CMAKE_CURRENT_BINARY_DIR}/CalcLexer.cpp") diff --git a/examples/calc/calcLexer.lxs b/examples/calc/calcLexer.lxs index 5a9732b..a35dc5d 100644 --- a/examples/calc/calcLexer.lxs +++ b/examples/calc/calcLexer.lxs @@ -1,3 +1,24 @@ +# Parsodus - A language agnostic parser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert +# +# 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. + COMMA = , FN = fn LPAREN = \( diff --git a/examples/calc/calcParser.pds b/examples/calc/calcParser.pds index ac3481f..6053ef4 100644 --- a/examples/calc/calcParser.pds +++ b/examples/calc/calcParser.pds @@ -1,3 +1,24 @@ +# Parsodus - A language agnostic parser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert +# +# 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. + parser: LALR(1) lexesis: calcLexer.lxs precedence: diff --git a/examples/calc/main.cpp b/examples/calc/main.cpp index 130c3e7..4ac1095 100644 --- a/examples/calc/main.cpp +++ b/examples/calc/main.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "parser.h" #include diff --git a/examples/calc/parser.cpp b/examples/calc/parser.cpp index bece31b..94190ba 100644 --- a/examples/calc/parser.cpp +++ b/examples/calc/parser.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "parser.h" #include diff --git a/examples/calc/parser.h b/examples/calc/parser.h index 2c91055..ba2d036 100644 --- a/examples/calc/parser.h +++ b/examples/calc/parser.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef CALC_PARSER_H #define CALC_PARSER_H diff --git a/examples/json/CMakeLists.txt b/examples/json/CMakeLists.txt index 38ff40f..66101d9 100644 --- a/examples/json/CMakeLists.txt +++ b/examples/json/CMakeLists.txt @@ -1,3 +1,24 @@ +# Parsodus - A language agnostic parser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert +# +# 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. + add_custom_command(DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/JSONLexer.lxs" COMMAND "${LEXESIS_EXE}" ARGS -d "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/JSONLexer.lxs" OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/JSONLexer.h" "${CMAKE_CURRENT_BINARY_DIR}/JSONLexer.cpp") diff --git a/examples/json/JSONLexer.lxs b/examples/json/JSONLexer.lxs index 66ef312..6a6e190 100644 --- a/examples/json/JSONLexer.lxs +++ b/examples/json/JSONLexer.lxs @@ -1,3 +1,24 @@ +# Parsodus - A language agnostic parser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert +# +# 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. + LBRACE = { RBRACE = } LBRACKET = \[ diff --git a/examples/json/JSONParser.pds b/examples/json/JSONParser.pds index 66a84a0..cbc73be 100644 --- a/examples/json/JSONParser.pds +++ b/examples/json/JSONParser.pds @@ -1,3 +1,24 @@ +# Parsodus - A language agnostic parser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert +# +# 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. + parser: SLR(1) lexesis: JSONLexer.lxs terminals: diff --git a/examples/json/json.cpp b/examples/json/json.cpp index 1b339a8..e348389 100644 --- a/examples/json/json.cpp +++ b/examples/json/json.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "json.h" #include #include diff --git a/examples/json/json.h b/examples/json/json.h index a443af2..d7d25d0 100644 --- a/examples/json/json.h +++ b/examples/json/json.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef JSON_H #define JSON_H diff --git a/examples/json/main.cpp b/examples/json/main.cpp index 9f4018d..d6e0c02 100644 --- a/examples/json/main.cpp +++ b/examples/json/main.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "JSONLexer.h" #include "json.h" #include "parser.h" diff --git a/examples/json/parser.cpp b/examples/json/parser.cpp index 17090b7..53dac4b 100644 --- a/examples/json/parser.cpp +++ b/examples/json/parser.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "parser.h" #include #include diff --git a/examples/json/parser.h b/examples/json/parser.h index 71659ee..bb5aec2 100644 --- a/examples/json/parser.h +++ b/examples/json/parser.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSER_H #define PARSER_H diff --git a/include/Parsodus/backend.h b/include/Parsodus/backend.h index 3a10e08..4325ecb 100644 --- a/include/Parsodus/backend.h +++ b/include/Parsodus/backend.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSODUS_BACKEND_H #define PARSODUS_BACKEND_H diff --git a/include/Parsodus/backendmanager.h b/include/Parsodus/backendmanager.h index 27a0695..570bfe3 100644 --- a/include/Parsodus/backendmanager.h +++ b/include/Parsodus/backendmanager.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSODUS_BACKENDMANAGER_H #define PARSODUS_BACKENDMANAGER_H diff --git a/include/Parsodus/backends/cppLR.h b/include/Parsodus/backends/cppLR.h index 2c9cda2..bb1957f 100644 --- a/include/Parsodus/backends/cppLR.h +++ b/include/Parsodus/backends/cppLR.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSODUS_BACKENDS_CPP_H #define PARSODUS_BACKENDS_CPP_H diff --git a/include/Parsodus/config.h b/include/Parsodus/config.h index 1082567..cabd378 100644 --- a/include/Parsodus/config.h +++ b/include/Parsodus/config.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSODUS_CONFIG_H #define PARSODUS_CONFIG_H diff --git a/include/Parsodus/driver.h b/include/Parsodus/driver.h index f9894d7..643877e 100644 --- a/include/Parsodus/driver.h +++ b/include/Parsodus/driver.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSODUS_DRIVER_H #define PARSODUS_DRIVER_H diff --git a/include/Parsodus/grammar.h b/include/Parsodus/grammar.h index ecdd8a3..32ad508 100644 --- a/include/Parsodus/grammar.h +++ b/include/Parsodus/grammar.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSODUS_GRAMMAR_H diff --git a/include/Parsodus/inputparser.h b/include/Parsodus/inputparser.h index 6a69c35..d1ab7fa 100644 --- a/include/Parsodus/inputparser.h +++ b/include/Parsodus/inputparser.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSODUS_INPUT_PARSER_H #define PARSODUS_INPUT_PARSER_H diff --git a/include/Parsodus/lrtables/LALR1Itemset.h b/include/Parsodus/lrtables/LALR1Itemset.h index 83d8141..bd85567 100644 --- a/include/Parsodus/lrtables/LALR1Itemset.h +++ b/include/Parsodus/lrtables/LALR1Itemset.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSODUS_LRTABLES_LALR1ITEMSET_H_TJ1FUOEG #define PARSODUS_LRTABLES_LALR1ITEMSET_H_TJ1FUOEG diff --git a/include/Parsodus/lrtables/LR0Item.h b/include/Parsodus/lrtables/LR0Item.h index 6c9029a..fec4047 100644 --- a/include/Parsodus/lrtables/LR0Item.h +++ b/include/Parsodus/lrtables/LR0Item.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSODUS_LRTABLES_LR0ITEM_H_3RNST1YA #define PARSODUS_LRTABLES_LR0ITEM_H_3RNST1YA diff --git a/include/Parsodus/lrtables/LR0Itemset.h b/include/Parsodus/lrtables/LR0Itemset.h index ec2be29..e12baa3 100644 --- a/include/Parsodus/lrtables/LR0Itemset.h +++ b/include/Parsodus/lrtables/LR0Itemset.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef LRTABLES_LR0ITEMSET_H_HTSWOGFB #define LRTABLES_LR0ITEMSET_H_HTSWOGFB diff --git a/include/Parsodus/lrtables/LR0ItemsetBase.h b/include/Parsodus/lrtables/LR0ItemsetBase.h index 3bc54e7..57a7ebe 100644 --- a/include/Parsodus/lrtables/LR0ItemsetBase.h +++ b/include/Parsodus/lrtables/LR0ItemsetBase.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSODUS_LRTABLES_LR0ITEMSETBASE_H_GGIPISTD #define PARSODUS_LRTABLES_LR0ITEMSETBASE_H_GGIPISTD diff --git a/include/Parsodus/lrtables/LR1Item.h b/include/Parsodus/lrtables/LR1Item.h index 528f28a..b7d3996 100644 --- a/include/Parsodus/lrtables/LR1Item.h +++ b/include/Parsodus/lrtables/LR1Item.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSODUS_LRTABLES_LR1ITEM_H_OEUCDMZL #define PARSODUS_LRTABLES_LR1ITEM_H_OEUCDMZL diff --git a/include/Parsodus/lrtables/LR1Itemset.h b/include/Parsodus/lrtables/LR1Itemset.h index 1727b80..8e14066 100644 --- a/include/Parsodus/lrtables/LR1Itemset.h +++ b/include/Parsodus/lrtables/LR1Itemset.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSODUS_LRTABLES_LR1ITEMSET_H_AFGBM4VN #define PARSODUS_LRTABLES_LR1ITEMSET_H_AFGBM4VN diff --git a/include/Parsodus/lrtables/LR1ItemsetBase.h b/include/Parsodus/lrtables/LR1ItemsetBase.h index e9f7b28..954b91b 100644 --- a/include/Parsodus/lrtables/LR1ItemsetBase.h +++ b/include/Parsodus/lrtables/LR1ItemsetBase.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSODUS_LRTABLES_LR1ITEMSETBASE_H_EREKWQSM #define PARSODUS_LRTABLES_LR1ITEMSETBASE_H_EREKWQSM diff --git a/include/Parsodus/lrtables/SLR1Itemset.h b/include/Parsodus/lrtables/SLR1Itemset.h index dc0b935..f80f10a 100644 --- a/include/Parsodus/lrtables/SLR1Itemset.h +++ b/include/Parsodus/lrtables/SLR1Itemset.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef LRTABLES_SLR1ITEMSET_H_PN9QZCDB #define LRTABLES_SLR1ITEMSET_H_PN9QZCDB diff --git a/include/Parsodus/lrtables/generator.h b/include/Parsodus/lrtables/generator.h index 464f550..03b4be0 100644 --- a/include/Parsodus/lrtables/generator.h +++ b/include/Parsodus/lrtables/generator.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSODUS_LRTABLES_GENERATOR_H_YW3GIUNH #define PARSODUS_LRTABLES_GENERATOR_H_YW3GIUNH diff --git a/include/Parsodus/lrtables/table.h b/include/Parsodus/lrtables/table.h index 222ed1c..d08eb32 100644 --- a/include/Parsodus/lrtables/table.h +++ b/include/Parsodus/lrtables/table.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSODUS_LRTABLES_TABLE_H_4JGXOTCZ #define PARSODUS_LRTABLES_TABLE_H_4JGXOTCZ diff --git a/include/Parsodus/parser.h b/include/Parsodus/parser.h index 6fc5836..749d187 100644 --- a/include/Parsodus/parser.h +++ b/include/Parsodus/parser.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSODUS_PARSER_H #define PARSODUS_PARSER_H diff --git a/include/Parsodus/parsodusParser.h b/include/Parsodus/parsodusParser.h index cd5a97c..74949af 100644 --- a/include/Parsodus/parsodusParser.h +++ b/include/Parsodus/parsodusParser.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSODUS_PARSER_parsodusParser_H #define PARSODUS_PARSER_parsodusParser_H diff --git a/include/Parsodus/util/firstset.h b/include/Parsodus/util/firstset.h index 227b6ac..a27e359 100644 --- a/include/Parsodus/util/firstset.h +++ b/include/Parsodus/util/firstset.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSODUS_FIRSTSET_H_Q6U5VBG0 #define PARSODUS_FIRSTSET_H_Q6U5VBG0 diff --git a/include/Parsodus/util/followset.h b/include/Parsodus/util/followset.h index 5683164..6a66fde 100644 --- a/include/Parsodus/util/followset.h +++ b/include/Parsodus/util/followset.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef UTIL_FOLLOWSET_H_WIGGZMRF #define UTIL_FOLLOWSET_H_WIGGZMRF diff --git a/include/Parsodus/util/parserType.h b/include/Parsodus/util/parserType.h index 945188f..72eeb1a 100644 --- a/include/Parsodus/util/parserType.h +++ b/include/Parsodus/util/parserType.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef PARSODUS_UTIL_PARSER_TYPE #define PARSODUS_UTIL_PARSER_TYPE diff --git a/include/Parsodus/util/symbols.h b/include/Parsodus/util/symbols.h index b501e47..69eba7e 100644 --- a/include/Parsodus/util/symbols.h +++ b/include/Parsodus/util/symbols.h @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #pragma once #ifndef UTIL_SYMBOLS_H_2IFHDWBY #define UTIL_SYMBOLS_H_2IFHDWBY diff --git a/parser.example.pds b/parser.example.pds deleted file mode 100644 index d69eb9f..0000000 --- a/parser.example.pds +++ /dev/null @@ -1,17 +0,0 @@ -parser: SLR(1) -lexesis: lexer.lxs -terminals: - "A" - "B" - "C" - "D" -precedence: - left "A" "D" - nonassoc "B" - right "C" -start: -grammar: - ::= [startrule]; - ::= "A" [a, nonassoc 42] - | "B" - ; diff --git a/run_tests.py b/run_tests.py index fdb8663..2102c5e 100755 --- a/run_tests.py +++ b/run_tests.py @@ -1,4 +1,26 @@ #!/usr/bin/python3 + +# Parsodus - A language agnostic parser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert +# +# 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. + import unittest, subprocess, filecmp, argparse, os.path, os, shutil REFERENCE_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), "test_data") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 741902b..31ecc70 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,3 +1,24 @@ +# Parsodus - A language agnostic parser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert +# +# 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. + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h @ONLY) include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/backend.cpp b/src/backend.cpp index ca7eee2..8f17845 100644 --- a/src/backend.cpp +++ b/src/backend.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "Parsodus/backend.h" #include "config.h" diff --git a/src/backendmanager.cpp b/src/backendmanager.cpp index ac5ea4b..2ce55d6 100644 --- a/src/backendmanager.cpp +++ b/src/backendmanager.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "Parsodus/backendmanager.h" #include "Parsodus/backend.h" diff --git a/src/config.h.in b/src/config.h.in index b868bbf..0dc15f9 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #ifndef CONFIG_H #define CONFIG_H diff --git a/src/driver.cpp b/src/driver.cpp index 342a4b1..18d6272 100644 --- a/src/driver.cpp +++ b/src/driver.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "Parsodus/driver.h" #include "Parsodus/inputparser.h" #include "Parsodus/config.h" diff --git a/src/inputparser.cpp b/src/inputparser.cpp index 3c3293b..f269c05 100644 --- a/src/inputparser.cpp +++ b/src/inputparser.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "ParsodusLexer.h" #include "Parsodus/inputparser.h" #include "Parsodus/parser.h" diff --git a/src/lrtables/LALR1Itemset.cpp b/src/lrtables/LALR1Itemset.cpp index e9543c4..0a27850 100644 --- a/src/lrtables/LALR1Itemset.cpp +++ b/src/lrtables/LALR1Itemset.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "Parsodus/lrtables/LALR1Itemset.h" #include diff --git a/src/lrtables/LR0Item.cpp b/src/lrtables/LR0Item.cpp index 54e0af3..3371271 100644 --- a/src/lrtables/LR0Item.cpp +++ b/src/lrtables/LR0Item.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "Parsodus/lrtables/LR0Item.h" namespace pds { diff --git a/src/lrtables/LR0Itemset.cpp b/src/lrtables/LR0Itemset.cpp index 0365e1a..4d620c1 100644 --- a/src/lrtables/LR0Itemset.cpp +++ b/src/lrtables/LR0Itemset.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "Parsodus/lrtables/LR0Itemset.h" namespace pds { diff --git a/src/lrtables/LR1Item.cpp b/src/lrtables/LR1Item.cpp index b203043..0091a4e 100644 --- a/src/lrtables/LR1Item.cpp +++ b/src/lrtables/LR1Item.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "Parsodus/lrtables/LR1Item.h" namespace pds { diff --git a/src/lrtables/LR1Itemset.cpp b/src/lrtables/LR1Itemset.cpp index a0534e3..2d62080 100644 --- a/src/lrtables/LR1Itemset.cpp +++ b/src/lrtables/LR1Itemset.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "Parsodus/lrtables/LR1Itemset.h" namespace pds { diff --git a/src/lrtables/SLR1Itemset.cpp b/src/lrtables/SLR1Itemset.cpp index 5cc5185..a981019 100644 --- a/src/lrtables/SLR1Itemset.cpp +++ b/src/lrtables/SLR1Itemset.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "Parsodus/lrtables/SLR1Itemset.h" #include diff --git a/src/main.cpp b/src/main.cpp index 71d6d3a..60f56a0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include #include #include diff --git a/src/parser.cpp b/src/parser.cpp index 38c8323..1ac1f01 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "Parsodus/parser.h" #include diff --git a/src/parsodusLexer.lxs b/src/parsodusLexer.lxs index 78eff83..e4d1c99 100644 --- a/src/parsodusLexer.lxs +++ b/src/parsodusLexer.lxs @@ -1,3 +1,24 @@ +# Parsodus - A language agnostic parser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert +# +# 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. + PARSER = parser PRECEDENCE = precedence LEXESIS = lexesis diff --git a/src/parsodusParser.pds b/src/parsodusParser.pds index e343fce..8ad126e 100644 --- a/src/parsodusParser.pds +++ b/src/parsodusParser.pds @@ -1,3 +1,24 @@ +# Parsodus - A language agnostic parser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert +# +# 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. + parser: SLR(1) lexesis: parsodusLexer.lxs diff --git a/src/util/firstset.cpp b/src/util/firstset.cpp index 3fba3f6..5a6b1b8 100644 --- a/src/util/firstset.cpp +++ b/src/util/firstset.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "Parsodus/util/firstset.h" #include "Parsodus/grammar.h" diff --git a/src/util/followset.cpp b/src/util/followset.cpp index bd398c1..65081ac 100644 --- a/src/util/followset.cpp +++ b/src/util/followset.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "Parsodus/util/followset.h" #include "Parsodus/util/symbols.h" #include "Parsodus/grammar.h" diff --git a/templates/c++/lr.cpp b/templates/c++/lr.cpp index 10b4edb..806e4b9 100644 --- a/templates/c++/lr.cpp +++ b/templates/c++/lr.cpp @@ -1,3 +1,14 @@ +/* + * This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source distribution. + */ #include "{{name}}.h" #define TABLE {{name}}___Table___{{name}} diff --git a/templates/c++/lr.h b/templates/c++/lr.h index d20497c..c76ba8c 100644 --- a/templates/c++/lr.h +++ b/templates/c++/lr.h @@ -1,3 +1,14 @@ +/* + * This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source distribution. + */ #pragma once #ifndef PARSODUS_PARSER_{{name}}_H #define PARSODUS_PARSER_{{name}}_H diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 321283f..f66065b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,3 +1,24 @@ +# Parsodus - A language agnostic parser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert +# +# 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. + add_executable(Parsodus-test lr0_shift-red.cpp lr1_only.cpp diff --git a/tests/lr0_shift-red.cpp b/tests/lr0_shift-red.cpp index aa90c8c..c8d295c 100644 --- a/tests/lr0_shift-red.cpp +++ b/tests/lr0_shift-red.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include #include #include diff --git a/tests/lr1_only.cpp b/tests/lr1_only.cpp index ba0319e..a95ea2f 100644 --- a/tests/lr1_only.cpp +++ b/tests/lr1_only.cpp @@ -1,3 +1,26 @@ +/* + * Parsodus - A language agnostic parser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul, Kobe Wullaert + * + * 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. + */ + #include "Parsodus/lrtables/generator.h" #include "Parsodus/lrtables/LR1Itemset.h" #include "Parsodus/lrtables/LALR1Itemset.h"