/usr/include/styx/scn_abs.h is in styx-dev 2.0.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | /* ------------------------------------------------------------------------ */
/* */
/* [scn_abs.h] Abstract Scanner Interface */
/* */
/* Copyright (c) 2002 by D\olle, Manns */
/* ------------------------------------------------------------------------ */
/* File generated by 'ctoh'. Don't change manually. */
#ifndef scn_abs_INCL
#define scn_abs_INCL
#include "symbols.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
<p>This module [scn_abs] provides an abstract scanner interface for the
term generation module <a href="ptm_gen.htm">[ptm_gen]</a>.
<p>It can be used to integrate an externally defined scanner with the STYX term
generation facility.
*/
/* ----------------------------- The Types --------------------------------- */
AbstractType(AbsScn_T); /* Abstract scanner interface type */
/*
Types of the scanner (interface) functions
*/
typedef void (*SF_scan )(Abs_T scanner);
typedef short (*SF_tok )(Abs_T scanner);
typedef symbol (*SF_symbol )(Abs_T scanner);
typedef long (*SF_pos )(Abs_T scanner);
typedef c_bool (*SF_flag )(Abs_T scanner);
typedef void (*SF_defID )(Abs_T scanner, short id);
typedef c_bool (*SF_defDynID )(Abs_T scanner, symbol sym, short id);
typedef void (*SF_defTxtID )(Abs_T scanner, c_string text, short id);
typedef void (*SF_defWCTxtID)(Abs_T scanner, wc_string text, short id);
typedef Any_T (*SIF_eTerm )
(
Abs_T CurPTCfg, c_string language, c_string StartSymbol
);
typedef c_bool (*SIF_eAccept )(Abs_T CurPTCfg);
/* ---------------------------- Init & Quit -------------------------------- */
AbsScn_T AS_init(void); /* creates an abstract scanner interface */
void AS_quit(AbsScn_T sconfig)
/* removes abstract scanner interface 'sconfig' */
;
/* -------------- Specification of the external scanner interface ---------- */
void AS_setScanner(AbsScn_T sconfig, Abs_T scanner)
/* specifies the external 'scanner' of the abstract interface 'sconfig'
( see Scn_Stream )
*/
;
/*
<p>An external defined scanner must provide the following interface
functions. They have to be assigned to the abstract scanner interface
before initializing the term generation. That module calls them
during the construction of the derivation tree.
*/
void AS_setFunNextTok(AbsScn_T sconfig, SF_scan nextTok)
/* specifies 'nextTok' as corresponding function for Stream_next
in the abstract interface 'sconfig'
*/
;
void AS_setFunTokID(AbsScn_T sconfig, SF_tok tokID)
/* specifies 'tokID' as corresponding function for Stream_ctid
in the abstract interface 'sconfig'
*/
;
void AS_setFunTokSym(AbsScn_T sconfig, SF_symbol tokSym)
/* specifies 'tokSym' as corresponding function for Stream_csym
in the abstract interface 'sconfig'
*/
;
void AS_setFunStreamSym(AbsScn_T sconfig, SF_symbol streamSym)
/* specifies 'streamSym' as corresponding function for Stream_cfil
in the abstract interface 'sconfig'
*/
;
void AS_setFunTokRow(AbsScn_T sconfig, SF_pos tokRow)
/* specifies 'tokRow' as corresponding function for Stream_clin
in the abstract interface 'sconfig'
*/
;
void AS_setFunTokCol(AbsScn_T sconfig, SF_pos tokCol)
/* specifies 'tokCol' as corresponding function for Stream_ccol
in the abstract interface 'sconfig'
*/
;
void AS_setFunUnicode(AbsScn_T sconfig, SF_flag unicode)
/* specifies 'tokCol' as corresponding function for Stream_ccol
in the abstract interface 'sconfig'
*/
;
void AS_setFunDefEofID(AbsScn_T sconfig, SF_defID defEofID)
/* specifies 'defEofID' as corresponding function for Stream_defEofId
in the abstract interface 'sconfig'
*/
;
void AS_setFunDefErrID(AbsScn_T sconfig, SF_defID defErrID)
/* specifies 'defErrID' as corresponding function for Stream_defErrId
in the abstract interface 'sconfig'
*/
;
void AS_setFunDefTokID(AbsScn_T sconfig, SF_defTxtID defTokID)
/* specifies 'defTokID' as corresponding function for Stream_defTokId
in the abstract interface 'sconfig'
*/
;
void AS_setFunDefDynKeyID(AbsScn_T sconfig, SF_defDynID defDynKeyID)
/* specifies 'defDynKeyID' as corresponding function for Stream_defDynKeyId
in the abstract interface 'sconfig'
*/
;
void AS_setFunDefKeyID(AbsScn_T sconfig, SF_defTxtID defKeyID)
/* specifies 'defKeyID' as corresponding function for Stream_defKeyId
in the abstract interface 'sconfig'
*/
;
void AS_setFunDefWCKeyID(AbsScn_T sconfig, SF_defWCTxtID defWCKeyID)
/* specifies 'defWCKeyID' as corresponding function for Stream_defWCKeyId
in the abstract interface 'sconfig'
*/
;
/*
<p>An external defined scanner must call the following handler
to construct an embedded language token.
This handler will be set by the term construction module.
*/
void AS_setETermInfo
(
AbsScn_T sconfig, Abs_T CurPTCfg, SIF_eTerm eTerm, SIF_eAccept eAccept
)
/* specifies 'eTerm' as embedded language token constructor and
'eAccept' as embedded language accept token recognizer
in the abstract interface 'sconfig'
*/
;
/* -------------- Accessing the external scanner interface ----------------- */
Abs_T AS_getScanner(AbsScn_T sconfig)
/* get the external scanner of the abstract interface 'sconfig' */
;
SF_scan AS_getFunNextTok(AbsScn_T sconfig)
/* get the corresponding function for Stream_next
in the abstract interface 'sconfig'
*/
;
SF_tok AS_getFunTokID(AbsScn_T sconfig)
/* get the corresponding function for Stream_ctid
in the abstract interface 'sconfig'
*/
;
SF_symbol AS_getFunTokSym(AbsScn_T sconfig)
/* get the corresponding function for Stream_csym
in the abstract interface 'sconfig'
*/
;
SF_symbol AS_getFunStreamSym(AbsScn_T sconfig)
/* get the corresponding function for Stream_cfil
in the abstract interface 'sconfig'
*/
;
SF_pos AS_getFunTokRow(AbsScn_T sconfig)
/* get the corresponding function for Stream_clin
in the abstract interface 'sconfig'
*/
;
SF_pos AS_getFunTokCol(AbsScn_T sconfig)
/* get the corresponding function for Stream_ccol
in the abstract interface 'sconfig'
*/
;
SF_flag AS_getFunUnicode(AbsScn_T sconfig)
/* get the corresponding function for Stream_ccol
in the abstract interface 'sconfig'
*/
;
SF_defID AS_getFunDefEofID(AbsScn_T sconfig)
/* get the corresponding function for Stream_defEofId
in the abstract interface 'sconfig'
*/
;
SF_defID AS_getFunDefErrID(AbsScn_T sconfig)
/* get the corresponding function for Stream_defErrId
in the abstract interface 'sconfig'
*/
;
SF_defTxtID AS_getFunDefTokID(AbsScn_T sconfig)
/* get the corresponding function for Stream_defTokId
in the abstract interface 'sconfig'
*/
;
SF_defDynID AS_getFunDefDynKeyID(AbsScn_T sconfig)
/* get the corresponding function for Stream_defDynKeyId
in the abstract interface 'sconfig'
*/
;
SF_defTxtID AS_getFunDefKeyID(AbsScn_T sconfig)
/* get the corresponding function for Stream_defKeyId
in the abstract interface 'sconfig'
*/
;
SF_defWCTxtID AS_getFunDefWCKeyID(AbsScn_T sconfig)
/* get the corresponding function for Stream_defWCKeyId
in the abstract interface 'sconfig'
*/
;
SIF_eTerm AS_getFunETerm(AbsScn_T sconfig)
/* get the embedded language token constructor
from the abstract interface 'sconfig'
*/
;
SIF_eAccept AS_getEofETerm(AbsScn_T sconfig)
/* get the embedded language accept token recognizer
from the abstract interface 'sconfig'
*/
;
Abs_T AS_getCurPTCfg(AbsScn_T sconfig)
/* get the current parse term configuration
from the abstract interface 'sconfig'
*/
;
#ifdef __cplusplus
}
#endif
#endif
|