[ibis-macro] Re: question about string parameter in AMI

  • From: Mike Steinberger <msteinb@xxxxxxxxxx>
  • To: Arpad_Muranyi@xxxxxxxxxx
  • Date: Wed, 17 Mar 2010 19:10:36 -0500

Arpad-

Consider:
1. A leaf can either be a parameter name followed by a single value or a parameter name followed by an array of values. 2. In the case of an array of values, the individual values must be separated by white space. For example, (double_foo 1.0e37 0.0254 3.1415926536) is a valid leaf which has an array of three floating point values. However, (double_foo 1.0e370.02543.1415926536) is not a valid leaf.
3. A value can be a string type value.
4. There is nothing in the spec that prohibits an array of string type values.

For example:
(Carmina "In taberna quando sumus non curamus quid sit humus")
is a leaf that has a single string-type value. The sting value happens to have white space in it, and that's perfectly valid. (Carmina "In" "taberna" "quando" "sumus" "non" "curamus" "quid" "sit" "humus")
is an entirely valid leaf that has an array of string-type values.
So what do you want to do with:
(Carmina In taberna quando sumus non curamus quid sit humus)
The answer is that it can be unambiguously interpreted as a leaf which has an array of string-type values. It could not be interpreted as a leaf with a single string-type value. Conversely,
(13 "Ego, Ego sum abbas, sum abbas cucaniensis")
can be unambiguously interpreted as a leaf with a single string-type value.

I can see, however, how such syntactic conundra could drive one to drink. (-;

Mike S.

Muranyi, Arpad wrote:
Mike,

Since when can param and value be interpreted as an array of string?
According to the spec a string begins and ends with a double quote
("), so the only way I see those two words being a string array is
if you did "param" "value".  Am I missing something?


| ASCII string following Description describes a reserved parameter,
| model specific parameter, or the Algorithmic model itself. It is used
| by the EDA platform to convey information to the end-user. The entire
| line has to be limited to IBIS line length specification. String
| literals begin and end with a double quote (") and no double quotes
are
| allowed inside the string literals.


Arpad
======================================================================

-----Original Message-----
From: ibis-macro-bounce@xxxxxxxxxxxxx
[mailto:ibis-macro-bounce@xxxxxxxxxxxxx] On Behalf Of Mike Steinberger
Sent: Wednesday, March 17, 2010 8:36 AM
To: fangyi_rao@xxxxxxxxxxx
Cc: ibis-macro@xxxxxxxxxxxxx
Subject: [ibis-macro] Re: question about string parameter in AMI

Fangyi-

It looks like this one's been sitting out there for a day or so, so I'll

offer an answer.

The answer depends partially on whether or not "param_value" contains white space. If it does not, then either form should work equally well in the parameter string, and the parser in the model should support either form without complaint since both forms are fully compliant with the published syntax. The parser we published in 2007 does, so I don't see any excuse for failing to provide this functionality.

If "param_value" is actually "param value", then (param_name "param value") will work, but (param_name param value) will be mistakenly interpreted as an array of strings.

Mike S.

fangyi_rao@xxxxxxxxxxx wrote:
Hi, Experts;

Shall the double quote of the value of a string parameter be included in the input parameter string of the Init call? For example, if an AMI

model has a string parameter with name "param_name" and value "param_value", should the input parameter string be

(param_name "param_value")

or

(param_name param_value)

Thanks in advance,

Fangyi


---------------------------------------------------------------------
IBIS Macro website  :  http://www.eda.org/pub/ibis/macromodel_wip/
IBIS Macro reflector:  //www.freelists.org/list/ibis-macro
To unsubscribe send an email:
  To: ibis-macro-request@xxxxxxxxxxxxx
  Subject: unsubscribe

---------------------------------------------------------------------
IBIS Macro website  :  http://www.eda.org/pub/ibis/macromodel_wip/
IBIS Macro reflector:  //www.freelists.org/list/ibis-macro
To unsubscribe send an email:
  To: ibis-macro-request@xxxxxxxxxxxxx
  Subject: unsubscribe


---------------------------------------------------------------------
IBIS Macro website  :  http://www.eda.org/pub/ibis/macromodel_wip/
IBIS Macro reflector:  //www.freelists.org/list/ibis-macro
To unsubscribe send an email:
 To: ibis-macro-request@xxxxxxxxxxxxx
 Subject: unsubscribe

Other related posts: