我在旧系统之上编写工具,该系统使用一些准标记格式的许多配置文件。或者,这可能是一种混蛋格式,过去曾经分支过一些真正的格式。没有标题。它从
开始#
( section1
Val1 = ""
Val2 = "1"
Val3 = "1"
Val3 = "2"
Val3 = "Anchor"
)
( slave
Name = ""
Val1 = ""
Val2 = "1"
Val3 = "1"
Val7 = "0x42"
Val8 = "Default"
Val9 = 0
Val10 = 2.000000000
)
( trend_sys
# tr_sav_intv 20 1700
# tr_max_ps_len 300
# ps_trobj "IG1115" "Meas1" "PRIM" 2 1 1 1 0 300 0 0 1.000000 150 150 "" 0 0 0
# hs_trobj "IG1115" "Meas1" "PRIM" 2 1 1 0 0 40 0 0 0.000000 0 0
)
另一个例子(实际例子)
# storedate 21/04/10 12:07.22 (station1) station0
( Device
BlockNo = 1
BlockType = 1
)
( Device
BlockNo = 2
BlockType = 1
)
( Device
BlockNo = 3
BlockType = 1
)
另一个版本有额外的部分级别。
{ SuperSection1
( Section1
val1 = ""
)
( Section2
val1 = ""
)
}
{ SuperSection2
( Section1
val1 = ""
)
( Section2
val1 = ""
)
}
请注意
这种格式有名字吗?这种格式有.NET支持吗?
答案 0 :(得分:1)
不,这种格式没有我所知道的名称,不,.NET不提供原生支持。但它为您提供了构建解析器的能力: - )