From a309103c7907ce88b60f6eeef8cff9fc2f8d81ac Mon Sep 17 00:00:00 2001 From: Robin Jadoul Date: Mon, 30 Jan 2017 15:53:19 +0100 Subject: [PATCH] Add license --- CMakeLists.txt | 21 ++++++++++++++++ Doxyfile.in | 22 +++++++++++++++++ LICENSE | 21 ++++++++++++++++ README.md | 3 +++ examples/CMakeLists.txt | 21 ++++++++++++++++ examples/SyntaxHighlighter/CMakeLists.txt | 21 ++++++++++++++++ .../SyntaxHighlighter/include/highlighter.h | 24 ++++++++++++++++++- .../SyntaxHighlighter/src/attributelexer.lxs | 21 ++++++++++++++++ .../SyntaxHighlighter/src/highlighter.cpp | 23 ++++++++++++++++++ examples/SyntaxHighlighter/src/main.cpp | 23 ++++++++++++++++++ examples/SyntaxHighlighter/src/xmllexer.lxs | 21 ++++++++++++++++ examples/keywords/CMakeLists.txt | 21 ++++++++++++++++ examples/keywords/keywordsLexer.lxs | 21 ++++++++++++++++ examples/keywords/main.cpp | 23 ++++++++++++++++++ examples/leopard/CMakeLists.txt | 21 ++++++++++++++++ examples/leopard/lexer.lxs | 21 ++++++++++++++++ examples/leopard/main.cpp | 23 ++++++++++++++++++ include/Lexesis/automata.h | 23 ++++++++++++++++++ include/Lexesis/backend.h | 23 ++++++++++++++++++ include/Lexesis/backendmanager.h | 23 ++++++++++++++++++ include/Lexesis/backends/cpp.h | 23 ++++++++++++++++++ include/Lexesis/driver.h | 23 ++++++++++++++++++ include/Lexesis/inputparser.h | 23 ++++++++++++++++++ include/Lexesis/re.h | 23 ++++++++++++++++++ include/Lexesis/template.h | 23 ++++++++++++++++++ run_tests.py | 21 ++++++++++++++++ src/CMakeLists.txt | 21 ++++++++++++++++ src/automata.cpp | 23 ++++++++++++++++++ src/backend.cpp | 23 ++++++++++++++++++ src/backendmanager.cpp | 23 ++++++++++++++++++ src/backends/cpp.cpp | 23 ++++++++++++++++++ src/config.h.in | 23 ++++++++++++++++++ src/driver.cpp | 23 ++++++++++++++++++ src/inputparser.cpp | 23 ++++++++++++++++++ src/main.cpp | 23 ++++++++++++++++++ src/re.cpp | 23 ++++++++++++++++++ src/regexLexer.lxs | 21 ++++++++++++++++ src/template.cpp | 23 ++++++++++++++++++ src/test.cpp | 23 ++++++++++++++++++ templates/c++/lexer.cpp | 11 +++++++++ templates/c++/lexer.h | 11 +++++++++ 41 files changed, 872 insertions(+), 1 deletion(-) create mode 100644 LICENSE diff --git a/CMakeLists.txt b/CMakeLists.txt index 13ad5f2..330ec3d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,24 @@ +# Lexesis - A language agnostic lexical analyser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul +# +# 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(Lexesis VERSION 1.0) diff --git a/Doxyfile.in b/Doxyfile.in index e482b1b..989a0a3 100644 --- a/Doxyfile.in +++ b/Doxyfile.in @@ -1,3 +1,25 @@ +# Lexesis - A language agnostic lexical analyser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul +# +# 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..54e3a5f --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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/README.md b/README.md index b004a82..5a1f2df 100644 --- a/README.md +++ b/README.md @@ -137,3 +137,6 @@ The *keywords* example simply prints the lexed token type, along with its conten ## Authors * Thomas Avé * Robin Jadoul + +## 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/examples/CMakeLists.txt b/examples/CMakeLists.txt index 49a0997..2b1e61a 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,3 +1,24 @@ +# Lexesis - A language agnostic lexical analyser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul +# +# 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(keywords) add_subdirectory(SyntaxHighlighter) add_subdirectory(leopard) diff --git a/examples/SyntaxHighlighter/CMakeLists.txt b/examples/SyntaxHighlighter/CMakeLists.txt index 54c36c5..1e99ccd 100644 --- a/examples/SyntaxHighlighter/CMakeLists.txt +++ b/examples/SyntaxHighlighter/CMakeLists.txt @@ -1,3 +1,24 @@ +# Lexesis - A language agnostic lexical analyser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul +# +# 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. + find_program(LEXESIS_EXE Lexesis PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../build/bin") add_custom_command(DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/xmllexer.lxs" diff --git a/examples/SyntaxHighlighter/include/highlighter.h b/examples/SyntaxHighlighter/include/highlighter.h index ffbc4ca..c76353f 100644 --- a/examples/SyntaxHighlighter/include/highlighter.h +++ b/examples/SyntaxHighlighter/include/highlighter.h @@ -1,4 +1,26 @@ -#pragma once +/* + * Lexesis - A language agnostic lexical analyser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul + * + * 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 HIGHLIGHTER_H #define HIGHLIGHTER_H diff --git a/examples/SyntaxHighlighter/src/attributelexer.lxs b/examples/SyntaxHighlighter/src/attributelexer.lxs index 67b6129..989259a 100644 --- a/examples/SyntaxHighlighter/src/attributelexer.lxs +++ b/examples/SyntaxHighlighter/src/attributelexer.lxs @@ -1,3 +1,24 @@ +# Lexesis - A language agnostic lexical analyser generator +# Copyrightb/libpng License Copyright (c) © 2016-2017 Thomas Avé, Robin Jadoul +# +# 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 + ELEMENT = diff --git a/examples/SyntaxHighlighter/src/main.cpp b/examples/SyntaxHighlighter/src/main.cpp index a07ed21..e5c24c5 100644 --- a/examples/SyntaxHighlighter/src/main.cpp +++ b/examples/SyntaxHighlighter/src/main.cpp @@ -1,3 +1,26 @@ +/* + * Lexesis - A language agnostic lexical analyser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul + * + * 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 + */ + #include "highlighter.h" #include diff --git a/examples/SyntaxHighlighter/src/xmllexer.lxs b/examples/SyntaxHighlighter/src/xmllexer.lxs index d9c87bd..3cfa9be 100644 --- a/examples/SyntaxHighlighter/src/xmllexer.lxs +++ b/examples/SyntaxHighlighter/src/xmllexer.lxs @@ -1,3 +1,24 @@ +# Lexesis - A language agnostic lexical analyser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul +# +# 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 + COMMENT = TAG = ]*> CONTENT = [^<>]* diff --git a/examples/keywords/CMakeLists.txt b/examples/keywords/CMakeLists.txt index bf44e97..17e2e7f 100644 --- a/examples/keywords/CMakeLists.txt +++ b/examples/keywords/CMakeLists.txt @@ -1,3 +1,24 @@ +# Lexesis - A language agnostic lexical analyser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul +# +# 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. + find_program(LEXESIS_EXE Lexesis PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../build/bin") add_custom_command(DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/keywordsLexer.lxs" diff --git a/examples/keywords/keywordsLexer.lxs b/examples/keywords/keywordsLexer.lxs index 5af824f..8d4fcc2 100644 --- a/examples/keywords/keywordsLexer.lxs +++ b/examples/keywords/keywordsLexer.lxs @@ -1,3 +1,24 @@ +# Lexesis - A language agnostic lexical analyser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul +# +# 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. + MODULE = (M|m)odule END = [Ee]nd IF = if|If diff --git a/examples/keywords/main.cpp b/examples/keywords/main.cpp index 0f4ecb1..22d1caf 100644 --- a/examples/keywords/main.cpp +++ b/examples/keywords/main.cpp @@ -1,3 +1,26 @@ +/* +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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 "KeywordsLexer.h" #include diff --git a/examples/leopard/CMakeLists.txt b/examples/leopard/CMakeLists.txt index 8eafb06..11b82b0 100644 --- a/examples/leopard/CMakeLists.txt +++ b/examples/leopard/CMakeLists.txt @@ -1,3 +1,24 @@ +# Lexesis - A language agnostic lexical analyser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul +# +# 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. + find_program(LEXESIS_EXE Lexesis PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../build/bin") add_custom_command(DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/lexer.lxs" diff --git a/examples/leopard/lexer.lxs b/examples/leopard/lexer.lxs index 6c05073..bdd7f09 100644 --- a/examples/leopard/lexer.lxs +++ b/examples/leopard/lexer.lxs @@ -1,3 +1,24 @@ +# Lexesis - A language agnostic lexical analyser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul +# +# 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. + # https://xkcd.com/1031/ KEYBOARD_CAP = Keyboard KEYBOARD = [kK][eE][yY][bB][oO][aA][rR][dD] diff --git a/examples/leopard/main.cpp b/examples/leopard/main.cpp index cc4f0fc..479973b 100644 --- a/examples/leopard/main.cpp +++ b/examples/leopard/main.cpp @@ -1,3 +1,26 @@ +/* + * Lexesis - A language agnostic lexical analyser generator + * Copyright © 2016-2017 Thomas Avé, Robin Jadoul + * + * 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 "Lexer.h" #include diff --git a/include/Lexesis/automata.h b/include/Lexesis/automata.h index 355cd71..b21e624 100644 --- a/include/Lexesis/automata.h +++ b/include/Lexesis/automata.h @@ -1,3 +1,26 @@ +/* +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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. + */ + /** * Lexesis/automata.h * diff --git a/include/Lexesis/backend.h b/include/Lexesis/backend.h index e260f1b..58be5d8 100644 --- a/include/Lexesis/backend.h +++ b/include/Lexesis/backend.h @@ -1,3 +1,26 @@ +/* +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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 LEXESIS_BACKEND_H #define LEXESIS_BACKEND_H diff --git a/include/Lexesis/backendmanager.h b/include/Lexesis/backendmanager.h index e734ec5..cf1c6e2 100644 --- a/include/Lexesis/backendmanager.h +++ b/include/Lexesis/backendmanager.h @@ -1,3 +1,26 @@ +/* +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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 LEXESIS_BACKENDMANAGER_H #define LEXESIS_BACKENDMANAGER_H diff --git a/include/Lexesis/backends/cpp.h b/include/Lexesis/backends/cpp.h index 0e86b1f..78cc146 100644 --- a/include/Lexesis/backends/cpp.h +++ b/include/Lexesis/backends/cpp.h @@ -1,3 +1,26 @@ +/* +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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 LEXESIS_BACKENDS_CPP_H #define LEXESIS_BACKENDS_CPP_H diff --git a/include/Lexesis/driver.h b/include/Lexesis/driver.h index 766f39b..facfe2e 100644 --- a/include/Lexesis/driver.h +++ b/include/Lexesis/driver.h @@ -1,3 +1,26 @@ +/* +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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 LEXESIS_DRIVER_H #define LEXESIS_DRIVER_H diff --git a/include/Lexesis/inputparser.h b/include/Lexesis/inputparser.h index fa6c52e..a55141a 100644 --- a/include/Lexesis/inputparser.h +++ b/include/Lexesis/inputparser.h @@ -1,3 +1,26 @@ +/* +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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 INPUT_PARSER_H #define INPUT_PARSER_H diff --git a/include/Lexesis/re.h b/include/Lexesis/re.h index 20b0bcb..6040c21 100644 --- a/include/Lexesis/re.h +++ b/include/Lexesis/re.h @@ -1,3 +1,26 @@ +/* +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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 RE_H #define RE_H diff --git a/include/Lexesis/template.h b/include/Lexesis/template.h index 7425baf..070a2ab 100644 --- a/include/Lexesis/template.h +++ b/include/Lexesis/template.h @@ -1,3 +1,26 @@ +/* +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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 LEXESIS_TEMPLATE_H #define LEXESIS_TEMPLATE_H diff --git a/run_tests.py b/run_tests.py index ceea474..4c9e98f 100755 --- a/run_tests.py +++ b/run_tests.py @@ -1,4 +1,25 @@ #!/usr/bin/python3 +# Lexesis - A language agnostic lexical analyser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul +# +# 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__)), "tests") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 38c0c15..408a71e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,3 +1,24 @@ +# Lexesis - A language agnostic lexical analyser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul +# +# 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/automata.cpp b/src/automata.cpp index 5cf1b09..1928e87 100644 --- a/src/automata.cpp +++ b/src/automata.cpp @@ -1,3 +1,26 @@ +/* +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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 "Lexesis/automata.h" #include diff --git a/src/backend.cpp b/src/backend.cpp index bb6aad8..b35a0fa 100644 --- a/src/backend.cpp +++ b/src/backend.cpp @@ -1,3 +1,26 @@ +/* +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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 "Lexesis/backend.h" #include "config.h" diff --git a/src/backendmanager.cpp b/src/backendmanager.cpp index 5b99e88..d8bfb03 100644 --- a/src/backendmanager.cpp +++ b/src/backendmanager.cpp @@ -1,3 +1,26 @@ +/* +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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 "Lexesis/backendmanager.h" #include "Lexesis/backend.h" diff --git a/src/backends/cpp.cpp b/src/backends/cpp.cpp index 7a52d3e..eeb2be6 100644 --- a/src/backends/cpp.cpp +++ b/src/backends/cpp.cpp @@ -1,3 +1,26 @@ +/* +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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 "Lexesis/backends/cpp.h" #include diff --git a/src/config.h.in b/src/config.h.in index 561aa3e..baca6b8 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -1,3 +1,26 @@ +/* +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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 fe7e87d..e858433 100644 --- a/src/driver.cpp +++ b/src/driver.cpp @@ -1,3 +1,26 @@ +/* +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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 "Lexesis/driver.h" #include "Lexesis/inputparser.h" #include "Lexesis/automata.h" diff --git a/src/inputparser.cpp b/src/inputparser.cpp index 4485eb0..5da95bd 100644 --- a/src/inputparser.cpp +++ b/src/inputparser.cpp @@ -1,3 +1,26 @@ +/* +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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 "Lexesis/inputparser.h" #include diff --git a/src/main.cpp b/src/main.cpp index 638ad6e..41b7551 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,3 +1,26 @@ +/* +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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 "Lexesis/backendmanager.h" #include "Lexesis/backends/cpp.h" #include "Lexesis/driver.h" diff --git a/src/re.cpp b/src/re.cpp index 8c32b13..96f12a7 100644 --- a/src/re.cpp +++ b/src/re.cpp @@ -1,3 +1,26 @@ +/* +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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 "Lexesis/re.h" #include "Lexesis/RegexLexer.h" diff --git a/src/regexLexer.lxs b/src/regexLexer.lxs index 9ad4443..875d665 100644 --- a/src/regexLexer.lxs +++ b/src/regexLexer.lxs @@ -1,3 +1,24 @@ +# Lexesis - A language agnostic lexical analyser generator +# Copyright © 2016-2017 Thomas Avé, Robin Jadoul +# +# 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. + # \[ # ( ^ ( \]-? | - | X' ) # | \]-? | - | Y' ) diff --git a/src/template.cpp b/src/template.cpp index 7a05707..e76f555 100644 --- a/src/template.cpp +++ b/src/template.cpp @@ -1,3 +1,26 @@ +/* +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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 "Lexesis/template.h" #include "mstch/mstch.hpp" diff --git a/src/test.cpp b/src/test.cpp index abc3f2d..20d41e6 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -1,3 +1,26 @@ +/* +Lexesis - A language agnostic lexical analyser generator +Copyright © 2016-2017 Thomas Avé, Robin Jadoul + +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 "Lexesis/automata.h" #include "Lexesis/driver.h" #include "Lexesis/reParser.h" diff --git a/templates/c++/lexer.cpp b/templates/c++/lexer.cpp index 0cc09bb..eaa09fb 100644 --- a/templates/c++/lexer.cpp +++ b/templates/c++/lexer.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" #include diff --git a/templates/c++/lexer.h b/templates/c++/lexer.h index 4c84556..cdc319f 100644 --- a/templates/c++/lexer.h +++ b/templates/c++/lexer.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 LEXER_{{name}}_H #define LEXER_{{name}}_H