/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
- Version 0.8
- -----------
- Todo before release:
- - updating the documentation
- New features/ improvements:
- - case-insensitive matching with `pstringCI`, `charsTillStringCI`, etc.
- (using the Unicode 1-to-1 case folding mappings for chars in the BMP)
- - various new parsers and combinators, including `restOfLine`,
- `skipToString`, `manySatisfyMinMax`, `manyStrings`, `withSkippedString`
- - new functions `runParserOnSubstring` and `runParserOnSubstream`
- - various performance improvements
- - F# 1.9.6.16 compatibility
- Design changes:
- - standardized on a single input stream type (`FParsec.CharStream`)
- and a single concrete parser state type (`FParsec.State`)
- - refactored the `Reply<_,_>`, `ErrorMessage` and `ParserError` types:
- * error replies now also contain a complete `State`
- * whether a parser has changed the state is now determined by
- checking the input and the output state for equality, instead of testing
- the `Consumed` flag
- * replaced the `Reply<_,_>.Flags` with a `Status` field
- * replaced the various helper functions for constructing a `Reply` with
- three overloaded `Reply<_,_>` constructors (with different arities)
- - all char parsers are now "newline aware", i.e. they normalize
- any of the three standard newline representations ("\n", "\r\n", "\r")
- to "\n" and they properly increment the line count whenever they parse
- a newline; this means that the BEHAVIOUR OF ALMOST ALL CHAR PARSERS HAS
- CHANGED WITH REGARD TO HOW NEWLINE CHARS ARE HANDLED
- Bug fixes:
- - The `CharStream` class now uses the serialization API to persist the decoder
- state for backtracking purposes. Previously it relied on the decoder loosing
- its state at block boundaries after a certain sequence of method calls. The
- previous approach works in practice for the .NET decoders of the standard
- unicode encodings and for simple stateless encodings like ASCII and ANSI,
- but it relies on undocumented behaviour and it does not work reliably for
- encodings like GB18030, ISO-2022 or ISCII.
- - In previous FParsec versions the `CharStream` file path/System.IO.Stream
- constructors failed with an `IndexOutOfRange` exception when the file/stream
- was empty and encoding detection was not turned off
- (reported by Vesa Karvonen - thanks Vesa!).
- - In previous FParsec versions the `NumberLiteral.String` returned by the
- `numberLiteral` parser included parsed suffix chars despite the
- documentation claiming the opposite. (The testing code was buggy too.)
- Applications that rely on this behaviour can now use the new
- `NumberLiteralOptions.IncludeSuffixCharsInString` to force the
- `numberLiteral` parser to include any suffix chars in the returned string.
- Other breaking changes:
- - renamed the module `CharParser` to `CharParsers`
- - moved `CharParser.OperatorPrecedenceParser` into separate module
- - FParsec.Primitives:
- * (SUBTLE CHANGE) renamed `message` to `fail` and `fail` to `failFatally`
- * renamed `pair`, `triple` and `quad` to `tuple2`, `tuple3` and `tuple4`
- * renamed `manyFoldLeft` to `manyFold` and changed the
- argument order of the accumulator and function argument
- * removed `manyFoldRight`
- * renamed `count` to `parray` and changed the return type,
- renamed `skipCount` to `skipArray`
- * renamed `followedBy` and `notFollowedBy` to `followedByL` and
- `notFollowedByL` and introduced `followedBy` and `notFollowedBy` functions
- that take no second argument
- * moved `ParserResult<_>` to `CharParsers` and changed constructor arguments
- * removed applyParser
- * removed `|>>=`, now `>>=` automatically uses an optimized branch for
- uncurried functions
- * removed `endBy` and `endBy1` (`endBy p sep` can be replaced with
- `many (p .>> sep)` and `endBy1 p sep` with `many1 (p .>> sep)`)
- - FParsec.CharParsers:
- * renamed `manyTillString` to `charsTillString`
- * removed `applyParser` from the public interface
- * removed `getIndex`, `skip`, `registerNL`, `extract`, `regexp`
- (these low-level operations should be done directly through the
- `State<_>`/`CharStream.Iterator` interface)
- * removed `anyCharOrNL` (no longer needed, see design changes above)
- * removed `nSatisfy` (can be replaced with `manySatisfyMinMax`)
- * removed `unicodeDigit` and `unicodeNumber` (can be replaced with
- `satisfy System.Char.IsDigit` and `satisfy System.Char.IsNumber`)
- * moved the helper functions `expectedError`, `unexpectedError` etc. into
- the `Error` module
- - FParsec.CharStream:
- * string constructor takes more arguments
- * `Iterator.Peek(i)` now returns the `EndOfStreamChar` char instead
- of throwing an exception if the char peeked at lies before the beginning
- of the stream
- Version 0.7.3.1, 2009-02-26
- ---------------------------
- - Fixed a bug in `CharParser.normalizeNewlines`/`CharStream.NormalizeNewlines`.
- This bug also affected the `skipped` and `manyTillString` parsers, which
- internaly call `normalizeNewlines` to normalize the returned string.
- The bug was reported by Greg Chapman - thanks Greg!
- When given a multi-line string in which the lines are delimited by "\r\n" but
- the last line does not end in a newline, the buggy `normalizeNewlines`
- replaced the chars on the last line with '\n` chars.
- - Changed the signature of `Helper.SkipOverWhitespace`.
- Known issue:
- - Visual Studio rebuilds the whole solution every time one
- tries to run the "Test" executable under the debugger.
- This behaviour is caused by a known bug in the F# Visual
- Studio plugin. I'm not aware of any workaround.
- Version 0.7.3, 2008-12-08
- -------------------------
- Breaking changes (all of which should have little or no impact
- on existing code bases):
- - `CharStream.Iterator` instances now compare equal if and only if they belong
- to the same `CharStream` and point to the same index (previously they
- compared only equal if their internal representations were identical)
- - the constructor argument of `Error.otherError` is now expected to be
- comparable with F#'s structural comparison function `compare`,
- see http://research.microsoft.com/fsharp/manual/spec2.aspx#_Toc207785725
- - the signature of the second `ParserError.ToString` overload has changed
- - `CharParser.errorToString` and `printErrorLine` have been deprecated
- New features:
- - reimplemented the error formatting code in `FParsec.Error`
- - added new `State<_>.AdvanceTo` and `CharStream.Iterator.Advance` overloads
- - slightly modified the error reporting in `Primitives.sepEndBy`
- - some documentation fixes
- Version 0.7.2, 2008-11-17
- -------------------------
- - added `CharParser.OperatorPrecedenceParser`
- - changed the overflow checking in `pint32` such that it will
- not be affected by an expected future change in F#'s
- int32 -> uint64 conversion behaviour
- - added `CharParser.pint16`, `puint16`, `pint8`, `puint8`
- - changed the signatures in CharParser.fsi to use the `Parser<_,_>` type
- abbreviation
- - fixed outdated documentation of `CharParser.expectedError`
- - some minor optimizations
- Version 0.7.1, 2008-09-29
- -------------------------
- Breaking changes:
- - renamed `Primitives.Reply._tag` member to `Flags` and gave
- it a proper enumeration type
- - `CharParser.State` is now a reference type
- - Removed `CharParser.State.Flags` member
- - deprecated `Primitives.reconstructError`
- Version 0.7.0.1, 2008-09-23
- ---------------------------
- Breaking change:
- - changed the case of the `FParsec.Error.Pos` members
- (This wasn't already done in 0.7 because of an oversight.)
- Version 0.7, 2008-09-13
- -------------------------
- Bugfixes:
- - made `FParsec.Error.Pos` IComparable to prevent `ParserError.ToString`
- from throwing an exception under rare circumstances
- - corrected the argument checking for some `CharStream.Iterator` methods
- for very large arguments
- New features:
- - compatibility with the F# CTP release
- - a configurable parser for number literals: `CharParser.numberLiteral`
- - `CharParser.pfloat` now also parses `NaN`, `Infinity` and
- hexadecimal floating point literals as supported by IEEE754r, C99 and
- Java (but different from the hex representation supported by F#)
- - new helper functions `CharParser.floatToHexString`, `floatOfHexString`,
- `float32ToHexString` and `float32OfHexString`
- - integer parsers: `Charparser.pint32`, `puint64`, `puint32`, `puint64`
- - new sample: a JSON parser
- - various optimizations and some code cleanup
- - new `CharStream.Iterator` members `ReadUntil`, `Increment` and `Decrement`
- - new `State` member `AdvanceTo`
- - new function `Primitives.createParserForwardedToRef`
- - new combinator `|>>=` in `Primitives`
- Breaking changes:
- - renamed the parsers `char` and `string` to `pchar` and `pstring`
- (This is in deference to the built-in F# functions `char`
- and `string`, which weren't yet around when the first version
- of FParsec was released.)
- - changed the case of the properties of the `Reply` and `State` types
- (This reflects the emerging consensus in the F# community that all
- public members of types should be named in PascalCase.)
- - deprecated State.AdvanceNL (use the 3 parameter Advance overload instead)
- - deprecated the `Primitives` helper functions `isOk`, `isEmpty`, ...
- (the `Reply` properties `IsOk`, `IsEmpty`,... should be used instead)
- - deprecated the `CharParser` helper functions `matchChar`, `readChar`, ...
- (the `State.Iter` methods `Match`, `Read`, ... should be used instead)
- - deprecated `Primitives.option`, `<|>$` should be used instead
- - made `CharParser.CharList` internal (If you need this helper class for
- your code, just copy the implementation to your source.)
- - State.Flags() now has more bits (and less bits are reset on a position change)
- Version 0.6, 2008-05-20
- -------------------------
- - fixed a bug in `manyTillString` (the code keeping track of newlines was
- buggy)
- - fixed a bug in CharParser.<?> (the error reporting was inconsistent with
- Primitives.<?> in the rare case where `<?>` is applied inside an
- `attempt (...) <?> label` clause to a parser that returns an EmptyOk reply)
- - various changes for F# 1.9.4.15
- - added `skipped` parser to `CharParser`
- - added `nextCharSatifiesNot`, `prevCharSatifiesNot`,
- `currCharSatisfies`, `currCharSatisfiesNot` to `CharParser` module;
- the behaviours of the existing `nextCharSatisfies` and `prevCharSatisfies`
- were slightly changed (see fparsec.html for more details)
- - added `TryWith` and `TryFinally` members to `Primitivs.ParserCombinator`
- - added `triple` and `quad` parsers to `Primitives` module
- - set CompilationRepresentationFlags.PermitNull for `Error.ParserError`
- - various optimizations
- - some documentation fixes, including corrections for the docs of
- the `CharParser` error generation helper functions (`expectedError` etc.)
- Version 0.5.1, 2008-01-20
- -------------------------
- - added `pipe2`, `pipe3` and `pipe4` primitives
- - replaced `count` and `skipCount` primitives with optimized versions
- - minor optimizations in `spaces` and `spaces1`
- - added `pfloat` char parser
- - minor documentation fixes
- Version 0.5, 2008-01-15
- -------------------------
- - Major design change: all lazy computations were removed and the types
- Output and Reply unified. The new implementation is considerably simpler
- and also compiles with F# 1.9.3.7.
- - Fixed a bug in build.bat (reported by Santosh Zachariah - thanks Santosh!)
- Version 0.4.4, 2008-01-13
- -------------------------
- - fixed a minor issue in CharParser.attempt
- - added `.>>!` and `>>.!` primitives
- - added `skipManySatisfy` and `skipMany1Satisfy` char parsers
- Version 0.4.3, 2008-01-12
- -------------------------
- - fixed bugs in the CharParser versions of `<?>` and `attempt`.
- - added `>>?` primitive
- - added `skipSatisfy` and `skipSatisfyL` char parsers
- - minor documentation fixes
- Version 0.4.2, 2008-01-04
- -------------------------
- - performance improvements in `CharStream.Iterator`
- - minor documentation fixes
- Version 0.4.1, 2008-01-02
- -------------------------
- - documentation fixes
- - new sample application: a parser for Parsing Expression Grammars
- - `newline` and `unicodeNewline` now return '\n', instead of 1 or 2
- - added `whitespace` parser and changed `unicodeWhitespace`
- - added `spaces` parser (equivalent to `skipManyChars whitespace`)
- - removed newlineRepl parameter from `manyTillString`
- - added `skipManyTill` and `skipManyCharsTill`
- - generalized types of skipManyChars and skipManyChars1
- Version 0.4, 2007-12-30
- -----------------------
- - initial public release