この規格ページの目次
13
X 0138-2 : 2004 (ISO/IEC 15475-2 : 2002)
7.5.4 メタ属性インスタンス
(CDIFIdentifierメタ属性以外の)メタ属性のインスタンスは, (メタモ
デルで規定する)メタ属性の名称及び(それに続く)値との列によって指定する。
メタ属性インスタンスの構文は,次のとおり規定する。
<MetaAttributeInstance> ::= <OpenScope>
<MetaAttributeName> <MetaAttributeValue>
<CloseScope>
<MetaAttributeName> ::= <MetaObjectName>
メタ属性インスタンスの例を次に示す。
(Name <MetaAttributeValue>)
7.5.5 メタ属性値
7.5.5.1 導入 メタ属性値の構文は,次のとおり規定する。
<MetaAttributeValue> ::= <BitmapValue> | <BooleanValue> | <DateValue>
| <EnumeratedValue> | <FloatValue> | <IdentifierValue>
| <IntegerValue> | <IntegerListValue> | <PointValue>
| <PointListValue> | <StringValue> | <TextValue>
| <TimeValue>
7.5.5.2 ビットマップ値 ビットマップ値は,ビットマップの高さ及び幅の寸法を前に付けたピクセル値
の並びとして規定する。ピクセル値は,それぞれの色の強さを表現した赤・緑・青の三部分から成る。ビ
ットマップ内のピクセル値は,左から右及び上から下の順序となる。
ビットマップ値の構文は,次のとおり規定する。
<BitmapValue> ::= <BitmapKeyword> <Height> <Width>
<OpenScope>
<Bitmap>
<CloseScope>
<Height> ::= <HeightKeyword> <PositiveInteger>
<Width> ::= <WidthKeyword> <PositiveInteger>
<Bitmap> ::= <PixelValue> [ <ListSeparator> <PixelValue> ] ...
<PixelValue> ::= <OpenScope>
<PixelRedIntensity> <PixelSeparator>
<PixelGreenIntensity> <PixelSeparator>
<PixelBlueIntensity>
<CloseScope>
<PixelRedIntensity> ::= <PixelIntensity>
<PixelGreenIntensity> ::= <PixelIntensity>
<PixelBlueIntensity> ::= <PixelIntensity>
有効な及び無効なビットマップ値の例を次に示す。
1) :BITMAP :HEIGHT 2 :WIDTH 2
((120,50,35),(130,80,70),
(100,28,231),(111,255,0)) - 有効
2) :BITMAP :HEIGHT 1 :WIDTH 2
――――― [JIS X 0138-2 pdf 16] ―――――
14
X 0138-2 : 2004 (ISO/IEC 15475-2 : 2002)
((120,50,35),(130,80,70)) - 有効
3) :BITMAP :HEIGHT 2 :WIDTH 2
((255,255,255),(255,255,255),
(255,255,255),(255,255,255)) - 有効
4) :BITMAP ((120,50,35),(130,80,70),
(100,28,231),(111,255,0)) - 無効: 高さと幅がない
5) :HEIGHT 1 :WIDTH 2
((120,50,35),(130,80,70)) - 無効: BITMAPキーワードがない
7.5.5.3 真理値 真理値の構文は,次のとおり規定する。
<BooleanValue> ::= <TrueValue> | <FalseValue>
真理値の例を次に示す。
1) -TRUE-
2) -FALSE-
7.5.5.4 日付値 日付値の構文は,次のとおり規定する。
<DateValue> ::= <DateKeyword> <Date> <DateClassValue>
<DateClassValue> ::= <Absolute> | <RelativePositive> | <RelativeNegative>
有効な及び無効な日付値の例を次に示す。
1) :DATE 1940/12/07 Absolute - 有効
2) :DATE 1920/07/20 - 無効: <DateClassValue> がない
3) :DATE 0002/10/11 RelativePositive - 有効
4) 1940/12/07 Absolute - 無効: DATEキーワードがない
7.5.5.5 列挙値
<EnumeratedValue> ::= !! It is a terminal symbol in the syntax. Its representation is
specified in the encoding.
参考 JIS X 0138-3では,列挙値を7.2.9で規定する。
列挙値の例を次に示す。
<Red>
7.5.5.6 浮動小数値 浮動小数値は,10-1023101023までの範囲の高々10進16けたの値をもつ。
<FloatValue> ::= !! It is a terminal symbol in the syntax. Its representation is
specified in the encoding.
参考 JIS X 0138-3では,浮動小数値を7.2.5で規定する。
有効な浮動小数値の例を次に示す。
1) #f4E9
2) #f123.45E2
3) #f-123.45E15
4) #f+0.23E5
5) #f0.23E-3
6) #f0.23E+3
7.5.5.7 識別子値
<IdentifierValue> ::= !! It is a terminal symbol in the syntax. Its representation is
――――― [JIS X 0138-2 pdf 17] ―――――
15
X 0138-2 : 2004 (ISO/IEC 15475-2 : 2002)
specified in the encoding.
参考 JIS X 0138-3では,識別子値を7.2.8で規定する。
識別子値の例を次に示す。
*johnBrownsBody*
7.5.5.8 整数値 整数値は,10進数,2進数,16進数又は8進数として表現する。
整数値の構文は,次のとおり規定する。
<IntegerValue> ::= <DecimalIntegerValue> | <BinaryValue> | <HexaDecimalValue>
| <OctalValue>
整数値の例を次に示す。
1) #d12345 - 正の10進数
2) #d-12345 - 負の10進数
3) #d+12345 - 正の10進数
4) #b10101 - 正の2進数
5) #b-10101 - 負の2進数
6) #o31727 - 正の8進数
7) #o-31727 - 負の8進数
8) #h1e2cf - 正の16進数
9) #hffffffff - 正の16進数
10) #h-ffffffff - 負の16進数
7.5.5.9 整数並び値 整数並びは,整数の列とする。
その値,整数並び値の構文は,次のとおり規定する。
<IntegerListValue> ::= <IntegerListKeyword>
<OpenScope>
<IntegerValue> [ <ListSeparator> <IntegerValue> ] ...
<CloseScope>
有効及び無効な整数並び値の例を次に示す。
1) :INTEGERLIST (#d10,#d20,#d11,#d15,#d26,#d32) - 有効
2) :INTEGERLIST (#b10101,#h32fe,#o37712) - 有効
3) :INTEGERLIST (#d10,#d2.4) - 無効: 2.4は,整数値ではない。
4) (#d10,#d20,#d11,#d15, #d32) - INTEGERLISTキーワードがない。
7.5.5.10 位置値 位置値は, x,y及びz座標を表現する三つの整数値で規定する。
位置値の構文は,次のとおり規定する。
<PointValue> ::=
<PointKeyword> <Point>
<Point> ::= <OpenScope>
<XValue> <PointSeparator>
<YValue> <PointSeparator>
<ZValue>
<CloseScope>
<XValue> ::= <Integer>
――――― [JIS X 0138-2 pdf 18] ―――――
16
X 0138-2 : 2004 (ISO/IEC 15475-2 : 2002)
<YValue> ::= <Integer>
<ZValue> ::= <Integer>
有効及び無効な位置値の例を次に示す。
1) :POINT(0 0 0) - 有効
2) :POINT(1 303 292) - 有効
3) :POINT(20 30) - 無効: 三つの座標を必要とする。
4) :POINT(qq eo 50) - 無効: 整数値でなければならない。
7.5.5.11 位置並び値 位置並びは,位置の列とする。
その値,位置並び値の構文は,次のとおり規定する。
<PointListValue> ::= <PointListKeyword>
<OpenScope>
<Point> [ <ListSeparator> <Point> ] ...
<CloseScope>
<Point> ::= <OpenScope>
<XValue> <PointSeparator>
<YValue> <PointSeparator>
<ZValue>
<CloseScope>
位置並び値の例を次に示す。
1) :POINTLIST ((0 0 0),(1 1 1),(3 3 3))
- 有効
2) :POINTLIST ((1 303 292),(321 22 33))
- 有効
3) :POINTLIST 12) - 無効: <OpenScope>がない。
4) ((0 0 0),(1 1 1)) - 無効: POINTLISTキーワードがない。
7.5.5.12 文字列値 文字列値は,文字の列として規定する。
文字列値の構文は,次のとおり規定する。
<StringValue> ::= <String>
文字列値の例を次に示す。
"This is a string"
7.5.5.13 テキスト値 テキストのデータ型は,文字の集りとして表現し,印字可能である必要はなく事前
に決定する最大長も必要ない。テキスト値は,一つ以上のテキスト文字列の列として指定する。つまり,
テキスト値は,個々のテキスト文字列の内容を連結したものとする。
テキスト値の構文は,次のとおり規定する。
<TextValue> ::= <TextString> [ <ListSeparator> <TextString> ] ...
使用する特定の符号化では,個々のテキスト文字列の最大長を制限してもよい。
テキスト値の例i)を次に示す。
1) #[Program SumIntegers(Input,Output);
var total,inputinteger : Integer;
begin
――――― [JIS X 0138-2 pdf 19] ―――――
17
X 0138-2 : 2004 (ISO/IEC 15475-2 : 2002)
while not EOF(Input) o
begin
ReadLn(inputinteger);
total:=total+inputinteger
end;
WriteLn('Total =',total);
end.]#
- 有効
注1)テキスト値の例は,表記上用いる復帰,改行のような空白類文字を使って示す。<eof>は,
ファイルの最後を表すために用いる。
7.5.5.14 時間値 時間値の構文は,次のとおり規定する。
<TimeValue> ::= <TimeKeyword> <Time> <TimeClassValue>
<TimeClassValue> ::= <AbsoluteUTC> | <AbsoluteLocal> | <RelativePositive> |
<RelativeNegative>
有効な及び無効な時間値の例を次に示す。
1) :TIME 07:20:23 AbsoluteUTC
- 有効
2) :TIME 29:25:19 AbsoluteLocal
- 無効: 29は,不適切な時間の値
3) :TIME 03:59:59
- 無効: <TimeClassValue>がない。
4) :TIME 00:00:00.250 RelativePositive
- 有効
5) 07:20:23 AbsoluteUTC
- 無効: TIMEキーワードがない
7.6 コメント
コメントは,構文の中のどの二つの終端記号の間に現れてもよい。コメントは,印字可
能文字の列で構成する。埋めこまれた空白類文字の使用は許される。
<Comment>::= !! It is a terminal symbol in the syntax. Its representation is
specified in the encoding.
参考 JIS X 0138-3では,コメントを 7.2.12で規定する。
使用する特定の符号化ではコメントの最大長を制限してもよい。
有効及び無効なコメントの例ii)を次に示す。
1) #| this is
a multi-line
comment
|# - 有効
2) ( 1 2 #| buckle
my shoe |# 3 4) - 有効(行内コメント)
――――― [JIS X 0138-2 pdf 20] ―――――
次のページ PDF 21
JIS X 0138-2:2004の引用国際規格 ISO 一覧
- ISO/IEC 15475-2:2002(IDT)
JIS X 0138-2:2004の国際規格 ICS 分類一覧
JIS X 0138-2:2004の関連規格と引用規格一覧
- 規格番号
- 規格名称