Skip to content

Commit

Permalink
Make parser includes closer to uctags and sync parser license header
Browse files Browse the repository at this point in the history
Adds (currently empty) debug.h, routines.h and xtag.h and uses them at the
same places like uctags.
  • Loading branch information
techee committed Jul 28, 2016
1 parent f791e91 commit 7b9d0dd
Show file tree
Hide file tree
Showing 31 changed files with 92 additions and 40 deletions.
3 changes: 3 additions & 0 deletions ctags/Makefile.am
Expand Up @@ -57,6 +57,7 @@ libctags_la_SOURCES = \
main/args.h \
main/ctags.c \
main/ctags.h \
main/debug.h \
main/entry.c \
main/entry.h \
main/general.h \
Expand All @@ -77,10 +78,12 @@ libctags_la_SOURCES = \
main/parsers.h \
main/read.c \
main/read.h \
main/routines.h \
main/sort.c \
main/sort.h \
main/strlist.c \
main/strlist.h \
main/vstring.c \
main/vstring.h \
main/xtag.h \
$(parsers)
Empty file added ctags/main/debug.h
Empty file.
Empty file added ctags/main/routines.h
Empty file.
Empty file added ctags/main/xtag.h
Empty file.
4 changes: 3 additions & 1 deletion ctags/parsers/asm.c
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2000-2003, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* This module contains functions for generating tags for assembly language
* files.
Expand All @@ -15,9 +15,11 @@

#include <string.h>

#include "debug.h"
#include "keyword.h"
#include "parse.h"
#include "read.h"
#include "routines.h"
#include "main.h"
#include "vstring.h"

Expand Down
3 changes: 2 additions & 1 deletion ctags/parsers/basic.c
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2000-2006, Darren Hiebert, Elias Pschernig
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* This module contains functions for generating tags for BlitzBasic
* (BlitzMax), PureBasic and FreeBasic language files. For now, this is kept
Expand All @@ -19,6 +19,7 @@

#include "parse.h"
#include "read.h"
#include "routines.h"
#include "vstring.h"

/*
Expand Down
10 changes: 6 additions & 4 deletions ctags/parsers/c.c
@@ -1,11 +1,10 @@
/*
*
* Copyright (c) 1996-2001, Darren Hiebert
* Copyright (c) 1996-2003, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* This module contains functions for parsing and scanning C, C++, D and Java
* This module contains functions for parsing and scanning C, C++, C#, D and Java
* source files.
*/

Expand All @@ -17,6 +16,7 @@
#include <string.h>
#include <setjmp.h>

#include "debug.h"
#include "mio.h"
#include "entry.h"
#include "get.h"
Expand All @@ -25,6 +25,8 @@
#include "options.h"
#include "parse.h"
#include "read.h"
#include "routines.h"
#include "xtag.h"

/*
* MACROS
Expand Down
3 changes: 2 additions & 1 deletion ctags/parsers/cobol.c
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2000-2003, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* This module contains functions for generating tags for COBOL language
* files.
Expand All @@ -13,6 +13,7 @@
*/
#include "general.h" /* must always come first */
#include "parse.h"
#include "routines.h"

/*
* FUNCTION DEFINITIONS
Expand Down
3 changes: 2 additions & 1 deletion ctags/parsers/css.c
Expand Up @@ -2,6 +2,7 @@
* css.c
* Token-based parser for CSS definitions
* Author - Colomban Wendling <colomban@geany.org>
* License GPL-2
**************************************************************************/
#include "general.h"

Expand All @@ -11,7 +12,7 @@
#include "entry.h"
#include "parse.h"
#include "read.h"

#include "routines.h"

