Hessian 1.0 Grammar

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
 
m (Hessian 1.0 BNF moved to Hessian 1.0 Grammar)
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
 
[[Category: Hessian]]
 
[[Category: Hessian]]
 +
 +
The following is the complete grammar for Hessian 1.0.  All integers are big-endian, i.e. starting with the most-significant byte first.
  
 
  top    ::= call
 
  top    ::= call
          ::= reply
+
        ::= reply
 
   
 
   
 
  call    ::= c x01 x00 header* method object* z
 
  call    ::= c x01 x00 header* method object* z
 
   
 
   
  reply ::= r x01 x00 header* object z
+
  reply   ::= r x01 x00 header* object z
          ::= r x01 x00 header* fault z
+
        ::= r x01 x00 header* fault z
 
   
 
   
 
  object  ::= null
 
  object  ::= null
          ::= boolean
+
        ::= boolean
        ::= int
+
        ::= int
        ::= long
+
        ::= long
        ::= double
+
        ::= double
        ::= date
+
        ::= date
        ::= string
+
        ::= string
        ::= xml
+
        ::= xml
        ::= binary
+
        ::= binary
        ::= remote
+
        ::= remote
        ::= ref
+
        ::= ref
        ::= list
+
        ::= list
        ::= map
+
        ::= map
 
   
 
   
  header  ::= H b16 b8 header-string object
+
  header  ::= H b1 b0 header-string object
  method  ::= m b16 b8 method-string
+
  method  ::= m b1 b0 method-string
 
   
 
   
 
  fault  ::= f (object object)*
 
  fault  ::= f (object object)*
Line 32: Line 34:
 
  remote  ::= r type? string
 
  remote  ::= r type? string
 
   
 
   
  type    ::= t b16 b8 type-string
+
  type    ::= t b1 b0 type-string
  length  ::= l b32 b24 b16 b8
+
  length  ::= l b3 b2 b1 b0
 
   
 
   
 
  null    ::= N
 
  null    ::= N
 
  boolean ::= T
 
  boolean ::= T
        ::= F
+
        ::= F
  int    ::= I b32 b24 b16 b8
+
  int    ::= I b3 b2 b1 b0
  long    ::= L b64 b56 b48 b40 b32 b24 b16 b8
+
  long    ::= L b7 b6 b5 b4 b3 b2 b1 b0
  double  ::= D b64 b56 b48 b40 b32 b24 b16 b8
+
  double  ::= D b7 b6 b5 b4 b3 b2 b1 b0
  date    ::= d b64 b56 b48 b40 b32 b24 b16 b8
+
  date    ::= d b7 b6 b5 b4 b3 b2 b1 b0
  string  ::= (s b16 b8 string-data)* S b16 b8 string-data
+
  string  ::= (s b1 b0 string-data)* S b1 b0 string-data
  xml    ::= (x b16 b8 xml-data)* X b16 b8 xml-data
+
  xml    ::= (x b1 b0 xml-data)* X b1 b0 xml-data
  binary  ::= (b b16 b8 binary-data)* B b16 b8 binary-data
+
  binary  ::= (b b1 b0 binary-data)* B b1 b0 binary-data
  ref    ::= R b32 b24 b16 b8
+
  ref    ::= R b3 b2 b1 b0

Latest revision as of 17:36, 28 March 2006


The following is the complete grammar for Hessian 1.0. All integers are big-endian, i.e. starting with the most-significant byte first.

top     ::= call
        ::= reply

call    ::= c x01 x00 header* method object* z

reply   ::= r x01 x00 header* object z
        ::= r x01 x00 header* fault z

object  ::= null
        ::= boolean
        ::= int
        ::= long
        ::= double
        ::= date
        ::= string
        ::= xml
        ::= binary
        ::= remote
        ::= ref
        ::= list
        ::= map

header  ::= H b1 b0 header-string object
method  ::= m b1 b0 method-string

fault   ::= f (object object)*

list    ::= V type? length? object* z
map     ::= M type? (object object)* z
remote  ::= r type? string

type    ::= t b1 b0 type-string
length  ::= l b3 b2 b1 b0

null    ::= N
boolean ::= T
        ::= F
int     ::= I b3 b2 b1 b0
long    ::= L b7 b6 b5 b4 b3 b2 b1 b0
double  ::= D b7 b6 b5 b4 b3 b2 b1 b0
date    ::= d b7 b6 b5 b4 b3 b2 b1 b0
string  ::= (s b1 b0 string-data)* S b1 b0 string-data
xml     ::= (x b1 b0 xml-data)* X b1 b0 xml-data
binary  ::= (b b1 b0 binary-data)* B b1 b0 binary-data
ref     ::= R b3 b2 b1 b0
Personal tools