fcl-passrc cannot parse \^
Original Reporter info from Mantis: Michalis @michaliskambi
-
Reporter name: Michalis Kamburelis
Original Reporter info from Mantis: Michalis @michaliskambi
- Reporter name: Michalis Kamburelis
Description:
Users can use the sequence of characters ^\ inside the source code to specify character #28.
Yes, this is possible :) This is an undocumented extension of the feature described on http://www.freepascal.org/docs-html/ref/refsu7.html . Although the documentation there says that only ^A through ^Z are allowed, actually ^\ is allowed also. This is unfortunately Delphi (at least Kylix 3) compatible, so cannot be removed, and unfortunately the users actually (over)use this feature, see e.g. pasdoc bugreport https://sourceforge.net/tracker/?func=detail&aid=1358911&group_id=4213&atid=104213 .
FPC can correctly compile such code, however parser in fcl-passrc fails on it:
$ fpc ok_caret_character.pas
$ fpc test_parser.lpr
$ ./test_parser ok_caret_character.pas
TPascalScanner.Error
An unhandled exception occurred at $080942DD :
EParserError : Invalid character ''
Attaching the testcase, for the test_parser.lpr see bugreport #16340 (closed) or the wiki: http://wiki.freepascal.org/fcl-passrc
Mantis conversion info:
- Mantis ID: 16341
- OS: Debian GNU/Linux
- OS Build: (testing)
- Build: 15177 (today's SVN)
- Platform: i386
- Version: 2.5.1
- Fixed in version: 2.4.4
- Fixed in revision: 16365 (#605d9b5e)