📄 token_stream_basic_filter.sa
字号:
(* ANTLR Translator Generator Project led by Terence Parr at http://www.jGuru.com Software rights: http://www.antlr.org/RIGHTS.html $Id: //depot/code/org.antlr/release/antlr-2.7.0/lib/sather/Antlr/token_stream_basic_filter.sa#1 $*)class ANTLR_TOKEN_STREAM_BASIC_FILTER{ TOKEN < $ANTLR_TOKEN } < $ANTLR_TOKEN_STREAM{ TOKEN } is -- the set of token types to discard attr discard_set : INT_SET; -- the input stream private attr input : $ANTLR_TOKEN_STREAM{TOKEN}; discard_type( ttype : INT ) is discard_set := discard_set.insert( ttype ); end; create( input : $ANTLR_TOKEN_STREAM{TOKEN} ) : SAME is res : SAME := new; res.input := input; res.discard_set := #INT_SET; return res; end; next_token : TOKEN is tok : TOKEN := input.next_token; loop while!( ~void(tok) and discard_set.member( tok.ttype ) ); tok := input.next_token; end; return tok; end; end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -