Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Thrift Wiki" for change 
notification.

The following page has been changed by ChadWalters:
http://wiki.apache.org/thrift/ThriftIDL

The comment on the change is:
Finish fleshing out IDL production rules

------------------------------------------------------------------------------
  
  {{{Document        ::=  Header* Definition*}}}
  
- {{{Header          ::=  Include | CppInclude | Namespace | XsdNamespace}}}
+ {{{Header          ::=  Include | CppInclude | Namespace}}}
  
  {{{Include         ::=  'include' Literal}}}
  
  {{{CppInclude      ::=  'cpp_include' Literal}}}
  
- {{{Namespace       ::=  'namespace' ( ( NamespaceType Identifier ) |}}}[[BR]]
+ {{{Namespace       ::=  'namespace' ( ( NamespaceScope Identifier ) |}}}[[BR]]
+ {{{                       ( 'xsd_namespace' Literal ) |}}}[[BR]]
- {{{                     ( 'smalltalk.category' STIdentifier ) )}}}
+ {{{                       ( 'smalltalk.category' STIdentifier ) |}}}[[BR]]
+ {{{                       ( 'smalltalk.prefix' Identifier ) )}}}
  
- {{{NamespaceType   ::=  '*' | LangID | 'smalltalk.prefix'}}}
+ {{{NamespaceScope  ::=  '*' | LangID}}}
  
  {{{LangID          ::=  'cpp' | 'java' | 'php' | 'py' | 'perl' | 'rb' 
|}}}[[BR]]
  {{{                     'cocoa' | 'csharp'}}}
  
- {{{XsdNamespace    ::=  'xsd_namespace' Literal}}}
- 
  {{{Definition      ::=  Const | Typedef | Enum | Senum | Struct | Xception | 
Service}}}
  
- {{{Const           ::=  'const' FieldType Identifier '=' ConstValue}}}
+ {{{Const           ::=  'const' FieldType Identifier '=' ConstValue 
ListSeparator?}}}
  
  {{{Typedef         ::=  'typedef' DefinitionType Identifier}}}
  
- {{{Enum            ::=}}}
+ {{{Enum            ::=  'enum' Identifier '{' (Identifier ('=' IntConstant)* 
ListSeparator?)*}}}
  
- {{{Senum           ::=}}}
+ {{{Senum           ::=  'senum' Identifier '{' (Literal ListSeparator?)* }}}
  
  {{{Struct          ::=  'struct' Identifier 'xsd_all'? '{' Field* '}'}}}
  
@@ -44, +44 @@

  
  {{{Service         ::=  'service' Identifier ( 'extends' Identifier )? '{' 
Function* '}'}}}
  
- {{{Field           ::=  FieldID? FieldReq? Identifier ('= ConstValue)? 
XsdFieldOptions}}}
+ {{{Field           ::=  FieldID? FieldReq? Identifier ('= ConstValue)? 
XsdFieldOptions ListSeparator?}}}
  
  {{{FieldID         ::=  IntConstant ':'}}}
  
@@ -71, +71 @@

  
  {{{CppType         ::=  'cpp_type' Literal}}}
  
- {{{Function        ::=}}}
+ {{{Function        ::=  'async'? FunctionType Identifier '(' Field* ')' 
Throws? ListSeparator?}}}
  
  {{{FunctionType    ::=  FieldType | 'void'}}}
  
- {{{ConstValue      ::=}}}
+ {{{Throws          ::=  'throws' '(' Field* ')'}}}
+ 
+ {{{ConstValue      ::=  IntConstant | DoubleConstant | Literal | Identifier | 
ConstList | ConstMap}}}
+ 
+ {{{ConstList       ::= '[' (ConstValue ListSeparator?)* ']'}}}
+ 
+ {{{ConstMap        ::= '{' (ConstValue ':' ConstValue ListSeparator?)* '}'}}}
  
  {{{IntConstant     ::=  ('+' | '-')? Digit+}}}
+ 
+ {{{DoubleConstant  ::=  ('+' | '-')? Digit* ('.' Digit+)? ( ('E' | 'e') 
IntConstant )?}}}
+ 
  
  {{{Literal         ::=  ('"' [^"]* '"') | ("'" [^']* "'")}}}
  
  {{{Identifier      ::=  ( Letter | '_' ) ( Letter | Digit | '.' | '_' )*}}}
  
  {{{STIdentifier    ::=  ( Letter | '_' ) ( Letter | Digit | '.' | '_' | '-' 
)*}}}
+ 
+ {{{ListSeparator   ::=  ',' | ';'}}}
  
  {{{Letter          ::=  ['A'-'Z'] | ['a'-'z']}}}
  
@@ -98, +109 @@

  
  = To Do/Questions =
  
- What is 'slist'?
+ Why does position of {{{CppType}}} vary between {{{SetType}}} and 
{{{ListType}}}?
  
- Why does CppType vary between SetType and ListType?
+ Why can't {{{DefinitionType}}} be the same as {{{FieldType}}} (ie: include 
{{{Identifier}}})?
  
- Why can't DefinitionType be the same as FieldType (ie: include Identifier)?
+ Examine the {{{smalltalk.prefix}}} and {{{smalltalk.category}}} status (esp 
{{{smalltalk.category}}}, which takes {{{STIdentifier}}} as its argument)...
  
+ What to do about {{{ListSeparator}}}? Do we really want to be as lax as we 
currently are?
+ 
+ Should {{{Field*}}} really be {{{Field+}}} in {{{Struct}}}, {{{Enum}}}, etc.?
+ 

Reply via email to