public override void EnterFrom(SelectSQLParser.FromContext context) { var table = context.table(); var tableLockType = context.tableLockType(); if (table == null || table.IsEmpty) throw new MissingTableNameException(); var tableName = table.GetText(); if (string.IsNullOrEmpty(tableName)) throw new MissingTableNameException(); TableReadType readType = TableReadType.NONE; if (tableLockType != null && !tableLockType.IsEmpty) { var nolockOption = tableLockType.NOLOCK(); var readpastOption = tableLockType.READPAST(); if (nolockOption != null) readType = TableReadType.NOLOCK; else if (readpastOption != null) readType = TableReadType.READPAST; } this.SelectStmt.TableDescriptor = new TableDescriptor() { TableName = tableName, TableReadType = readType }; }