2009-03-27 07:55:32 -06:00
|
|
|
/************************************************************
|
|
|
|
Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
|
|
|
|
|
|
|
|
Permission to use, copy, modify, and distribute this
|
|
|
|
software and its documentation for any purpose and without
|
|
|
|
fee is hereby granted, provided that the above copyright
|
|
|
|
notice appear in all copies and that both that copyright
|
|
|
|
notice and this permission notice appear in supporting
|
2009-04-04 10:19:51 -06:00
|
|
|
documentation, and that the name of Silicon Graphics not be
|
|
|
|
used in advertising or publicity pertaining to distribution
|
2009-03-27 07:55:32 -06:00
|
|
|
of the software without specific prior written permission.
|
2009-04-04 10:19:51 -06:00
|
|
|
Silicon Graphics makes no representation about the suitability
|
2009-03-27 07:55:32 -06:00
|
|
|
of this software for any purpose. It is provided "as is"
|
|
|
|
without any express or implied warranty.
|
2009-04-04 10:19:51 -06:00
|
|
|
|
|
|
|
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
|
|
|
|
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
2009-03-27 07:55:32 -06:00
|
|
|
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
|
2009-04-04 10:19:51 -06:00
|
|
|
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
|
|
|
|
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
|
|
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
2009-03-27 07:55:32 -06:00
|
|
|
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
|
|
|
|
THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
|
|
|
********************************************************/
|
|
|
|
|
|
|
|
#ifndef XKBPARSE_H
|
|
|
|
#define XKBPARSE_H 1
|
|
|
|
|
|
|
|
#include "xkbcomp.h"
|
2012-03-27 15:41:22 -06:00
|
|
|
#include "xkbparse.h"
|
2009-03-27 07:55:32 -06:00
|
|
|
|
2012-03-27 15:41:22 -06:00
|
|
|
struct parser_param {
|
|
|
|
void *scanner;
|
|
|
|
XkbFile *rtrn;
|
|
|
|
};
|
2009-03-27 07:55:32 -06:00
|
|
|
|
2012-03-27 15:41:22 -06:00
|
|
|
struct scanner_extra {
|
|
|
|
char *scanFile;
|
|
|
|
/* FIXME: This can overflow! */
|
|
|
|
char scanBuf[8192];
|
|
|
|
char *s;
|
|
|
|
};
|
2009-03-27 07:55:32 -06:00
|
|
|
|
|
|
|
extern ParseCommon *AppendStmt(ParseCommon * /* to */ ,
|
|
|
|
ParseCommon * /* append */
|
|
|
|
);
|
|
|
|
|
|
|
|
extern ExprDef *ExprCreate(unsigned /* op */ ,
|
|
|
|
unsigned /* type */
|
|
|
|
);
|
|
|
|
|
|
|
|
extern ExprDef *ExprCreateUnary(unsigned /* op */ ,
|
|
|
|
unsigned /* type */ ,
|
|
|
|
ExprDef * /* child */
|
|
|
|
);
|
|
|
|
|
|
|
|
extern ExprDef *ExprCreateBinary(unsigned /* op */ ,
|
|
|
|
ExprDef * /* left */ ,
|
|
|
|
ExprDef * /* right */
|
|
|
|
);
|
|
|
|
|
|
|
|
extern KeycodeDef *KeycodeCreate(char * /* name */ ,
|
2012-02-15 12:39:33 -07:00
|
|
|
unsigned long /* value */
|
2009-03-27 07:55:32 -06:00
|
|
|
);
|
|
|
|
|
|
|
|
extern KeyAliasDef *KeyAliasCreate(char * /* alias */ ,
|
|
|
|
char * /* real */
|
|
|
|
);
|
|
|
|
|
2012-03-09 12:09:25 -07:00
|
|
|
extern VModDef *VModCreate(xkb_atom_t /* name */ ,
|
2009-03-27 07:55:32 -06:00
|
|
|
ExprDef * /* value */
|
|
|
|
);
|
|
|
|
|
|
|
|
extern VarDef *VarCreate(ExprDef * /* name */ ,
|
|
|
|
ExprDef * /* value */
|
|
|
|
);
|
|
|
|
|
2012-03-09 12:09:25 -07:00
|
|
|
extern VarDef *BoolVarCreate(xkb_atom_t /* nameToken */ ,
|
2009-03-27 07:55:32 -06:00
|
|
|
unsigned /* set */
|
|
|
|
);
|
|
|
|
|
2010-06-21 07:27:58 -06:00
|
|
|
extern InterpDef *InterpCreate(char * /* sym */ ,
|
2009-03-27 07:55:32 -06:00
|
|
|
ExprDef * /* match */
|
|
|
|
);
|
|
|
|
|
2012-03-09 12:09:25 -07:00
|
|
|
extern KeyTypeDef *KeyTypeCreate(xkb_atom_t /* name */ ,
|
2009-03-27 07:55:32 -06:00
|
|
|
VarDef * /* body */
|
|
|
|
);
|
|
|
|
|
|
|
|
extern SymbolsDef *SymbolsCreate(char * /* keyName */ ,
|
|
|
|
ExprDef * /* symbols */
|
|
|
|
);
|
|
|
|
|
|
|
|
extern GroupCompatDef *GroupCompatCreate(int /* group */ ,
|
|
|
|
ExprDef * /* def */
|
|
|
|
);
|
|
|
|
|
2010-06-28 04:50:12 -06:00
|
|
|
extern ModMapDef *ModMapCreate(uint32_t /* modifier */ ,
|
2009-03-27 07:55:32 -06:00
|
|
|
ExprDef * /* keys */
|
|
|
|
);
|
|
|
|
|
2012-03-09 12:09:25 -07:00
|
|
|
extern IndicatorMapDef *IndicatorMapCreate(xkb_atom_t /* name */ ,
|
2009-03-27 07:55:32 -06:00
|
|
|
VarDef * /* body */
|
|
|
|
);
|
|
|
|
|
|
|
|
extern IndicatorNameDef *IndicatorNameCreate(int /* ndx */ ,
|
|
|
|
ExprDef * /* name */ ,
|
|
|
|
Bool /* virtual */
|
|
|
|
);
|
|
|
|
|
2012-03-09 12:09:25 -07:00
|
|
|
extern ExprDef *ActionCreate(xkb_atom_t /* name */ ,
|
2009-03-27 07:55:32 -06:00
|
|
|
ExprDef * /* args */
|
|
|
|
);
|
|
|
|
|
2010-06-15 12:38:16 -06:00
|
|
|
extern ExprDef *CreateKeysymList(char * /* sym */
|
2009-03-27 07:55:32 -06:00
|
|
|
);
|
|
|
|
|
|
|
|
extern ExprDef *AppendKeysymList(ExprDef * /* list */ ,
|
2010-06-15 12:38:16 -06:00
|
|
|
char * /* sym */
|
2009-03-27 07:55:32 -06:00
|
|
|
);
|
|
|
|
|
|
|
|
extern int LookupKeysym(char * /* str */ ,
|
2012-03-09 12:03:59 -07:00
|
|
|
xkb_keysym_t * /* sym_rtrn */
|
2009-03-27 07:55:32 -06:00
|
|
|
);
|
|
|
|
|
|
|
|
extern IncludeStmt *IncludeCreate(char * /* str */ ,
|
|
|
|
unsigned /* merge */
|
|
|
|
);
|
|
|
|
|
|
|
|
extern unsigned StmtSetMerge(ParseCommon * /* stmt */ ,
|
2012-03-27 15:41:22 -06:00
|
|
|
unsigned /* merge */,
|
|
|
|
YYLTYPE * /* loc */,
|
|
|
|
void * /* scanner */
|
2009-03-27 07:55:32 -06:00
|
|
|
);
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
extern void PrintStmtAddrs(ParseCommon * /* stmt */
|
|
|
|
);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern int XKBParseFile(FILE * /* file */ ,
|
2012-03-27 15:41:22 -06:00
|
|
|
const char * /* fileName */,
|
2009-03-27 07:55:32 -06:00
|
|
|
XkbFile ** /* pRtrn */
|
|
|
|
);
|
|
|
|
|
2012-03-27 15:41:22 -06:00
|
|
|
extern int XKBParseString(const char *string, const char *fileName,
|
|
|
|
XkbFile ** pRtrn);
|
2010-10-19 19:57:59 -06:00
|
|
|
|
2012-03-27 15:41:22 -06:00
|
|
|
extern void CheckDefaultMap(XkbFile * maps, const char *fileName);
|
2011-06-03 09:19:09 -06:00
|
|
|
|
2009-03-27 07:55:32 -06:00
|
|
|
extern XkbFile *CreateXKBFile(int /* type */ ,
|
|
|
|
char * /* name */ ,
|
|
|
|
ParseCommon * /* defs */ ,
|
|
|
|
unsigned /* flags */
|
|
|
|
);
|
|
|
|
|
2012-03-01 12:20:45 -07:00
|
|
|
extern void FreeXKBFile(XkbFile *file);
|
|
|
|
|
2012-03-15 03:34:20 -06:00
|
|
|
extern void FreeStmt(ParseCommon * /* stmt */
|
|
|
|
);
|
|
|
|
|
2012-03-27 15:41:22 -06:00
|
|
|
extern void yyerror(struct YYLTYPE *loc, void *scanner, const char *msg);
|
|
|
|
|
2009-03-27 07:55:32 -06:00
|
|
|
#endif /* XKBPARSE_H */
|