PageRenderTime 12ms CodeModel.GetById 8ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/fparsec/main/changes.txt

http://github.com/sandersn/fing
Plain Text | 271 lines | 238 code | 33 blank | 0 comment | 0 complexity | b3e823a3fad870e5abcc3db93cedb25d MD5 | raw file
  1Version 0.8
  2-----------
  3Todo before release:
  4- updating the documentation
  5
  6New features/ improvements:
  7- case-insensitive matching with `pstringCI`, `charsTillStringCI`, etc.
  8  (using the Unicode 1-to-1 case folding mappings for chars in the BMP)
  9- various new parsers and combinators, including `restOfLine`,
 10  `skipToString`, `manySatisfyMinMax`, `manyStrings`, `withSkippedString`
 11- new functions `runParserOnSubstring` and `runParserOnSubstream`
 12- various performance improvements
 13- F# 1.9.6.16 compatibility
 14
 15Design changes:
 16- standardized on a single input stream type (`FParsec.CharStream`)
 17  and a single concrete parser state type (`FParsec.State`)
 18- refactored the `Reply<_,_>`, `ErrorMessage` and `ParserError` types:
 19  * error replies now also contain a complete `State`
 20  * whether a parser has changed the state is now determined by
 21    checking the input and the output state for equality, instead of testing
 22    the `Consumed` flag
 23  * replaced the `Reply<_,_>.Flags` with a `Status` field
 24  * replaced the various helper functions for constructing a `Reply` with
 25    three overloaded `Reply<_,_>` constructors (with different arities)
 26- all char parsers are now "newline aware", i.e. they normalize
 27  any of the three standard newline representations ("\n", "\r\n", "\r")
 28  to "\n" and they properly increment the line count whenever they parse
 29  a newline; this means that the BEHAVIOUR OF ALMOST ALL CHAR PARSERS HAS
 30  CHANGED WITH REGARD TO HOW NEWLINE CHARS ARE HANDLED
 31
 32Bug fixes:
 33- The `CharStream` class now uses the serialization API to persist the decoder
 34  state for backtracking purposes. Previously it relied on the decoder loosing
 35  its state at block boundaries after a certain sequence of method calls. The
 36  previous approach works in practice for the .NET decoders of the standard
 37  unicode encodings and for simple stateless encodings like ASCII and ANSI,
 38  but it relies on undocumented behaviour and it does not work reliably for
 39  encodings like GB18030, ISO-2022 or ISCII.
 40- In previous FParsec versions the `CharStream` file path/System.IO.Stream
 41  constructors failed with an `IndexOutOfRange` exception when the file/stream
 42  was empty and encoding detection was not turned off
 43  (reported by Vesa Karvonen - thanks Vesa!).
 44- In previous FParsec versions the `NumberLiteral.String` returned by the
 45  `numberLiteral` parser included parsed suffix chars despite the
 46  documentation claiming the opposite. (The testing code was buggy too.)
 47  Applications that rely on this behaviour can now use the new 
 48  `NumberLiteralOptions.IncludeSuffixCharsInString` to force the 
 49  `numberLiteral` parser to include any suffix chars in the returned string.
 50
 51Other breaking changes:
 52- renamed the module `CharParser` to `CharParsers`
 53- moved `CharParser.OperatorPrecedenceParser` into separate module
 54
 55- FParsec.Primitives:
 56  * (SUBTLE CHANGE) renamed `message` to `fail` and `fail` to `failFatally`
 57  * renamed `pair`, `triple` and `quad` to `tuple2`, `tuple3` and `tuple4`
 58  * renamed `manyFoldLeft` to `manyFold` and changed the
 59    argument order of the accumulator and function argument
 60  * removed `manyFoldRight`
 61  * renamed `count` to `parray` and changed the return type,
 62    renamed `skipCount` to `skipArray`
 63  * renamed `followedBy` and `notFollowedBy` to `followedByL` and
 64    `notFollowedByL` and introduced `followedBy` and `notFollowedBy` functions
 65    that take no second argument
 66  * moved `ParserResult<_>` to `CharParsers` and changed constructor arguments
 67  * removed applyParser
 68  * removed `|>>=`, now `>>=` automatically uses an optimized branch for
 69    uncurried functions
 70  * removed `endBy` and `endBy1` (`endBy p sep` can be replaced with
 71    `many (p .>> sep)` and `endBy1 p sep` with `many1 (p .>> sep)`)
 72
 73- FParsec.CharParsers:
 74  * renamed `manyTillString` to `charsTillString`
 75  * removed `applyParser` from the public interface
 76  * removed `getIndex`, `skip`, `registerNL`, `extract`, `regexp`
 77    (these low-level operations should be done directly through the
 78    `State<_>`/`CharStream.Iterator` interface)
 79  * removed `anyCharOrNL` (no longer needed, see design changes above)
 80  * removed `nSatisfy` (can be replaced with `manySatisfyMinMax`)
 81  * removed `unicodeDigit` and `unicodeNumber` (can be replaced with
 82    `satisfy System.Char.IsDigit` and `satisfy System.Char.IsNumber`)
 83  * moved the helper functions `expectedError`, `unexpectedError` etc. into
 84    the `Error` module
 85
 86- FParsec.CharStream:
 87  * string constructor takes more arguments
 88  * `Iterator.Peek(i)` now returns the `EndOfStreamChar` char instead
 89    of throwing an exception if the char peeked at lies before the beginning
 90    of the stream
 91
 92Version 0.7.3.1, 2009-02-26
 93---------------------------
 94- Fixed a bug in `CharParser.normalizeNewlines`/`CharStream.NormalizeNewlines`.
 95  This bug also affected the `skipped` and `manyTillString` parsers, which
 96  internaly call `normalizeNewlines` to normalize the returned string.
 97
 98  The bug was reported by Greg Chapman - thanks Greg!
 99
