1 /* 2 * $Id: yacc.c 443 2006-05-30 04:37:13Z darren $ 3 * 4 * Copyright (c) 2001-2002, Nick Hibma <n_hibma@van-laarhoven.org> 5 * 6 * This source code is released for free distribution under the terms of the 7 * GNU General Public License. 8 * 9 * This module contains functions for generating tags for YACC language files. 10 */ 11 12 /* 13 * INCLUDE FILES 14 */ 15 #include "general.h" /* must always come first */ 16 17 #include <string.h> 18 #include "parse.h" 19 20 /* 21 * FUNCTION DEFINITIONS 22 */ 23 installYaccRegex(const langType language)24static void installYaccRegex (const langType language) 25 { 26 addTagRegex (language, 27 "^([A-Za-z][A-Za-z_0-9]+)[ \t]*:", "\\1", "l,label,labels", NULL); 28 } 29 YaccParser()30extern parserDefinition* YaccParser () 31 { 32 static const char *const extensions [] = { "y", NULL }; 33 parserDefinition* const def = parserNew ("YACC"); 34 def->extensions = extensions; 35 def->initialize = installYaccRegex; 36 def->regex = TRUE; 37 return def; 38 } 39 40 /* vi:set tabstop=4 shiftwidth=4: */ 41