diff options
Diffstat (limited to 'tests/test-bison-yylloc')
-rw-r--r-- | tests/test-bison-yylloc/Makefile.am | 21 | ||||
-rw-r--r-- | tests/test-bison-yylloc/main.c | 23 | ||||
-rw-r--r-- | tests/test-bison-yylloc/parser.y | 23 | ||||
-rw-r--r-- | tests/test-bison-yylloc/scanner.l | 23 |
4 files changed, 90 insertions, 0 deletions
diff --git a/tests/test-bison-yylloc/Makefile.am b/tests/test-bison-yylloc/Makefile.am index 3a19515..308242e 100644 --- a/tests/test-bison-yylloc/Makefile.am +++ b/tests/test-bison-yylloc/Makefile.am @@ -1,3 +1,24 @@ +# This file is part of flex. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: + +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. + +# Neither the name of the University nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE. + BISON = @BISON@ FLEX = $(top_builddir)/flex diff --git a/tests/test-bison-yylloc/main.c b/tests/test-bison-yylloc/main.c index 83a7a94..082c88c 100644 --- a/tests/test-bison-yylloc/main.c +++ b/tests/test-bison-yylloc/main.c @@ -1,3 +1,26 @@ +/* + * This file is part of flex. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. + */ + #include "parser.h" #include "scanner.h" diff --git a/tests/test-bison-yylloc/parser.y b/tests/test-bison-yylloc/parser.y index bcddcde..ac51bcd 100644 --- a/tests/test-bison-yylloc/parser.y +++ b/tests/test-bison-yylloc/parser.y @@ -1,3 +1,26 @@ +/* + * This file is part of flex. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. + */ + /* How to compile: bison --defines --output-file="parser.c" --name-prefix="test" parser.y diff --git a/tests/test-bison-yylloc/scanner.l b/tests/test-bison-yylloc/scanner.l index a5724ed..ed22fe8 100644 --- a/tests/test-bison-yylloc/scanner.l +++ b/tests/test-bison-yylloc/scanner.l @@ -1,3 +1,26 @@ +/* + * This file is part of flex. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. + */ + %{ /* The scanner expects to link to bison yylval . */ #include <stdio.h> |