breck7 / pldb

PLDB: a Programming Language DataBase
https://pldb.io
727 stars 98 forks source link

Create way to disable catchAllParagraph on test command #546

Closed breck7 closed 1 month ago

breck7 commented 2 months ago

The Scroll catch all paragraph parser catches typos in PLDB Scrollsets. So there is actually a couple of hundred errors right now in the files (very minor stuff).

We need a way to selectively override the catchAllParagraphParser with errorParser, or similar.

This patch:

diff --git a/parsers/root.parsers b/parsers/root.parsers
index 97d356b11..ab6465b6c 100644
--- a/parsers/root.parsers
+++ b/parsers/root.parsers
@@ -45,7 +45,7 @@ scrollParser
  description Scroll is a language for scientists of all ages. Refine, share and collaborate on ideas.
  root
  inScope abstractScrollParser blankLineParser
- catchAllParser catchAllParagraphParser
+ catchAllParser errorParser
  compilesTo html
  javascript
   setFile(file) {
breck7 commented 1 month ago

Actually, maybe we want to change Scroll so that catch all paragraphs must start with a capital letter? And then if commandWords always start with a lowercase letter, that might work.

breck7 commented 1 month ago

Okay, I added this with the new testStrict parser (https://www.youtube.com/watch?v=fEg-YM_OrJE). Works great! Fixed a number of small data bugs.

I currently have it disabled by default just because of a small bug in Scroll I am still working out. But once I get that fixed will re-enable this.