示例#1
0
func Test_QWordBuilder_Parse2(t *testing.T) {
	qb := query.QWordBuilder(strings.NewReader(`
		$user  : ^(@)(.*)$
			${2} = String
		$test :: S
		    $(2) = StringEnum
	`))
	qword := qb.Parse("	@zozoh C(2013-09-22, 2015-07-19)  S(abc,hha, erer, jdgg gdg)")
	z.DebugPrint(qword)
}
示例#2
0
func Test_QWordBuilder_Parse(t *testing.T) {
	qb := query.QWordBuilder().LoadRulesStr(`
		$user  : ^(@)(.*)$
			${2} = String
		$ctm   :: C
			${2} = DateRegion
		$test :: T
		    $(2) = IntEnum
	`)
	qword := qb.Parse("	@pw		C(2013-09-22, 2015-07-19)  T(12,33,55,67)")
	z.DebugPrint(qword)
}