view anagram/agcore/q1glbl.cpp @ 21:1c9dac05d040

Add lint-style FALLTHROUGH annotations to fallthrough cases. (in the parse engine and thus the output code) Document this, because the old output causes warnings with gcc10.
author David A. Holland
date Mon, 13 Jun 2022 00:04:38 -0400
parents 13d2b8934445
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.
 *
 * q1glbl.cpp
 */

#include <stddef.h>
#include "port.h"

#include "q1glbl.h"


item_map *map_item = NULL;
state_number_map *map_state_number = NULL;

completed_form_map *map_completed_form = NULL;
tuple_dict *completed_form_dict = NULL;

tsd  *bnf_table = NULL;         /*      {tkn#,form#} backus normal form */
tsd  *ibnf_table = NULL;        /*      {form#, token#} inverse bnf */

int parse_table_length;

int  *ibnfs = NULL;
int  *ibnfb = NULL;
int  *ibnfn = NULL;

int  *tut = NULL;
int  *token_perm = NULL;  /*      token sort permutation base */
unsigned   perm_index;    /*      length of sorted token list */
tsd  *srt = NULL;         /*      summary return table for current is */
tsd  *sgt = NULL;         /*      summary goto table for current is */
unsigned *items = NULL;   /*      {itemset#, item#, index}  itemset table */
int   lits;               /*      length of item set */
int   ncssa;
list_dict *isht_dict = NULL;
unsigned   kits;        /*      itemset under investigation */
unsigned   nits;        /*      number of item sets                */
unsigned   nforms;      /*      number of forms */
unsigned   nforms_base;
unsigned   nitems;      /*      number of items */
unsigned   ntkns;       /*      number of tokens */
unsigned   frs;         /*      forms to reduce */
unsigned   kfrs;        /*      count of forms to reduce */