diff options
author | Vincent Sanders <vincent.sanders@collabora.co.uk> | 2012-09-07 17:25:02 +0100 |
---|---|---|
committer | Vincent Sanders <vincent.sanders@collabora.co.uk> | 2012-09-07 17:25:02 +0100 |
commit | 53a218f08e4a0ab7a2042b774a871eb93f17c90f (patch) | |
tree | 6549dc1aa6dd9ecade7eb3483a4222d3e37778b1 | |
parent | 7ba968e4c33d3a05ff9b23b8e593b400e34a4cad (diff) | |
download | nsgenbind-53a218f08e4a0ab7a2042b774a871eb93f17c90f.tar.gz nsgenbind-53a218f08e4a0ab7a2042b774a871eb93f17c90f.tar.bz2 |
add copyright and licence notices
-rw-r--r-- | COPYING | 19 | ||||
-rw-r--r-- | src/genjsbind-ast.c (renamed from src/jsapi-binding.c) | 13 | ||||
-rw-r--r-- | src/genjsbind-ast.h | 18 | ||||
-rw-r--r-- | src/genjsbind-lexer.l | 8 | ||||
-rw-r--r-- | src/genjsbind-parser.y | 9 | ||||
-rw-r--r-- | src/genjsbind.c | 10 | ||||
-rw-r--r-- | src/jsapi-binding.h | 5 | ||||
-rw-r--r-- | src/options.h | 12 | ||||
-rw-r--r-- | src/webidl-ast.c | 8 | ||||
-rw-r--r-- | src/webidl-ast.h | 13 | ||||
-rw-r--r-- | src/webidl-lexer.l | 10 | ||||
-rw-r--r-- | src/webidl-parser.y | 15 |
12 files changed, 121 insertions, 19 deletions
@@ -0,0 +1,19 @@ +Copyright 2012 Vincent Sanders <vince@netsurf-browser.org> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + +THE SOFTWARE 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/src/jsapi-binding.c b/src/genjsbind-ast.c index 9f1bc7e..ccadc7f 100644 --- a/src/jsapi-binding.c +++ b/src/genjsbind-ast.c @@ -1,10 +1,21 @@ +/* binding generator AST implementation for parser + * + * This file is part of nsgenjsbind. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2012 Vincent Sanders <vince@netsurf-browser.org> + */ + +/** @todo this currently stuffs everything in one global tree, not very nice + */ + #include <stdio.h> #include <stdbool.h> #include <stdlib.h> #include <errno.h> #include <string.h> -#include "jsapi-binding.h" +#include "genjsbind-ast.h" #include "webidl-ast.h" #include "options.h" diff --git a/src/genjsbind-ast.h b/src/genjsbind-ast.h new file mode 100644 index 0000000..d94eda6 --- /dev/null +++ b/src/genjsbind-ast.h @@ -0,0 +1,18 @@ +/* binding file AST interface + * + * This file is part of nsgenjsbind. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2012 Vincent Sanders <vince@netsurf-browser.org> + */ + +#ifndef genjsbind_genjsbind_ast_h +#define genjsbind_genjsbind_ast_h + +int genjsbind_parsefile(char *infilename); +int genjsbind_output(char *outfilename); +int genjsbind_header_comment(char *); +int genjsbind_interface(char *); +int genjsbind_preamble(char *ccode); + +#endif diff --git a/src/genjsbind-lexer.l b/src/genjsbind-lexer.l index 1406872..5044c04 100644 --- a/src/genjsbind-lexer.l +++ b/src/genjsbind-lexer.l @@ -1,7 +1,11 @@ %{ -/* - * binding generator lexer +/* lexer for the binding generation config file + * + * This file is part of nsgenjsbind. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2012 Vincent Sanders <vince@netsurf-browser.org> */ #include <stdbool.h> diff --git a/src/genjsbind-parser.y b/src/genjsbind-parser.y index 1a342ae..9ed4f21 100644 --- a/src/genjsbind-parser.y +++ b/src/genjsbind-parser.y @@ -1,7 +1,10 @@ %{ -/* - * This is a bison parser for genbind +/* parser for the binding generation config file * + * This file is part of nsgenjsbind. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2012 Vincent Sanders <vince@netsurf-browser.org> */ #include <stdio.h> @@ -10,7 +13,7 @@ #include "genjsbind-parser.h" #include "genjsbind-lexer.h" #include "webidl-ast.h" -#include "jsapi-binding.h" +#include "genjsbind-ast.h" char *errtxt; diff --git a/src/genjsbind.c b/src/genjsbind.c index 6bc84b3..dd5b242 100644 --- a/src/genjsbind.c +++ b/src/genjsbind.c @@ -1,3 +1,11 @@ +/* binding generator main and command line parsing + * + * This file is part of nsgenjsbind. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2012 Vincent Sanders <vince@netsurf-browser.org> + */ + #include <stdio.h> #include <stdlib.h> #include <stdbool.h> @@ -6,7 +14,7 @@ #include <getopt.h> #include <errno.h> -#include "jsapi-binding.h" +#include "genjsbind-ast.h" #include "options.h" struct options *options; diff --git a/src/jsapi-binding.h b/src/jsapi-binding.h deleted file mode 100644 index 33f9776..0000000 --- a/src/jsapi-binding.h +++ /dev/null @@ -1,5 +0,0 @@ -int genjsbind_parsefile(char *infilename); -int genjsbind_output(char *outfilename); -int genjsbind_header_comment(char *); -int genjsbind_interface(char *); -int genjsbind_preamble(char *ccode); diff --git a/src/options.h b/src/options.h index 47f3c11..041f4cd 100644 --- a/src/options.h +++ b/src/options.h @@ -1,3 +1,14 @@ +/* binding generator options + * + * This file is part of nsgenjsbind. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2012 Vincent Sanders <vince@netsurf-browser.org> + */ + +#ifndef genjsbind_options_h +#define genjsbind_options_h + struct options { char *outfilename; char *infilename; @@ -8,3 +19,4 @@ struct options { extern struct options *options; +#endif diff --git a/src/webidl-ast.c b/src/webidl-ast.c index 95b271d..1eddd68 100644 --- a/src/webidl-ast.c +++ b/src/webidl-ast.c @@ -1,3 +1,11 @@ +/* AST generator for the WEB IDL parser + * + * This file is part of nsgenjsbind. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2012 Vincent Sanders <vince@netsurf-browser.org> + */ + #include <stdbool.h> #include <stdlib.h> #include <stdio.h> diff --git a/src/webidl-ast.h b/src/webidl-ast.h index f49268a..5dfd2a8 100644 --- a/src/webidl-ast.h +++ b/src/webidl-ast.h @@ -1,3 +1,14 @@ +/* Web IDL AST interface + * + * This file is part of nsgenjsbind. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2012 Vincent Sanders <vince@netsurf-browser.org> + */ + +#ifndef genjsbind_webidl_ast_h +#define genjsbind_webidl_ast_h + enum webidl_node_type { WEBIDL_NODE_TYPE_ROOT, WEBIDL_NODE_TYPE_INTERFACE, @@ -28,3 +39,5 @@ extern struct webidl_node *webidl_root; int webidl_parsefile(char *filename); struct webidl_node *webidl_new_node(enum webidl_node_type type); + +#endif diff --git a/src/webidl-lexer.l b/src/webidl-lexer.l index d240edc..5c8234c 100644 --- a/src/webidl-lexer.l +++ b/src/webidl-lexer.l @@ -1,7 +1,13 @@ %{ -/* - * This is a unicode capable lexer for web IDL derived from: +/* This is a unicode tolerant lexer for web IDL + * + * This file is part of nsgenjsbind. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2012 Vincent Sanders <vince@netsurf-browser.org> + * + * Derived from: * * W3C WEB IDL - http://www.w3.org/TR/WebIDL/ (especially the grammar * in apendix A) diff --git a/src/webidl-parser.y b/src/webidl-parser.y index 1a40e41..ef119c9 100644 --- a/src/webidl-parser.y +++ b/src/webidl-parser.y @@ -1,11 +1,16 @@ -/* - * This is a bison parser for web IDL derived from the the grammar in - * apendix A of W3C WEB IDL - http://www.w3.org/TR/WebIDL/ +%{ + +/* This is a bison parser for Web IDL + * + * This file is part of nsgenjsbind. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2012 Vincent Sanders <vince@netsurf-browser.org> * + * Derived from the the grammar in apendix A of W3C WEB IDL + * http://www.w3.org/TR/WebIDL/ */ -%{ - #include <stdio.h> #include <string.h> |