configparse.h #1

  • //
  • guest/
  • brett/
  • p4dctl/
  • src/
  • configparse.h
  • View
  • Commits
  • Open Download .zip Download (2 KB)
/* A Bison parser, made by GNU Bison 2.3.  */

/* Skeleton interface for Bison's Yacc-like parsers in C

   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
   Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.  */

/* As a special exception, you may create a larger work that contains
   part or all of the Bison parser skeleton and distribute that work
   under terms of your choice, so long as that work isn't itself a
   parser generator using the skeleton or a modified version thereof
   as a parser skeleton.  Alternatively, if you modify or redistribute
   the parser skeleton itself, you may (at your option) remove this
   special exception, which will cause the skeleton and the resulting
   Bison output files to be licensed under the GNU General Public
   License without this special exception.

   This special exception was added by the Free Software Foundation in
   version 2.2 of Bison.  */

/* Tokens.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   enum yytokentype {
     WORD = 258,
     STRING = 259,
     NUMBER = 260,
     PATH = 261
   };
#endif
/* Tokens.  */
#define WORD 258
#define STRING 259
#define NUMBER 260
#define PATH 261




#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
#line 40 "configparse.y"
{
    int			ival;
    char *		sval;
    void *		pval;
}
/* Line 1529 of yacc.c.  */
#line 67 "y.tab.h"
	YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif

extern YYSTYPE yylval;

# Change User Description Committed
#1 7841 brett Initial branch of the Unix Perforce Server Control tool.
See if this can be made to operate under Windows.
//guest/tony_smith/perforce/p4dctl/src/configparse.h
#4 7581 Tony Smith Clean up use of yytext, which was incorrect and causes problems
with some breeds of yacc. yytext is for the lexer, yylval for
the parser, and the twain shall only meet in the lexer code.

Thus configlex.l ensures that yytext is strdup'd into yylval.sval
before we hand it over to the parser.

Fix for bug reported by Mark Allender
#3 7179 Tony Smith Fix bug introduced in previous change.
In my attempt to sort out
the declaration of yytext, I declared it as an array rather than
a pointer, and that could cause crashes. I also added support
for debugging the parser in the course of fixing this and that's
a useful thing to have anyway.

Updated linux26x86 binary
#2 7177 Tony Smith Update p4dctl to build with 2008.2 API.
No major changes needed,
mostly jam stuff. The big change is to include all the rules from
the sample Jamrules included in the Perforce API since that's the
Jamrules used to build the API. This ensures that we're using the
right compiler/linker flags on every platform.

I also made sure that when lex & yacc are installed, and the
grammar is compiled as part of the build, that the source tree
is updated with the pre-compiled grammar. Makes it easy to
maintain.

Lastly, I updated the binary while I was there.
#1 5945 Tony Smith Release p4dctl, a program for starting/stopping Perforce services
on Unix operating systems. Similar to, and developed in concert
with, Sven Erik Knop's p4dcfg.

For example:

    p4dctl start -a

Can start multiple P4D, P4P, P4Web, or P4FTP servers in one easy
command line. It can be executed by root, or by the 'owners' of
the configured services and it maintains pidfiles no matter who
uses it (so they remain accurate).

An init script using p4dctl will typically just use:

    p4dctl start -a
    p4dctl stop -a
    p4dctl restart -a

And check the exit status.