/* $RCSfile: a2p.h,v $$Revision: 4.1 $$Date: 92/08/07 18:29:09 $
*
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
* 2000, 2001, 2002, by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
*
* $Log: a2p.h,v $
*/
#ifdef WIN32
#endif
#ifdef VMS
# include "config.h"
#else
# include "../config.h"
#endif
#if defined(__STDC__) || defined(vax11c) || defined(_AIX) || defined(__stdc__) || defined(__cplusplus)
#endif
#ifdef WIN32
# ifndef STANDARD_C
# define STANDARD_C
# endif
# if defined(__BORLANDC__)
# elif defined(__MINGW32__)
# endif
#endif
/* Use all the "standard" definitions? */
#if defined(STANDARD_C) && defined(I_STDLIB)
# include <stdlib.h>
#endif /* STANDARD_C */
#include <stdio.h>
#ifdef I_MATH
#include <math.h>
#endif
#ifdef I_SYS_TYPES
#endif
#ifdef USE_NEXT_CTYPE
#if NX_CURRENT_COMPILER_RELEASE >= 400
#else /* NX_CURRENT_COMPILER_RELEASE < 400 */
#endif /* NX_CURRENT_COMPILER_RELEASE >= 400 */
#else /* !USE_NEXT_CTYPE */
#include <ctype.h>
#endif /* USE_NEXT_CTYPE */
#ifndef STANDARD_C
#endif
#if defined(I_STRING) || defined(__cplusplus)
# include <string.h>
#else
# include <strings.h>
#endif
#endif
#ifdef I_TIME
# include <time.h>
#endif
#ifdef I_SYS_TIME
# ifdef I_SYS_TIME_KERNEL
# define KERNEL
# endif
# ifdef I_SYS_TIME_KERNEL
# endif
#endif
#ifndef MSDOS
# if defined(HAS_TIMES) && defined(I_SYS_TIMES)
# endif
#endif
#ifdef DOSISH
# if defined(OS2)
# define PTHX_UNUSED
# include "../os2ish.h"
# else
# include "../dosish.h"
# endif
#else
# if defined(VMS)
# define NO_PERL_TYPEDEFS
# include "vmsish.h"
# endif
#endif
#ifndef STANDARD_C
#else
#endif
#endif /* ! STANDARD_C */
#ifdef VMS
# include "handy.h"
#else
# include "../handy.h"
#endif
#define Nullop 0
#ifdef DOINIT
char *opname[] = {
"0",
"PROG",
"JUNK",
"HUNKS",
"RANGE",
"PAT",
"HUNK",
"PPAREN",
"PANDAND",
"POROR",
"PNOT",
"CPAREN",
"CANDAND",
"COROR",
"CNOT",
"RELOP",
"RPAREN",
"MATCHOP",
"MPAREN",
"CONCAT",
"ASSIGN",
"ADD",
"SUBTRACT",
"MULT",
"DIV",
"MOD",
"POSTINCR",
"POSTDECR",
"PREINCR",
"PREDECR",
"UMINUS",
"UPLUS",
"PAREN",
"GETLINE",
"SPRINTF",
"SUBSTR",
"STRING",
"SPLIT",
"SNEWLINE",
"INDEX",
"NUM",
"STR",
"VAR",
"FLD",
"NEWLINE",
"COMMENT",
"COMMA",
"SEMICOLON",
"SCOMMENT",
"STATES",
"STATE",
"PRINT",
"PRINTF",
"BREAK",
"NEXT",
"EXIT",
"CONTINUE",
"REDIR",
"IF",
"WHILE",
"FOR",
"FORIN",
"VFLD",
"BLOCK",
"REGEX",
"LENGTH",
"LOG",
"EXP",
"SQRT",
"INT",
"DO",
"POW",
"SUB",
"GSUB",
"MATCH",
"USERFUN",
"USERDEF",
"CLOSE",
"ATAN2",
"SIN",
"COS",
"RAND",
"SRAND",
"DELETE",
"SYSTEM",
"COND",
"RETURN",
"DEFINED",
"STAR",
"89"
};
#else
extern char *opname[];
#endif
union u_ops {
int ival;
char *cval;
};
#else
#endif /* 80286 hack */
#include "str.h"
#include "hash.h"
/* A string is TRUE if not "" or "0". */
#define str_true(str) (Str = (str), (Str->str_pok ? True(Str->str_ptr) : (Str->str_nok ? (Str->str_nval != 0.0) : 0 )))
#define str_peek(str) (Str = (str), (Str->str_pok ? Str->str_ptr : (Str->str_nok ? (sprintf(buf,"num(%"NVgf")",Str->str_nval),buf) : "" )))
/* Prototypes for things in a2p.c */
void putone ( void );
int rememberargs ( int arg );
char * scannum ( char *s );
char * scanpat ( char *s );
void yyerror ( char *s );
int yylex ( void );
#ifdef DEBUGGING
extern int yydebug;
#else
# ifndef YYDEBUG
# define YYDEBUG 0
# endif
#endif
#define P_MIN 0