'module'      Name.Attribute
':'           Operator
' '           Text
'nanomsg'     Literal.String
'\n'          Text

'synopsis'    Name.Attribute
':'           Operator
' '           Text
'generated bindings for the nanomsg library' Literal.String
'\n'          Text

'author'      Name.Attribute
':'           Operator
' '           Text
'Bruce Mitchener, Jr.' Literal.String
'\n'          Text

'copyright'   Name.Attribute
':'           Operator
' '           Text
'See LICENSE file in this distribution.' Literal.String
'\n\n'        Text

'define'      Keyword
' '           Text
'simple-C-mapped-subtype' Name
' '           Text
'<C-buffer-offset>' Name.Class
' '           Text
'('           Punctuation
'<C-char*>'   Name.Class
')'           Punctuation
'\n  '        Text
'export-map'  Name
' '           Text
'<machine-word>' Name.Class
','           Punctuation
' '           Text
'export-function:' Keyword
' '           Text
'identity'    Name.Builtin
';'           Punctuation
'\n'          Text

'end'         Keyword
';'           Punctuation
'\n\n'        Text

'define'      Keyword
' '           Text
'interface'   Name.Builtin
'\n  '        Text
'#include'    Keyword
' '           Text
'{'           Punctuation
'\n      '    Text
'"'           Literal.String
'sp/sp.h'     Literal.String
'"'           Literal.String
','           Punctuation
'\n      '    Text
'"'           Literal.String
'sp/fanin.h'  Literal.String
'"'           Literal.String
','           Punctuation
'\n      '    Text
'"'           Literal.String
'sp/inproc.h' Literal.String
'"'           Literal.String
','           Punctuation
'\n      '    Text
'"'           Literal.String
'sp/pair.h'   Literal.String
'"'           Literal.String
','           Punctuation
'\n      '    Text
'"'           Literal.String
'sp/reqrep.h' Literal.String
'"'           Literal.String
','           Punctuation
'\n      '    Text
'"'           Literal.String
'sp/survey.h' Literal.String
'"'           Literal.String
','           Punctuation
'\n      '    Text
'"'           Literal.String
'sp/fanout.h' Literal.String
'"'           Literal.String
','           Punctuation
'\n      '    Text
'"'           Literal.String
'sp/ipc.h'    Literal.String
'"'           Literal.String
','           Punctuation
'\n      '    Text
'"'           Literal.String
'sp/pubsub.h' Literal.String
'"'           Literal.String
','           Punctuation
'\n      '    Text
'"'           Literal.String
'sp/tcp.h'    Literal.String
'"'           Literal.String
'\n    '      Text
'}'           Punctuation
','           Punctuation
'\n\n    '    Text
'exclude:'    Keyword
' '           Text
'{'           Punctuation
'\n      '    Text
'"'           Literal.String
'SP_HAUSNUMERO' Literal.String
'"'           Literal.String
','           Punctuation
'\n      '    Text
'"'           Literal.String
'SP_PAIR_ID'  Literal.String
'"'           Literal.String
','           Punctuation
'\n      '    Text
'"'           Literal.String
'SP_PUBSUB_ID' Literal.String
'"'           Literal.String
','           Punctuation
'\n      '    Text
'"'           Literal.String
'SP_REQREP_ID' Literal.String
'"'           Literal.String
','           Punctuation
'\n      '    Text
'"'           Literal.String
'SP_FANIN_ID' Literal.String
'"'           Literal.String
','           Punctuation
'\n      '    Text
'"'           Literal.String
'SP_FANOUT_ID' Literal.String
'"'           Literal.String
','           Punctuation
'\n      '    Text
'"'           Literal.String
'SP_SURVEY_ID' Literal.String
'"'           Literal.String
'\n    '      Text
'}'           Punctuation
','           Punctuation
'\n\n    '    Text
'equate:'     Keyword
' '           Text
'{'           Punctuation
'"'           Literal.String
'char *'      Literal.String
'"'           Literal.String
' '           Text
'=>'          Punctuation
' '           Text
'<c-string>'  Name.Class
'}'           Punctuation
','           Punctuation
'\n\n    '    Text
'rename:'     Keyword
' '           Text
'{'           Punctuation
'\n      '    Text
'"'           Literal.String
'sp_recv'     Literal.String
'"'           Literal.String
' '           Text
'=>'          Punctuation
' '           Text
'%sp-recv'    Name
','           Punctuation
'\n      '    Text
'"'           Literal.String
'sp_send'     Literal.String
'"'           Literal.String
' '           Text
'=>'          Punctuation
' '           Text
'%sp-send'    Name
','           Punctuation
'\n      '    Text
'"'           Literal.String
'sp_setsockopt' Literal.String
'"'           Literal.String
' '           Text
'=>'          Punctuation
' '           Text
'%sp-setsockopt' Name
'\n    '      Text
'}'           Punctuation
';'           Punctuation
'\n\n    '    Text
'function'    Name.Builtin
' '           Text
'"'           Literal.String
'sp_version'  Literal.String
'"'           Literal.String
','           Punctuation
'\n      '    Text
'output-argument:' Keyword
' '           Text
'1'           Literal.Number.Integer
','           Punctuation
'\n      '    Text
'output-argument:' Keyword
' '           Text
'2'           Literal.Number.Integer
','           Punctuation
'\n      '    Text
'output-argument:' Keyword
' '           Text
'3'           Literal.Number.Integer
';'           Punctuation
'\n\n    '    Text
'function'    Name.Builtin
' '           Text
'"'           Literal.String
'sp_send'     Literal.String
'"'           Literal.String
','           Punctuation
'\n      '    Text
'map-argument:' Keyword
' '           Text
'{'           Punctuation
' '           Text
'2'           Literal.Number.Integer
' '           Text
'=>'          Punctuation
' '           Text
'<C-buffer-offset>' Name.Class
' '           Text
'}'           Punctuation
';'           Punctuation
'\n\n    '    Text
'function'    Name.Builtin
' '           Text
'"'           Literal.String
'sp_recv'     Literal.String
'"'           Literal.String
','           Punctuation
'\n      '    Text
'map-argument:' Keyword
' '           Text
'{'           Punctuation
' '           Text
'2'           Literal.Number.Integer
' '           Text
'=>'          Punctuation
' '           Text
'<C-buffer-offset>' Name.Class
' '           Text
'}'           Punctuation
';'           Punctuation
'\n\n'        Text

