2 // (C) Sergey Chaban (serge@wildwestsoftware.com)
\r
6 namespace Mono.ILASM {
\r
10 public class ScannerAdapter : yyParser.yyInput {
\r
12 private ITokenStream tokens;
\r
16 /// <param name="tokens"></param>
\r
17 public ScannerAdapter (ITokenStream tokens)
\r
19 this.tokens = tokens;
\r
25 public ITokenStream BaseStream {
\r
32 // yyParser.yyInput interface
\r
37 /// <returns></returns>
\r
38 public bool advance ()
\r
40 return (tokens.NextToken != ILToken.EOF);
\r
45 /// <returns></returns>
\r
48 return tokens.LastToken.TokenId;
\r
53 /// <returns></returns>
\r
54 public object value ()
\r
56 return tokens.LastToken.Value;
\r