Esempio n. 1
0
 internal LALRStack(EGT loaded, bool trimReductions)
 {
     m_loaded         = loaded;
     m_TrimReductions = trimReductions;
     m_CurrentLALR    = m_loaded.InitialLRState;
     //=== Create stack top item. Only needs state
     m_Stack.Push(new TokenState(null, m_loaded.InitialLRState, -1));
 }
Esempio n. 2
0
 /// <summary>
 /// Loads parse tables from the specified BinaryReader.
 /// Only EGT (version 5.0) is supported.
 /// </summary>
 /// <param name="Reader">A BinaryReader instance wich wraps the EGT-format grammar file.</param>
 /// <exception cref="ParserException">If the passed-in grammar file has an unexpected format or cannot be read.</exception>
 /// <remarks>It is the caller's resposibility to call Reader.Close() after this method completes.</remarks>
 public void LoadTables(BinaryReader Reader)
 {
     m_loaded = new EGT(Reader);
 }
Esempio n. 3
0
 internal Lexer(EGT loaded, TextReader source, Converter <char, ushort> charToShort)
 {
     m_loaded      = loaded;
     m_source      = source;
     m_charToShort = charToShort;
 }
Esempio n. 4
0
 internal GroupTerminals(EGT loaded, Lexer lexer)
 {
     m_loaded = loaded;
     m_Lexer  = lexer;
 }