anchor.diff:  ColumnConstraint
   KeyDefinition
   DataType
  +KeyFieldList
  +KeyField
   .
   
   Terminals
  
positive.code:        type = DataType,
         optional = false}.
  
  make_key_definition({partition_key, _}, {word, FieldName}) ->
      #partition_key_v1{
         ast = [#param_v1{
                   name = FieldName
                  }]};
  make_key_definition({local_key, _}, {word, FieldName}) ->
      #local_key_v1{
         ast = [#param_v1{
                   name = FieldName
                  }]}.
  
  make_table_element_list(A, {table_element_list, B}) ->
      {table_element_list, [A] ++ B};
  make_table_element_list(A, B) ->
      {table_element_list, [A, B]}.
  
  
  make_table_definition({word, BucketName}, Contents) ->
      PartitionKey = find_partition_key(Contents),
      LocalKey = find_local_key(Contents),
      Fields = find_fields(Contents),
      #ddl_v1{
  
negative.code: DataType -> varchar : '$1'.
  
  KeyDefinition ->
      partition_key openb KeyFieldList closeb : make_key_definition('$1', '$3').
  KeyDefinition ->
      local_key openb KeyFieldList closeb : make_key_definition('$1', '$3').
  
  KeyFieldList -> KeyField comma KeyFieldList : make_key_field_list('$1', '$3').
  KeyFieldList -> KeyField : make_key_field_list('$1', {key_field_list, []}).
  
  KeyField -> Word : '$1'.
  
  Erlang code.
  
  