disable parsing of string c-types

db4
Joe Groff 2009-09-27 16:06:13 -05:00
parent 630e5ecc3b
commit 4e68c43f3d
1 changed files with 4 additions and 4 deletions

View File

@ -6,17 +6,17 @@ kernel parser sequences splitting words fry locals lexer
namespaces summary math vocabs.parser ; namespaces summary math vocabs.parser ;
IN: alien.parser IN: alien.parser
: parse-c-type-name ( name -- word/string ) : parse-c-type-name ( name -- word )
[ search ] keep or ; dup search [ nip ] [ no-word ] if* ;
: parse-c-type ( string -- array ) : parse-c-type ( string -- array )
{ {
{ [ dup "void" = ] [ drop void ] } { [ dup "void" = ] [ drop void ] }
{ [ CHAR: ] over member? ] [ parse-array-type parse-c-type-name prefix ] } { [ CHAR: ] over member? ] [ parse-array-type parse-c-type-name prefix ] }
{ [ dup search c-type-word? ] [ parse-c-type-name ] } { [ dup search c-type-word? ] [ parse-c-type-name ] }
{ [ dup c-types get at ] [ ] } { [ "**" ?tail ] [ drop void* ] }
{ [ "*" ?tail ] [ parse-c-type-name resolve-pointer-type ] } { [ "*" ?tail ] [ parse-c-type-name resolve-pointer-type ] }
[ no-c-type ] [ parse-c-type-name no-c-type ]
} cond ; } cond ;
: scan-c-type ( -- c-type ) : scan-c-type ( -- c-type )