summary refs log tree commit diff stats
path: root/lib/pure/pegs.nim
Commit message (Collapse)AuthorAgeFilesLines
* alternative, much simpler algorithm for strict func checking (#21066)Andreas Rumpf2022-12-111-10/+12
| | | | | | | | | | | | | * alternative, much simpler algorithm for strict func checking * forgot to git add new compiler module * new spec is incredibly simple to describe * fixes bigints regression * typos * closes #16305; closes #17387; closes #20863
* fix a few "broken link" warnings (#20837)Andrey Makarov2022-11-141-1/+1
|
* fixes #19162; enable `strictEffects` for v2 (#19380)ringabout2022-10-151-1/+1
| | | | | | | | | | | | | | | | | | | * enable stricteffects * add gcsafe * fix tests * use func * fixes pegs tests * explicitly mark repr related procs with noSideEffect * add nimLegacyEffects * change URL * fixes docopt * add `raises: []` to repr * fixes weave * fixes nimyaml * fixes glob * fixes parsetoml * Apply suggestions from code review * Update testament/important_packages.nim * add legacy:laxEffects
* Markdown indented code blocks (#20473)Andrey Makarov2022-10-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | * Implement Markdown indented code blocks Additional indentation of 4 spaces makes a block an "indented code block" (monospaced text without syntax highlighting). Also `::` RST syntax for code blocks is disabled. So instead of ```rst see:: Some code ``` the code block should be written as ```markdown see: Some code ``` * Migrate RST literal blocks :: to Markdown's ones
* fixes #19104; peg Incorrect captures [backport:1.6] (#20352)ringabout2022-09-151-1/+4
| | | | | | | * fixes #19104; peg Incorrect captures [backport:1.6] * add tests Co-authored-by: khchen <khchen@gmail.com>
* remove deprecated type pragma syntax, fix bugs that required it (#20199)metagn2022-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * remove deprecated pragma syntax from 0.20.0 closes #4651, closes #16653 with a cheap fix for now due to how early `tfFinal` is set * remove type pragma between name and generics * undo removal, try removing bind expression (0.8.14) * fix test, unremove bind expr * remove again * Update changelog.md Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * dependencies @ HEAD & weave test dependencies * try fix package ci Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* enable style:usages for stdlib tests [backport: 1.6] (#19715)flywind2022-04-131-2/+2
| | | | | | | | | | | | | | | * enable style:usages for stdlib tests * freeAddrInfo * more tests * importc * bufSize * fix more * => parseSql and renderSql
* move io out of system (#19442)flywind2022-02-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * move io out of system * fix tests * fix tests * next step * rename to syncio * rename * fix nimscript * comma * fix * fix parts of errors * good for now * fix test
* Fixed `strictFuncs` support for `std/pegs` (#18951)quantimnot2021-10-071-138/+142
| | | | | | | | | | | | | | | | | * Fixed `strictFuncs` support for `std/pegs` Enabled `std/pegs` in the `strictFuncs` import test. Fixes #18057 Fixes #16892 See #18111 * Rebased from `devel` * Conditionally compile `std/pegs` in `koch` This is for supporting `csources` bootstrap. Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* Add support for `strictEffects` to `std/pegs` (#18949)quantimnot2021-10-041-1/+4
| | | | | | | * Add support for `strictEffects` to `std/pegs` * Fixed support of older Nim versions Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* Peg captures get stack-like behavior (#18369)gemath2021-06-281-31/+59
| | | | | * Implements reverse capture indexing. * Now works for modified backrefs too. * Changed reverse indexing syntax prefix for back-references to '$^'.
* [std/pegs] increase test coverage (#17871)flywind2021-04-271-144/+0
|
* Change stdlib imports to use std prefix in most examples (#17202)Danil Yarantsev2021-02-281-1/+1
|
* remove all uses of condsyms symbols defined prior to bootstrap nim 0.20.0 ↵Timothee Cour2021-02-171-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#16918) * nimNoArrayToCstringConversion deadcode * nimbabel deadcode * nimHasalignOf deadcode * nimvarargstyped deadcode * nimhygiene deadcode * nimNewTypedesc deadcode * nimlocks deadcode * nimHasCppDefine deadcode * nimHasRunnableExamples deadcode * nimHasNilChecks deadcode * nimSymKind deadcode * minor macros refactoring * nimVmEqIdent deadcode * nimNoNil deadcode * nimNoZeroTerminator deadcode * nimHasSymOwnerInMacro deadcode * nimVmExportFixed deadcode * nimNewRuntime deadcode * nimAshr deadcode * nimUncheckedArrayTyp deadcode * nimHasTypeof deadcode * nimErrorProcCanHaveBody deadcode * nimHasHotCodeReloading deadcode * nimHasSignatureHashInMacro deadcode * nimHasDefault deadcode * nimMacrosSizealignof deadcode
* fix some warnings (#16952)flywind2021-02-081-1/+1
|
* use hexchar in stdlib (#16290)flywind2020-12-171-15/+5
|
* [backport] Docs: Fix broken `code-block` (#14749)ee72020-06-221-20/+20
| | | | | | | | This commit indents the contents of a `code-block` in `httpclient.nim` so that it displays correctly. The bug was introduced by 42a64245f8. I did a quick search for other `code-block`s that are broken in the same way, but the only other one I found (in `pegs.nim`) is not included in the generated documentation.
* fixes #14718 [backport]Araq2020-06-191-4/+4
|
* Update pegs.nim to work at compiletime. No range errors. (#13459)solo9892020-02-271-164/+186
|
* remove deprecated procs (#12535)Andreas Rumpf2019-11-051-2/+4
|
* [backport] run nimpretty on the remaining filesnarimiran2019-09-301-80/+81
|
* fixes #12121 (#12126)Andreas Rumpf2019-09-051-3/+4
|
* minor style changesAraq2019-07-101-36/+36
|
* fixes #1286; object case transitions are now soundAndreas Rumpf2019-05-271-55/+39
|
* Allow void macro result (#11286)Arne Döring2019-05-211-1/+1
| | | | | * allow void macro result * add test for void macro result type
* StringStream and parseJson, parseCfg, parseSql et al for the vm (#10746)Arne Döring2019-02-281-25/+18
|
* removes deprecated T/P typesAraq2018-11-161-9/+7
|
* stdlib: documenation updates, the exception names have been changedAndreas Rumpf2018-10-251-1/+1
|
* Add interpreting event parser proc to pegs module. (#8075)gemath2018-08-241-211/+519
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added simple interpreting event parser to pegs module. * Has side-effects problem. * Macro solution works. * First flat callback test works. * Fixed namespace pollution. * Added handler for pkChar. * Replaced event parser test. * Started extensive docs. * 'callback' to 'handler' renaming part 1. * Renaming 'callback' to 'handler' part2, completed comments. * Fixed exported API pollution. * Added more event handler hooks, fixed comments. * Changed event parser addition entry. * Fixed variable names and comments. * Enhanced comment. * Leave handlers are not called for an unsuccessful match. * The three varieties of back-reference matches are processed in separate of-clauses now. * Improved hygiene and (almost) eliminated exports. * Trying to fix CI test breakage by eliminating export. * Trying to fix CI test breakage by eliminating exports. * Re-activated leave handler code execution for unsuccessful matches. * Eliminated the last export statement (with a funny smelling hack). * Make sure leave handler code is executed for all unsuccessful matcher cases. * Replaced local unicode.`==` with export.
* make more tests greenAndreas Rumpf2018-08-131-1/+1
|
* WIP: disallow 'nil' for strings and seqsAndreas Rumpf2018-08-131-1/+1
|
* Pegs AST read access (#8050)gemath2018-06-191-2/+21
| | | | | | | | | | | | * Make PEG AST nodes readable from outside the module. * Added a test module for the pegs stdlib module. * Edited changelog. * Renamed ``sons`` iterator to ``items``, added ``pairs``, inlined both. * Updated entry and moved it to the right category.
* Fixes pegs bugs, continuedata-man2018-05-231-12/+22
|
* Fixes pegs bugsdata-man2018-05-231-11/+11
|
* Patch the PEG library to work with the JS backend (#7866)Tyler2018-05-231-8/+12
| | | * Added compiler check on transformFile
* pegs: fixes another null accessing bugAndreas Rumpf2018-05-061-1/+1
|
* remove deprecated stuff from the stdlib; introduce better deprecation warningsAraq2018-05-051-7/+3
|
* more fixes for the new string behaviourAndreas Rumpf2018-04-301-1/+1
|
* pegs: don't rely on terminating zeroAndreas Rumpf2018-04-291-17/+25
|
* Remove expr/stmt (#5857)Arne Döring2017-07-251-11/+11
|
* Ascii character code 127 (DEL) is not printable and must be quoted. (#5984)Markus F.X.J. Oberhumer2017-06-151-1/+1
| | | This is a follow-up to #5823.
* Fix modules that import both strutils and unicodeJoey Payne2016-07-011-2/+2
| | | | | This is only an issue when a proc in both modules that is named the same is used, such as toLower or toUpper for strings.
* documentation build cleaned upAndreas Rumpf2016-05-311-1/+1
|
* Pegs: fixes edge caseAndreas Rumpf2016-05-121-2/+6
|
* Added a replace() proc using a callback to pegs.Hans Raaf2016-05-071-0/+59
| | | | | | I was missing a nice way to use pegs with a more specialized replace functionality. Here my try to create a universal and versatile version of replace for that.
* Merge branch 'devel'Dominik Picheta2015-10-271-24/+24
|\
| * renamed writeln to writeLine in libpatrick dw2015-06-191-1/+1
| |
| * no private deprecated symbolsAraq2015-06-101-1/+0
| |
| * lib/pure/p-t - Dropped 'T' from typespdw2015-06-041-23/+24
| |
* | Replace "prefix" with "suffix" in endsWith docFederico Ceratto2015-10-231-1/+1
|/