100  When given a multi-line string in which the lines are delimited by "\r\n" but
101  the last line does not end in a newline, the buggy `normalizeNewlines`
102  replaced the chars on the last line with '\n` chars.
103
104- Changed the signature of `Helper.SkipOverWhitespace`.
105
106Known issue:
107- Visual Studio rebuilds the whole solution every time one
108  tries to run the "Test" executable under the debugger.
109  This behaviour is caused by a known bug in the F# Visual
110  Studio plugin. I'm not aware of any workaround.
111
112Version 0.7.3, 2008-12-08
113-------------------------
114Breaking changes (all of which should have little or no impact
115on existing code bases):
116- `CharStream.Iterator` instances now compare equal if and only if they belong
117  to the same `CharStream` and point to the same index (previously they
118  compared only equal if their internal representations were identical)
119- the constructor argument of `Error.otherError` is now expected to be
120  comparable with F#'s structural comparison function `compare`,
121  see http://research.microsoft.com/fsharp/manual/spec2.aspx#_Toc207785725
122- the signature of the second `ParserError.ToString` overload has changed
123- `CharParser.errorToString` and `printErrorLine` have been deprecated
124
125New features:
126- reimplemented the error formatting code in `FParsec.Error`
127- added new `State<_>.AdvanceTo` and `CharStream.Iterator.Advance` overloads
128- slightly modified the error reporting in `Primitives.sepEndBy`
129- some documentation fixes
130
131Version 0.7.2, 2008-11-17
132-------------------------
133
134- added `CharParser.OperatorPrecedenceParser`
135- changed the overflow checking in `pint32` such that it will
136  not be affected by an expected future change in F#'s
137  int32 -> uint64 conversion behaviour
138- added `CharParser.pint16`, `puint16`, `pint8`, `puint8`
139- changed the signatures in CharParser.fsi to use the `Parser<_,_>` type
140  abbreviation
141- fixed outdated documentation of `CharParser.expectedError`
142- some minor optimizations
143
144Version 0.7.1, 2008-09-29
145-------------------------
146
147Breaking changes:
148- renamed `Primitives.Reply._tag` member to `Flags` and gave
149  it a proper enumeration type
150- `CharParser.State` is now a reference type
151- Removed `CharParser.State.Flags` member
152- deprecated `Primitives.reconstructError`
153
154Version 0.7.0.1, 2008-09-23
155---------------------------
156
157Breaking change:
158- changed the case of the `FParsec.Error.Pos` members
159  (This wasn't already done in 0.7 because of an oversight.)
160
161Version 0.7, 2008-09-13
162-------------------------
163
164Bugfixes:
165- made `FParsec.Error.Pos` IComparable to prevent `ParserError.ToString`
166  from throwing an exception under rare circumstances
167- corrected the argument checking for some `CharStream.Iterator` methods
168  for very large arguments
169
170New features:
171- compatibility with the F# CTP release
172- a configurable parser for number literals: `CharParser.numberLiteral`
173- `CharParser.pfloat` now also parses `NaN`, `Infinity` and
174  hexadecimal floating point literals as supported by IEEE754r, C99 and
175  Java (but different from the hex representation supported by F#)
176- new helper functions `CharParser.floatToHexString`, `floatOfHexString`,
177  `float32ToHexString` and  `float32OfHexString`
178- integer parsers: `Charparser.pint32`, `puint64`, `puint32`, `puint64`
179- new sample: a JSON parser
180- various optimizations and some code cleanup
181- new `CharStream.Iterator` members `ReadUntil`, `Increment` and `Decrement`
182- new `State` member `AdvanceTo`
183- new function `Primitives.createParserForwardedToRef`
184- new combinator `|>>=` in `Primitives`
185
186Breaking changes:
187- renamed the parsers `char` and `string` to `pchar` and `pstring`
188  (This is in deference to the built-in F# functions `char`
189   and `string`, which weren't yet around when the first version
190   of FParsec was released.)
191- changed the case of the properties of the `Reply` and `State` types
192  (This reflects the emerging consensus in the F# community that all
193   public members of types should be named in PascalCase.)
194- deprecated State.AdvanceNL (use the 3 parameter Advance overload instead)
195- deprecated the `Primitives` helper functions `isOk`, `isEmpty`, ...
196  (the `Reply` properties `IsOk`, `IsEmpty`,... should be used instead)
197- deprecated the `CharParser` helper functions `matchChar`, `readChar`, ...
198  (the `State.Iter` methods `Match`, `Read`, ... should be used instead)
199- deprecated `Primitives.option`, `<|>$` should be used instead
200- made `CharParser.CharList` internal (If you need this helper class for
201  your code, just copy the implementation to your source.)
202- State.Flags() now has more bits (and less bits are reset on a position change)
203
204Version 0.6, 2008-05-20
205-------------------------
206- fixed a bug in `manyTillString` (the code keeping track of newlines was
207  buggy)
208- fixed a bug in CharParser.<?> (the error reporting was inconsistent with
209  Primitives.<?> in the rare case where `<?>` is applied inside an
210  `attempt (...) <?> label` clause to a parser that returns an EmptyOk reply)
211- various changes for F# 1.9.4.15
212- added `skipped` parser to `CharParser`
213- added `nextCharSatifiesNot`, `prevCharSatifiesNot`,
214  `currCharSatisfies`, `currCharSatisfiesNot` to `CharParser` module;
215  the behaviours of the existing `nextCharSatisfies` and `prevCharSatisfies`
216  were slightly changed (see fparsec.html for more details)
217- added `TryWith` and `TryFinally` members to `Primitivs.ParserCombinator`
218- added `triple` and `quad` parsers to `Primitives` module
219- set CompilationRepresentationFlags.PermitNull for `Error.ParserError`
220- various optimizations
221- some documentation fixes, including corrections for the docs of
222  the `CharParser` error generation helper functions (`expectedError` etc.)
223
224Version 0.5.1, 2008-01-20
225-------------------------
226- added `pipe2`, `pipe3` and `pipe4` primitives
227- replaced `count` and `skipCount` primitives with optimized versions
228- minor optimizations in `spaces` and `spaces1`
229- added `pfloat` char parser
230- minor documentation fixes
231
232Version 0.5, 2008-01-15
233-------------------------
234- Major design change: all lazy computations were removed and the types
235  Output and Reply unified. The new implementation is considerably simpler
236  and also compiles with F# 1.9.3.7.
237- Fixed a bug in build.bat (reported by Santosh Zachariah - thanks Santosh!)
238
239Version 0.4.4, 2008-01-13
240-------------------------
241- fixed a minor issue in CharParser.attempt
242- added `.>>!` and `>>.!` primitives
243- added `skipManySatisfy` and `skipMany1Satisfy` char parsers
244
245Version 0.4.3, 2008-01-12
246-------------------------
247- fixed bugs in the CharParser versions of `<?>` and `attempt`.
248- added `>>?` primitive
249- added `skipSatisfy` and `skipSatisfyL` char parsers
250- minor documentation fixes
251
252Version 0.4.2, 2008-01-04
253-------------------------
254- performance improvements in `CharStream.Iterator`
255- minor documentation fixes
256
257Version 0.4.1, 2008-01-02
258-------------------------
259- documentation fixes
260- new sample application: a parser for Parsing Expression Grammars
261- `newline` and `unicodeNewline` now return '\n', instead of 1 or 2
262- added `whitespace` parser and changed `unicodeWhitespace`
263- added `spaces` parser (equivalent to `skipManyChars whitespace`)
264- removed newlineRepl parameter from `manyTillString`
265- added `skipManyTill` and `skipManyCharsTill`
266- generalized types of skipManyChars and skipManyChars1
267
268
269Version 0.4, 2007-12-30
270-----------------------
271- initial public release