(NS_KEY_BEGIN) space (NOP,NS_NAME_END,PAUSE) /*属性名结束*/ = (NOP,NS_KEY_END,PAUSE) /*属性赋值符*/ & (NOP,NS_KEY_BEGIN,SKIP) /*字符转义*/ name (NOP,NS_KEY_BEGIN,NEXT) /*继续属性名*/ other (NOP,NIL_FAILED,STOP) /*非法字符*/ (NS_KEY_END) space (NOP,NS_KEY_END,NEXT) /*忽略空格*/ = (NOP,NS_ASIGN,NEXT) /*属性赋值符*/ other (NOP,NIL_FAILED,STOP) /*非法字符*/ (NS_ASIGN) space (NOP,NS_ASIGN,NEXT) /*忽略空格*/ “ (NOP,NS_VAL_BEGIN,NEXT) /*属性赋值打开*/ ‘ (NOP,NS_VAL_BEGIN,NEXT) /*属性赋值打开*/ other (NOP,NIL_FAILED,STOP) /*非法字符*/ (NS_VAL_BEGIN) “ (NOP,NS_VAL_END,NEXT) /*属性值结束*/ ‘ (NOP,NS_VAL_END,NEXT) /*属性值结束*/ & (NOP,NS_VAL_BEGIN,SKIP) /*字符转义*/ token (NOP,NS_VAL_BEGIN,NEXT) /*继续属性值*/ other (NOP,NIL_FAILED,STOP) /*非法字符*/ (NS_VAL_END) space (NOP,NS_VAL_END,NEXT) /*忽略空格*/ > (NOP,TG_INT_CLOSE,NEXT) /*标记中断*/ other (NOP,NS_KEY_BEGIN,PAUSE) /*属性名开始*/ (TG_INT_CLOSE) < (PUSH,TG_OPEN,NEXT) /*标记开始*/ other (NOP,NS_TEXT_BEGIN,PAUSE) /*元素文本开始*/ (NS_TEXT_BEGIN) < (NOP,NS_TEXT_END,PAUSE) /*元素文本结束*/ & (NOP,NS_TEXT_BEGIN_BEGIN,SKIP) /*字符转义*/ token (NOP,NS_TEXT_BEGIN,NEXT) /*继续元素文本*/ other (NOP,NIL_FAILED,STOP) /*非法字符*/ (NS_TEXT_END) < (PUSH,TG_OPEN,NEXT) /*标记开始*/ other (NOP,NIL_FAILED,STOP) /*非法字符*/ (TG_PRE_CLOSE) > (NOP,TG_CLOSE,PAUSE)/*标记结束*/ name (NOP,TG_PRE_CLOSE,NEXT) /*继续关闭标记的元素名*/ other (NOP,NIL_FAILED,STOP) /*无效字符*/ (TG_CLOSE) > (POP,NEXT) /*标记关闭,出栈*/ other (NOP,NIL_FAILED,STOP) /*非法字符*/ 对XML声明,本文只做了忽略处理,可以通过增加XML声明的状态和状态转移列表,进而支持XML声明的分析。 |
正在阅读:网页编程必看:XML文法分析网页编程必看:XML文法分析
2004-12-06 10:14
出处:CSDN
责任编辑:linjixiong
键盘也能翻页,试试“← →”键