public void Start(CsReader inFile) { m_state = "YYINITIAL"; // 4.3e inFile = new CsReader(inFile, m_tokens.m_encoding); m_LineManager = inFile.lm; if (!inFile.Eof()) { for (m_buf = inFile.ReadLine(); !inFile.Eof(); m_buf += inFile.ReadLine()) { m_buf += "\n"; } } if (m_tokens.toupper) { m_buf = m_buf.ToUpper(); } m_pch = 0; }
public void Start(CsReader inFile) { this.m_state = "YYINITIAL"; inFile = new CsReader(inFile, this.m_tokens.m_encoding); this.m_LineManager = inFile.lm; if (!inFile.Eof()) { this.m_buf = inFile.ReadLine(); while (!inFile.Eof()) { this.m_buf += "\n"; this.m_buf += inFile.ReadLine(); } } if (this.m_tokens.toupper) { this.m_buf = this.m_buf.ToUpper(); } this.m_pch = 0; }
public SourceLineInfo(LineManager lm, int pos) { lineNumber = lm.lines; startOfLine = 0; endOfLine = lm.end; charPosition = pos; rawCharPosition = pos; for (LineList p = lm.list; p != null; p = p.tail, lineNumber--) { if (p.head > pos) { endOfLine = p.head; } else { startOfLine = p.head + 1; rawCharPosition = p.getpos(pos); charPosition = pos - startOfLine + 1; break; } } }
/// <exclude/> public void Start(CsReader inFile) { m_state="YYINITIAL"; // 4.3e inFile = new CsReader(inFile,m_tokens.m_encoding); m_LineManager = inFile.lm; if (!inFile.Eof()) for (m_buf = inFile.ReadLine(); !inFile.Eof(); m_buf += inFile.ReadLine()) m_buf+="\n"; if (m_tokens.toupper) m_buf = m_buf.ToUpper(); m_pch = 0; }
/// <exclude/> public SourceLineInfo(LineManager lm,int pos) { lineNumber = lm.lines; startOfLine = 0; endOfLine = lm.end; charPosition = pos; rawCharPosition = pos; for (LineList p = lm.list; p!=null; p = p.tail, lineNumber-- ) if (p.head>pos) endOfLine = p.head; else { startOfLine = p.head+1; rawCharPosition = p.getpos(pos); charPosition = pos-startOfLine+1; break; } }