Annotation of OpenXM/src/ox_toolkit/bnf.oxweave, Revision 1.1
1.1 ! ohara 1: $OpenXM$
! 2:
! 3: /*&ja
! 4: CMO と OX メッセージの形式的定義.
! 5:
! 6: トークンの集合:
! 7: トークンは ( ) , + - の5つか, あるいは「大文字で表された文法記号」である.
! 8: 「大文字で表された文法記号」の定義は parse.h の TOKEN(*) あるいは T_*による.
! 9:
! 10: */
! 11: /*&en
! 12: We explain a formal definition of CMO's and OX data/command messages.
! 13: The definition is used in parse.c.
! 14:
! 15: Tokens are the followings:
! 16: '(', ')', ',', '+', '-', or symbols written by capitals.
! 17: Symbols are defined in parse.h by TOKEN(*) or T_*.
! 18:
! 19: */
! 20: /*&ja
! 21: 文法規則:
! 22: 省略記法を許すのはフラグが立っているときだけ.
! 23: 開始記号は startsymbol である. トークンの境界は空白で分けてある.
! 24: -> | はBNFの記号である. また {}* は 0 個以上の繰り返しを表す拡張BNFの
! 25: 記号である.
! 26:
! 27: */
! 28: /*&common
! 29: The following BNFs define the grammer of Common Math Objects:
! 30:
! 31: startsymbol
! 32: -> ox \n
! 33: | cmo \n
! 34: | \n
! 35:
! 36: ox
! 37: -> ( OX_COMMAND , sm )
! 38: | ( OX_DATA , cmo )
! 39:
! 40: sm
! 41: -> ( SM_COMMAND )
! 42:
! 43: cmo
! 44: -> ( cmo_null )
! 45: | ( cmo_int32 )
! 46: | ( cmo_string )
! 47: | ( cmo_mathcap )
! 48: | ( cmo_list )
! 49: | ( cmo_zero )
! 50: | ( cmo_zz )
! 51: | ( cmo_monomial32 )
! 52: | ( cmo_dms_generic )
! 53: | ( cmo_ring_by_name )
! 54: | ( cmo_distributed_polynomial )
! 55: | ( cmo_error2 )
! 56:
! 57: cmo_null
! 58: -> CMO_NULL
! 59:
! 60: cmo_int32
! 61: -> CMO_INT32 , integer
! 62:
! 63: cmo_string
! 64: -> CMO_STRING , integer , STRING
! 65: | CMO_STRING , STRING
! 66: */
! 67: /*&en
! 68: second rule is external rule
! 69: */
! 70: /*&common
! 71:
! 72: cmo_mathcap
! 73: -> CMO_MATHCAP , cmo
! 74:
! 75: cmo_list
! 76: -> CMO_LIST , integer { , cmo }*
! 77: | CMO_LIST { , cmo }*
! 78: */
! 79: /*&en
! 80: second rule is external rule
! 81: */
! 82: /*&common
! 83:
! 84: cmo_monomial32
! 85: -> CMO_MONOMIAL32 , integer { , integer }* , coef
! 86:
! 87: cmo_zz
! 88: -> CMO_ZZ , integer { , integer }*
! 89: | CMO_ZZ , integer
! 90: */
! 91: /*&en
! 92: second rule is external rule
! 93: */
! 94: /*&common
! 95:
! 96: cmo_zero
! 97: -> CMO_ZERO
! 98:
! 99: cmo_dms_generic
! 100: -> CMO_DMS_GENERIC
! 101:
! 102: cmo_ring_by_name
! 103: -> CMO_RING_BY_NAME , ( cmo_string )
! 104:
! 105: cmo_distributed_polynomial
! 106: -> CMO_DISTRIBUTED_POLYNOMIAL , integer , ringdefinition { , monomial }*
! 107: | CMO_DISTRIBUTED_POLYNOMIAL , ringdefinition { , monomial }*
! 108: */
! 109: /*&en
! 110: second rule is external rule
! 111: */
! 112: /*&ja
! 113: # リストの各要素は monomial である. 空リストの場合もOK?
! 114: # 省略記法
! 115: */
! 116: /*&common
! 117:
! 118: cmo_error2
! 119: -> CMO_ERROR2 , cmo
! 120:
! 121: monomial
! 122: -> ( cmo_zero )
! 123: | ( cmo_monomial32 )
! 124:
! 125: ringdefinition
! 126: -> ( cmo_dms_generic )
! 127: | ( cmo_ring_by_name )
! 128:
! 129: coef
! 130: -> ( cmo_zz )
! 131: | ( cmo_int32 )
! 132:
! 133: integer
! 134: -> DIGIT
! 135: | + DIGIT
! 136: | - DIGIT
! 137: */
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>