@@ -29,13 +29,6 @@ struct _ReadCache{T}
2929 end
3030end
3131
32- function _read_newline_or_eof (state)
33- if (p = peek (state, _Token)) != = nothing
34- _ = read (state, _Token, _TOKEN_NEWLINE)
35- end
36- return
37- end
38-
3932"""
4033 Base.read!(io::IO, model::FileFormats.LP.Model)
4134
@@ -60,7 +53,6 @@ function Base.read!(io::IO, model::Model{T}) where {T}
6053 if token. kind == _TOKEN_KEYWORD
6154 _ = read (state, _Token)
6255 keyword = Symbol (token. value)
63- _read_newline_or_eof (state)
6456 elseif token. kind == _TOKEN_NEWLINE
6557 _ = read (state, _Token, _TOKEN_NEWLINE)
6658 elseif keyword == :MINIMIZE
@@ -884,7 +876,6 @@ function _parse_objective(state::_LexerState, cache::_ReadCache)
884876 end
885877 f = _parse_expression (state, cache)
886878 MOI. set (cache. model, MOI. ObjectiveFunction {typeof(f)} (), f)
887- _read_newline_or_eof (state)
888879 return
889880end
890881
@@ -931,7 +922,6 @@ function _parse_bound_expression(state, cache)
931922 x = _parse_identifier (state, cache)
932923 set = _parse_set_suffix (state, cache)
933924 _add_bound (cache, x, set)
934- _read_newline_or_eof (state)
935925 return
936926 end
937927 # `a op x` or `a op x op b`
@@ -946,7 +936,6 @@ function _parse_bound_expression(state, cache)
946936 rhs_set = _parse_set_suffix (state, cache)
947937 _add_bound (cache, x, rhs_set)
948938 end
949- _read_newline_or_eof (state)
950939 return
951940end
952941
@@ -1051,6 +1040,5 @@ function _parse_constraint(state::_LexerState, cache::_ReadCache)
10511040 if name != = nothing
10521041 MOI. set (cache. model, MOI. ConstraintName (), c, name)
10531042 end
1054- _read_newline_or_eof (state)
10551043 return
10561044end
0 commit comments