'end'         Keyword
' '           Text
'interface'   Name.Builtin
';'           Punctuation
'\n\n'        Text

'// Function for adding the base address of the repeated slots of a <buffer>\n' Comment.Single

'// to an offset and returning the result as a <machine-word>.  This is\n' Comment.Single

'// necessary for passing <buffer> contents across the FFI.\n' Comment.Single

'\n'          Text

'define'      Keyword
' '           Text
'function'    Name.Builtin
' '           Text
'buffer-offset' Name
'\n    '      Text
'('           Punctuation
'the-buffer'  Name
' '           Text
'::'          Punctuation
' '           Text
'<buffer>'    Name.Class
','           Punctuation
' '           Text
'data-offset' Name
' '           Text
'::'          Punctuation
' '           Text
'<integer>'   Name.Class
')'           Punctuation
'\n '         Text
'=>'          Punctuation
' '           Text
'('           Punctuation
'result-offset' Name
' '           Text
'::'          Punctuation
' '           Text
'<machine-word>' Name.Class
')'           Punctuation
'\n  '        Text
'u%+'         Name
'('           Punctuation
'data-offset' Name
','           Punctuation
'\n      '    Text
'primitive-wrap-machine-word' Name
'\n        '  Text
'('           Punctuation
'primitive-repeated-slot-as-raw' Name
'\n           ' Text
'('           Punctuation
'the-buffer'  Name
','           Punctuation
' '           Text
'primitive-repeated-slot-offset' Name
'('           Punctuation
'the-buffer'  Name
')'           Punctuation
')'           Punctuation
')'           Punctuation
')'           Punctuation
'\n'          Text

'end'         Keyword
' '           Text
'function'    Name.Builtin
';'           Punctuation
'\n\n'        Text

'define'      Keyword
' '           Text
'inline'      Name.Builtin
' '           Text
'function'    Name.Builtin
' '           Text
'sp-send'     Name
' '           Text
'('           Punctuation
'socket'      Name
' '           Text
'::'          Punctuation
' '           Text
'<integer>'   Name.Class
','           Punctuation
' '           Text
'data'        Name
' '           Text
'::'          Punctuation
' '           Text
'<buffer>'    Name.Class
','           Punctuation
' '           Text
'flags'       Name
' '           Text
'::'          Punctuation
' '           Text
'<integer>'   Name.Class
')'           Punctuation
' '           Text
'=>'          Punctuation
' '           Text
'('           Punctuation
'res'         Name
' '           Text
'::'          Punctuation
' '           Text
'<integer>'   Name.Class
')'           Punctuation
'\n  '        Text
'%sp-send'    Name
'('           Punctuation
'socket'      Name
','           Punctuation
' '           Text
'buffer-offset' Name
'('           Punctuation
'data'        Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
','           Punctuation
' '           Text
'data'        Name
'.'           Punctuation
'size'        Name.Builtin
','           Punctuation
' '           Text
'flags'       Name
')'           Punctuation
'\n'          Text

'end'         Keyword
';'           Punctuation
'\n\n'        Text