typedef enum eCssKinds {
K_CLASS, K_SELECTOR, K_ID
Expand Down
3 changes: 2 additions & 1 deletion ctags/parsers/diff.c
Expand Up @@ -3,7 +3,7 @@
* Copyright (c) 2000-2001, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* This module contains functions for generating tags for diff files (based on Sh parser).
*/
Expand All @@ -17,6 +17,7 @@
#include <string.h>

#include "parse.h"
#include "routines.h"
#include "read.h"
#include "vstring.h"

Expand Down
4 changes: 2 additions & 2 deletions ctags/parsers/erlang.c
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2003, Brent Fulgham <bfulgham@debian.org>
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* This module contains functions for generating tags for Erlang language
* files. Some of the parsing constructs are based on the Emacs 'etags'
Expand All @@ -18,7 +18,7 @@
#include "entry.h"
#include "options.h"
#include "read.h"
// #include "routines.h"
#include "routines.h"
#include "vstring.h"

/*
Expand Down
9 changes: 6 additions & 3 deletions ctags/parsers/fortran.c
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 1998-2003, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* This module contains functions for generating tags for Fortran language
* files.
Expand All @@ -11,21 +11,24 @@
/*
* INCLUDE FILES
*/
#include "general.h" /* must always come first */
#include "general.h" /* must always come first */

#include <string.h>
#include <limits.h>
#include <ctype.h> /* to define tolower () */
#include <ctype.h> /* to define tolower () */
#include <setjmp.h>

#include "debug.h"
#include "mio.h"
#include "entry.h"
#include "keyword.h"
#include "main.h"
#include "options.h"
#include "parse.h"
#include "read.h"
#include "routines.h"
#include "vstring.h"
#include "xtag.h"

/*
* MACROS
Expand Down
6 changes: 6 additions & 0 deletions ctags/parsers/go.c
@@ -1,14 +1,20 @@
/*
* This source code is released for free distribution under the terms of the
* GNU General Public License version 2 or (at your option) any later version.
*
* INCLUDE FILES
*/
#include "general.h" /* must always come first */

#include "debug.h"
#include "entry.h"
#include "keyword.h"
#include "read.h"
#include "main.h"
#include "routines.h"
#include "vstring.h"
#include "options.h"
#include "xtag.h"

/*
* MACROS
Expand Down
3 changes: 2 additions & 1 deletion ctags/parsers/html.c
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2003, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* This module contains functions for generating tags for HTML language
* files.
Expand All @@ -13,6 +13,7 @@
*/
#include "general.h" /* must always come first */
#include "parse.h"
#include "routines.h"

/*
* FUNCTION DEFINITIONS
Expand Down
6 changes: 5 additions & 1 deletion ctags/parsers/jscript.c
Expand Up @@ -2,11 +2,13 @@
* Copyright (c) 2003, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* This module contains functions for generating tags for JavaScript language
* files.
*
* Reference: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
*
* This is a good reference for different forms of the function statement:
* http://www.permadi.com/tutorial/jsFunc/
* Another good reference:
Expand All @@ -23,11 +25,13 @@
#include <stdio.h>
#endif

#include "debug.h"
#include "mio.h"
#include "keyword.h"
#include "parse.h"
#include "read.h"
#include "main.h"
#include "routines.h"
#include "vstring.h"

/*
Expand Down
4 changes: 3 additions & 1 deletion ctags/parsers/json.c
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2014, Colomban Wendling <colomban@geany.org>
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*/
/*
* This module contains functions for generating tags for JSON files.
Expand All @@ -17,11 +17,13 @@
#include "general.h"

#include <string.h>
#include "debug.h"
#include "main.h"
#include "entry.h"
#include "keyword.h"
#include "parse.h"
#include "read.h"
#include "routines.h"
#include "vstring.h"

typedef enum {
Expand Down
3 changes: 2 additions & 1 deletion ctags/parsers/lua.c
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2000-2001, Max Ischenko <mfi@ukr.net>.
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* This module contains functions for generating tags for Lua language.
*/
Expand All @@ -16,6 +16,7 @@

#include "parse.h"
#include "read.h"
#include "routines.h"
#include "vstring.h"

/*
Expand Down
4 changes: 3 additions & 1 deletion ctags/parsers/make.c
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2000-2005, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* This module contains functions for generating tags for makefiles.
*/
Expand All @@ -19,7 +19,9 @@
#include "options.h"
#include "parse.h"
#include "read.h"
#include "routines.h"
#include "vstring.h"
#include "xtag.h"

/*
* DATA DEFINITIONS
Expand Down
3 changes: 2 additions & 1 deletion ctags/parsers/objc.c
Expand Up @@ -3,7 +3,7 @@
* Copyright (c) 2010, Vincent Berthoux
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* This module contains functions for generating tags for Objective C
* language files.
Expand All @@ -19,6 +19,7 @@
#include "entry.h"
#include "options.h"
#include "read.h"
#include "routines.h"
#include "vstring.h"

/* To get rid of unused parameter warning in
Expand Down
5 changes: 3 additions & 2 deletions ctags/parsers/pascal.c
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2001-2002, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* This module contains functions for generating tags for the Pascal language,
* including some extensions for Object Pascal.
Expand All @@ -11,14 +11,15 @@
/*
* INCLUDE FILES
*/
#include "general.h" /* must always come first */
#include "general.h" /* must always come first */

#include <string.h>

#include "entry.h"
#include "parse.h"
#include "read.h"
#include "main.h"
#include "routines.h"
#include "vstring.h"

/*
Expand Down
5 changes: 4 additions & 1 deletion ctags/parsers/perl.c
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2000-2003, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* This module contains functions for generating tags for PERL language
* files.
Expand All @@ -12,14 +12,17 @@
* INCLUDE FILES
*/
#include "general.h" /* must always come first */
#include "debug.h"

#include <string.h>

#include "entry.h"
#include "options.h"
#include "read.h"
#include "main.h"
#include "routines.h"
#include "vstring.h"
#include "xtag.h"

#define TRACE_PERL_C 0
#define TRACE if (TRACE_PERL_C) printf("perl.c:%d: ", __LINE__), printf
Expand Down

0 comments on commit 7b9d0dd

Please sign in to comment.