This wiki has undergone a migration to Confluence found Here
<meta name="googlebot" content="noindex">

Difference between revisions of "Datatypes R2 Issue 30"

From HL7Wiki
Jump to navigation Jump to search
 
 
(2 intermediate revisions by one other user not shown)
Line 3: Line 3:
 
== Introduction ==
 
== Introduction ==
  
 +
Why doesn't BAG have a ".literal" property?
 +
 +
Proposal: I guess a simple literal would just be the one for list. Another literal
 +
form could allow for numbers too. Something like:
 +
"[" { <int> <T_literal> } "]"
  
? backward compatible.
 
  
 
== Discussion ==
 
== Discussion ==
  
 +
I like the form with the number. But perhaps the number wants to be optional
 +
and distinguishable in a BAG<INT>? Attempt at defining the exact attribute
 +
grammar. [[User:Gschadow|Gschadow]] 18:04, 7 June 2007 (CDT)
 +
 +
  BAG<T>  : "[" sequence "]"  { $.equal($2) };
 +
  sequence : sequence BXIT<T>  { $.contains($1).and($.congtains($2)) }
 +
          | BXIT<T>          { $.contains($1) }
 +
          ;
 +
  BXIT<T>  : T "(" INT ")"    { $.equal(((T)$1)).and($.qty.equal($3)) }
 +
          | T                { $.equal(((T)$1)) }
 +
          ;
  
 
== Links ==
 
== Links ==
 
Back to [[Data Types R2 issues]]
 
Back to [[Data Types R2 issues]]

Latest revision as of 23:04, 7 June 2007

Data Types Issue 30: Add Bag.literal

Introduction

Why doesn't BAG have a ".literal" property?

Proposal: I guess a simple literal would just be the one for list. Another literal form could allow for numbers too. Something like:

"[" { <int> <T_literal> } "]"


Discussion

I like the form with the number. But perhaps the number wants to be optional and distinguishable in a BAG<INT>? Attempt at defining the exact attribute grammar. Gschadow 18:04, 7 June 2007 (CDT)

 BAG<T>   : "[" sequence "]"  { $.equal($2) };
 sequence : sequence BXIT<T>  { $.contains($1).and($.congtains($2)) }
          | BXIT<T>           { $.contains($1) }
          ;
 BXIT<T>  : T "(" INT ")"     { $.equal(((T)$1)).and($.qty.equal($3)) }
          | T                 { $.equal(((T)$1)) }
          ;

Links

Back to Data Types R2 issues