lexer_shared_input_state.sa
上传用户:afrynkmhm
上传日期:2007-01-06
资源大小:1262k
文件大小:1k
源码类别:
编译器/解释器
开发平台:
Others
- (*
- 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/lexer_shared_input_state.sa#1 $
- *)
- class ANTLR_LEXER_SHARED_INPUT_STATE is
- attr column : INT;
- attr line : INT;
- attr input : ANTLR_BYTE_BUFFER;
- attr file_name : STR;
- attr guessing : INT;
- private init : SAME is
- res : SAME := new;
- res.line := 1;
- res.guessing := 0;
- return res;
- end;
- create ( inbuf : ANTLR_BYTE_BUFFER ) : SAME
- pre ~void( inbuf )
- is
- res : SAME := init;
- res.input := inbuf;
- return res;
- end;
- create ( in : $ISTREAM ) : SAME
- pre ~void( in )
- is
- inbuf : ANTLR_BYTE_BUFFER := #ANTLR_BYTE_BUFFER( in );
- res : SAME := #SAME( inbuf );
- return res;
- end;
- end;