view anagram/agcore/bpe3.h @ 0:13d2b8934445

Import AnaGram (near-)release tree into Mercurial.
author David A. Holland
date Sat, 22 Dec 2007 17:52:45 -0500
parents
children
line wrap: on
line source

/*
 * AnaGram, A System for Syntax Directed Programming
 * Copyright 1993-2002 Parsifal Software. All Rights Reserved.
 * See the file COPYING for license and usage terms.
 *
 * bpe3.h - build parse engine, rev. 3
 */

#ifndef BPE3_H
#define BPE3_H

struct string_dict; // from dict.h
struct CSegment; // from rproc.h
#include "agstack.h"


typedef enum {
  pe_shift_accept,
  pe_go_to,
  pe_shift_reduce,
  pe_shift_simple_reduce,
  pe_reduce_form,
  pe_simple_reduce,
  pe_accept,
  pe_syn_error,
  pe_null_go_to,
  pe_skip,
  pe_skip_reduce,
  pe_recover
} pe_parser_action;

extern AgStack<CSegment> extensionStack;
extern AgStack<CSegment> cSegmentStack;
extern int               nPrologueSegments;

extern string_dict *my_macros;
extern int pe_line_count;
extern char buildErrorMsg[];
extern char *my_macros_subs[];

void build_parse_table(void);
void build_parse_engine(void);

#endif /* BPE3_H */