68 #include "Gir/GLib-2.0.bi"
148 BYVAL_AS_CONST_gchar_PTR Nam,
149 BYVAL_AS_CONST_gchar_PTR_PTR AttNams,
150 BYVAL_AS_CONST_gchar_PTR_PTR AttVals) {
173 #define _START_PARSER(_N_)
196 #define _END_PARSER(_N_)
223 #define _NEW_PARSER(_N_)
234 static GMarkupParser
Skip_parser = TYPE(NULL, NULL, NULL, NULL, NULL);
245 #define _START_FUNC()
287 FUNCTION_AS_STRING
fb_type (BYVAL_AS_ANY_PTR Ud) {
318 BYVAL_AS_GMarkupParseContext_PTR,
319 BYVAL_AS_CONST_gchar_PTR,
320 BYVAL_AS_CONST_gchar_PTR_PTR,
321 BYVAL_AS_CONST_gchar_PTR_PTR,
323 BYVAL_AS_GError_PTR_PTR);
327 BYVAL_AS_GMarkupParseContext_PTR,
328 BYVAL_AS_CONST_gchar_PTR,
330 BYVAL_AS_GError_PTR_PTR);
407 VAR c =
find_value(
"c:type", AttNams, AttVals) ;
419 VAR n =
find_value(
"name", AttNams, AttVals) ;
420 VAR t =
find_value(
"c:type", AttNams, AttVals) ;
464 VAR bits =
find_value(
"bits", AttNams, AttVals) ;
469 VAR r =
find_value(
"readable", AttNams, AttVals) ;
470 VAR w =
find_value(
"writable", AttNams, AttVals) ;
489 VAR dll =
"__" & .BlockCnt ;
523 VAR dll =
"__" & .BlockCnt;
525 VAR p = INSTR(.ParaStr,
", ") ;
529 VAR parcall = UCASE(.NamSpace &
"_" & .Nams(.Level)) &
"(@THIS)" ;
582 VAR c =
find_value(
"c:identifier", AttNams, AttVals);
584 VAR bits =
find_value(
"bits", AttNams, AttVals);
632 VAR n =
find_value(
"name", AttNams, AttVals) ;
633 VAR c =
find_value(
"c:identifier", AttNams, AttVals) ;
635 VAR bits =
find_value(
"bits", AttNams, AttVals) ;
679 VAR value =
find_value(
"value", AttNams, AttVals) ;
698 VAR n =
find_value(IIF(
OOP,
@"name",
@"c:type"), AttNams, AttVals) ;
713 VAR n =
find_value(IIF(
OOP,
@"name",
@"c:type"), AttNams, AttVals) ;
718 VAR n =
find_value(IIF(
OOP,
@"name",
@"c:type"), AttNams, AttVals) ;
733 VAR dll =
find_value(
"shared-library", AttNams, AttVals) + 3 ;
778 VAR n =
find_value(*IIF(
OOP,
@"name",
@"c:type"), AttNams, AttVals);
801 VAR g =
find_value(
"glib:get-type", AttNams, AttVals) ;
803 VAR s =
find_value(
"glib:type-struct", AttNams, AttVals)
804 , t1 = UCASE(.NamSpace) &
"_"
806 , t2 = UCASE(MID(*g, p + 1, LEN(*g) - p - 9))
807 , t3 = t1 &
"TYPE_" & t2
808 , t4 = t3 &
", " & *g
809 , t5 = .NamSpace & *s ;
930 VAR filename = COMMAND(1)
931 , basename = MID(filename, INSTRREV(filename, ANY
"\/") + 1)
938 GError_PTR errr = NULL ;
966 VAR ctx = g_markup_parse_context_new(@G2b_parser, 0, @UDat, NULL);
gint32 FieldBits
The number of bits (in a bitfield)
RepData FB_NAM
Replacements for symbols (names)
gint32 Level
A counter for the current level.
STRING FunNam
The FB name of a SUB/FUNCTION/callback.
a SUB (function of type 'void')
SUB_CDECL enum_parser()
The GMarkupParser for the enum blocks.
STRING NextElm
The name of the next element in the ordered list.
gint32 BlockCnt
The number of entries in a block (ENUM/UNION/TYPE)
STRING Raus[15+1]
Strings for output (0-level, current level and 14 levels of nested blocks)
Stack FIRST
FiFo stack for ordered elements (pass X))
STRING FieldVal
The vale of a field.
SUB_CDECL pass1_parser()
The GMarkupParser for the first pass.
SUB list(BYREF_AS_STRING Li)
Generate a list of un-used symbols.
STRING Check
The symbol to check for (skip binding if prersent)
const VAR OOP
a flag to generate classic (C-like) headers or OOP style (currently only classic style is supported) ...
FUNCTION_AS_STRING fb_type(BYVAL_AS_ANY_PTR Ud)
Generate an FB type.
SUB_CDECL para_parser()
The GMarkupParser for the parameter lists.
gint32 type_flg
The tye of a variable (see TypeFlags)
SUB_CDECL pass4_parser()
The GMarkupParser for last pass.
static GMarkupParser Type_parser
The GMarkupParser for the type XML-tags.
SUB_CDECL passX_parser()
The GMarkupParser for the second pass.
STRING ParaStr
A parameter list.
gint32 FnrBi
The file number for output.
SUB_CDECL g2b_parser()
The GMarkupParser for the configuration file *.GirToBac.
gint32 ParaBy
The parameter passing (BYVAL/BYREF)
gint32 RausMax
The highest level of output (nested blocks)
STRING NamDll
The name of the library to include.
SUB_CDECL unio_parser()
The GMarkupParser for the union blocks.
SUB_CDECL start_type(BYVAL_AS_GMarkupParseContext_PTR, BYVAL_AS_CONST_gchar_PTR, BYVAL_AS_CONST_gchar_PTR_PTR, BYVAL_AS_CONST_gchar_PTR_PTR, BYVAL_AS_gpointer, BYVAL_AS_GError_PTR_PTR)
Forward declaration (due to circular references)
gint32 PropRW
The PROPERTY style (read/write)
STRING FunDll
The function name in the dll.
STRING FunTyp
The type of a FUNCTION/callback ("" = SUB)
TypeFlags
ENUM used to specify a type.
a variadic parameter (in a parameter list)
SUB_CDECL func_parser()
The GMarkupParser for the functions (function, method, constructor, callback)
TYPE struct used the parsers.
SUB_CDECL class_parser()
The GMarkupParser for the interfaces, records and classes (OOP style -> ToDo)
STRING FieldNam
The FB name of a field.
STRING NamSpace
The namespace of the library.
STRING Nams[15+1]
Names of the current block on each level (0 to 15)
STRING ArrayTyp
The type of an array.
static GMarkupParser Skip_parser
The GMarkupParser for skipping XML-tags.
FUNCTION_AS_CONST_gchar_PTR find_value(BYVAL_AS_CONST_gchar_PTR Nam, BYVAL_AS_CONST_gchar_PTR_PTR AttNams, BYVAL_AS_CONST_gchar_PTR_PTR AttVals)
Find an attribute by its name.
gint32 ArrayLen
The length or size of an array.
gint32 ParaCnt
The number of parameters in a list.
CONST_gchar_PTR GErrr
Used as flag to add a GError PTR PTR in parameter lists.
FUNCTION_AS_CONST_ZSTRING_PTR rep(BYVAL_AS_CONST_gchar_PTR T)
Get replacement for a text (if any))
STRING Typ
The type of a field.
STRING OopDll
The FB variable for OOP ???
STRING TypC
The type of a field in C-style.
Object to check texts (Su) and provide replacements (Er)
gint32 SkipElem
Wether to skip the current element (in ordered parsing process)
SUB_CDECL udt_parser()
The GMarkupParser for the interfaces, records and classes (C-like style)
Helper Classes list and replacements.
SUB_CDECL type_parser()
The GMarkupParser for the types.
SUB_CDECL end_type(BYVAL_AS_GMarkupParseContext_PTR, BYVAL_AS_CONST_gchar_PTR, BYVAL_AS_gpointer, BYVAL_AS_GError_PTR_PTR)
Forward declaration (due to circular references)
CONST_gchar_PTR FuncSkip
Used as flag to skip a function.
INTEGER A
Start position of next entry (-1)