[if gte mso 9]>

Re: [edk2] VFR Specification "catenate" example issue

Subject: Re: [edk2] VFR Specification "catenate" example issue

From: "Dong, Eric" <eric.dong@intel.com>

To: "edk2-devel@lists.sourceforge.net" <edk2-devel@lists.sourceforge.net>

Date: 2014-09-01 18:06:33

Below is UEFI definition for EFI_IFR_TYPE_VALUE, for string type, it use EFI_STRING_ID to specify it, so for catenate, it uses STRING_TOKEN.

typedef union {

  UINT8           u8;

  UINT16          u16;

  UINT32          u32;

  UINT64          u64;

  BOOLEAN         b;

  EFI_HII_TIME    time;

  EFI_HII_DATE    date;

  EFI_STRING_ID   string; ///< EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION

  EFI_HII_REF     ref;    ///< EFI_IFR_TYPE_REF

  // UINT8 buffer[];      ///< EFI_IFR_TYPE_BUFFER

} EFI_IFR_TYPE_VALUE;

 

Thanks,

Eric

From: Tim Lewis [mailto:tim.lewis@insyde.com]
Sent: Wednesday, August 27, 2014 8:57 AM
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] VFR Specification "catenate" example issue

 

The example for catenate (in 2.12.11.1) appears to be incorrect. I believe that the parameters for catenate should be stringref(STRING_TOKEN), not just STRING_TOKEN. Or at least the grammar doesn’t seem to support a STRING_TOKEN in vfrExpressionConstant and the current VfrCompiler.exe complains.

 

 

string varid = MyData.String,

  prompt = STRING_TOKEN(STR_PROMPT),

  help = STRING_TOKEN(STR_HELP),

  minsize = 6,

  maxsize = 40,

  inconsistentif prompt = STRING_TOKEN(STR_CHECK),

    pushthis != catenate (STRING_TOKEN(STR_STRING_RIGHT),

                          STRING_TOKEN(STR_STRING_LEFT)),

  endif

endstring;