shproto Wiki
Status: Pre-Alpha
Brought to you by:
mikerez
| Type | Description |
|---|---|
| u64/u32/u16/u8 | textual unsigned 64/32/16/8 bit (handles symbols '0'-'9') |
| h64/h32/h16/h8 | textual hex unsigned 64/32/16/8 bit (handles symbols 'A'-'F','0'-'9') |
| i64/i32/i16/i8 | textual signed 64/32/16/8 bit (handles symbols '-','+','0'-'9') |
| b64/b32/b16/b8 | binary variable 64/32/16/8 bit (handles all symbols) |
| string(maxlen[,len]) | char string handles chars with code >= 0x20 and 0x09, not more than maxlen will be saved in C sting variable, if optional parameter len is passed the variable will not match more than len chars |
| substring(maxlen,\" \t\") | char string handles chars with code >= 0x20 and 0x09 until one of delimiter chars (listed in second parameter) will be matched (see format for []-token) |
| array(len) | binary array of length len |
| data([len]) | continuous data of length len will be produced (extracted) from parser; if len is not passed data handles all chars till end of input stream or till put_\<var>_data will return false; if len is 0 the callback_func\:data(0) could be used as situation handler callback |
| ( SHProto Pattern ) | continuous data which is matched pattern will be produced (extracted) from parser; the pattern could be multi-line and contain branches or it could be the part of whole hierarchy tree (can contain any other SHProto variables) |
More variable types will be added to support
User can add own data types.