'define'      Keyword
' '           Text
'inline'      Name.Builtin
' '           Text
'function'    Name.Builtin
' '           Text
'sp-recv'     Name
' '           Text
'('           Punctuation
'socket'      Name
' '           Text
'::'          Punctuation
' '           Text
'<integer>'   Name.Class
','           Punctuation
' '           Text
'data'        Name
' '           Text
'::'          Punctuation
' '           Text
'<buffer>'    Name.Class
','           Punctuation
' '           Text
'flags'       Name
' '           Text
'::'          Punctuation
' '           Text
'<integer>'   Name.Class
')'           Punctuation
' '           Text
'=>'          Punctuation
' '           Text
'('           Punctuation
'res'         Name
' '           Text
'::'          Punctuation
' '           Text
'<integer>'   Name.Class
')'           Punctuation
'\n  '        Text
'%sp-recv'    Name
'('           Punctuation
'socket'      Name
','           Punctuation
' '           Text
'buffer-offset' Name
'('           Punctuation
'data'        Name
','           Punctuation
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
','           Punctuation
' '           Text
'data'        Name
'.'           Punctuation
'size'        Name.Builtin
','           Punctuation
' '           Text
'flags'       Name
')'           Punctuation
';'           Punctuation
'\n'          Text

'end'         Keyword
';'           Punctuation
'\n\n'        Text

'define'      Keyword
' '           Text
'inline'      Name.Builtin
' '           Text
'method'      Name.Builtin
' '           Text
'sp-setsockopt' Name
' '           Text
'('           Punctuation
'socket'      Name
' '           Text
'::'          Punctuation
' '           Text
'<integer>'   Name.Class
','           Punctuation
' '           Text
'level'       Name
' '           Text
'::'          Punctuation
' '           Text
'<integer>'   Name.Class
','           Punctuation
' '           Text
'option'      Name
' '           Text
'::'          Punctuation
' '           Text
'<integer>'   Name.Class
','           Punctuation
' '           Text
'value'       Name
' '           Text
'::'          Punctuation
' '           Text
'<integer>'   Name.Class
')'           Punctuation
'\n  '        Text
'with-stack-structure' Name
' '           Text
'('           Punctuation
'int'         Name
' '           Text
'::'          Punctuation
' '           Text
'<C-int*>'    Name.Class
')'           Punctuation
'\n    '      Text
'pointer-value' Name
'('           Punctuation
'int'         Name
')'           Punctuation
' '           Text
':='          Operator
' '           Text
'value'       Name
';'           Punctuation
'\n    '      Text
'let'         Keyword
' '           Text
'setsockopt-result' Name
' '           Text
'='           Operator
'\n      '    Text
'%sp-setsockopt' Name
'('           Punctuation
'socket'      Name
','           Punctuation
' '           Text
'level'       Name
','           Punctuation
' '           Text
'option'      Name
','           Punctuation
' '           Text
'int'         Name
','           Punctuation
' '           Text
'size-of'     Name
'('           Punctuation
'<C-int*>'    Name.Class
')'           Punctuation
')'           Punctuation
';'           Punctuation
'\n    '      Text
'if'          Keyword
' '           Text
'('           Punctuation
'setsockopt-result' Name
' '           Text
'<'           Operator
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
'\n      '    Text
'// Check error!\n' Comment.Single

'    '        Text
'end'         Keyword
';'           Punctuation
'\n    '      Text
'setsockopt-result' Name
'\n  '        Text
'end'         Keyword
';'           Punctuation
'\n'          Text

'end'         Keyword
';'           Punctuation
'\n\n'        Text

'define'      Keyword
' '           Text
'inline'      Name.Builtin
' '           Text
'method'      Name.Builtin
' '           Text
'sp-setsockopt' Name
' '           Text
'('           Punctuation
'socket'      Name
' '           Text
'::'          Punctuation
' '           Text
'<integer>'   Name.Class
','           Punctuation
' '           Text
'level'       Name
' '           Text
'::'          Punctuation
' '           Text
'<integer>'   Name.Class
','           Punctuation
' '           Text
'option'      Name
' '           Text
'::'          Punctuation
' '           Text
'<integer>'   Name.Class
','           Punctuation
' '           Text
'data'        Name
' '           Text
'::'          Punctuation
' '           Text
'<byte-string>' Name.Class
')'           Punctuation
'\n  '        Text
'let'         Keyword
' '           Text
'setsockopt-result' Name
' '           Text
'='           Operator
'\n    '      Text
'%sp-setsockopt' Name
'('           Punctuation
'socket'      Name
','           Punctuation
' '           Text
'level'       Name
','           Punctuation
' '           Text
'option'      Name
','           Punctuation
' '           Text
'as'          Name.Builtin
'('           Punctuation
'<c-string>'  Name.Class
','           Punctuation
' '           Text
'data'        Name
')'           Punctuation
','           Punctuation
' '           Text
'data'        Name
'.'           Punctuation
'size'        Name.Builtin
')'           Punctuation
';'           Punctuation
'\n  '        Text
'if'          Keyword
' '           Text
'('           Punctuation
'setsockopt-result' Name
' '           Text
'<'           Operator
' '           Text
'0'           Literal.Number.Integer
')'           Punctuation
'\n    '      Text
'// Check error!\n' Comment.Single

'  '          Text
'end'         Keyword
';'           Punctuation
'\n  '        Text
'setsockopt-result' Name
'\n'          Text

'end'         Keyword
';'           Punctuation
'\n'          Text
