[fpc-pascal] Error when translating a C header
Luciano de Souza
luchyanus at gmail.com
Tue Oct 4 03:11:40 CEST 2011
Hi listers,
I tried to translate a C header with:
h2pas -e -d -p iupkey.h
I got the following error:
at line 21 error : syntax error
at line 41 error : syntax error
Illegal character in line 45
"#define K_at '@' /* 64 */"
Illegal character in line 73
"#define K_backslash '\\' /* 92 */"
Illegal character in line 73
"#define K_backslash '\\' /* 92 */"
Illegal character in line 75
"#define K_circum '^' /* 94 */"
Illegal character in line 77
"#define K_grave '`' /* 96 */"
Illegal character in line 113
"#define K_BS '\b' /* 8 */"
Illegal character in line 114
"#define K_TAB '\t' /* 9 */"
Illegal character in line 115
"#define K_LF '\n' /* 10 (0x0A) not a real key, is a
combination of CR with a modifier, just to document */"
Illegal character in line 116
"#define K_CR '\r' /* 13 (0x0D) */"
LexLib: yytext overflow
I could understand if the Pascal unit was generated, but not compiled.
What I can't understand is that even the Pascal unit, h2pas was not able
to produce.
I am trying to translate it becouse it is very important for me.
Actually, I don't know C, but I hope I can complete the task.
I am blind and I am trying to create graphical interfaces. It seems to
be so curious, but I can make sure the idea is reasonable and suitable.
Of course, I cwon't conceive beautiful interfaces. But with the help of
IUP, a graphical interface library which supports automatic layout, I
will produce dialogs interacting very good with screen readers.
As my objective is to program to blind people, beauty is not properly a
requirement. Having used IUP with Lua, I know it works, but now, to use
it with Pascal, I need to overcome this initial difficulties.
Does someone know how to convert it? Why the unit, even wrong, is not
created?
Luciano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iupkey.h
Type: text/x-chdr
Size: 17043 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20111003/8eb48141/attachment.h>
More information about the fpc-pascal
mailing list