head	1.3;
access;
symbols;
locks
	gtoal:1.3; strict;
comment	@ * @;


1.3
date	2024.06.25.16.02.47;	author gtoal;	state Exp;
branches;
next	1.2;

1.2
date	2024.05.18.23.08.11;	author gtoal;	state Exp;
branches;
next	1.1;

1.1
date	2024.05.17.23.50.51;	author gtoal;	state Exp;
branches;
next	;


desc
@backup
@


1.3
log
@StrpoolIDX
@
text
@#ifndef __PARSER_H__
#define __PARSER_H__ 1

#include "flex.h"

#include <wchar.h>

typedef int StrpoolIDX; // An index into the string pool which can be used in place of a wchar * where appropriate.

extern SPEC(CST,int);
#define _CST(x) WRITE(x,CST,int)
#define  CST(x) READ(x,CST,int)

typedef struct reconstructed {
  wint_t ch;
  int start, end; // offset into original text
  StrpoolIDX skipped, canon; // stored in Stringpool.
  // Very similar to source_descriptor.  I may merge the two later.
} reconstructed;

extern SPEC(source,reconstructed);
#define _source(x) WRITE(x,source,reconstructed)
#define  source(x) READ(x,source,reconstructed)

extern wchar_t *PHRASE(int PhraseStart);
extern wchar_t *TERM_NAME(int P);

extern int phrasenum(int PhraseStart);
extern int BIPnum(int BIPStart);

extern int TP;

#endif //  __PARSER_H__
@


1.2
log
@modified source() to support line reconstruction
@
text
@d8 1
a8 1
typedef int STRING; // An index into the string pool which can be used in place of a wchar * where appropriate.
d17 1
a17 1
  STRING skipped, canon; // stored in Stringpool.
@


1.1
log
@Initial revision
@
text
@d8 2
d14 10
a23 3
extern SPEC(source,wint_t);
#define _source(x) WRITE(x,source,wint_t)
#define  source(x) READ(x,source,wint_t)
@
