Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我有类似的东西:
rule: (rule2 | rule3) {;}; //How can i get at this point rule2 or rule3 text? rule2: HELLO+; rule3: WORLD*;
我想获得 rule2 或 rule3 文本,但我得到的只是 a type_return,它只给了我 astart和 a stop。
type_return
start
stop
有任何想法吗?
尝试:
rule : r=(rule2 | rule3) {String txt = $r.text;} ;