<>

Parsers LeetSheet

Parsers is the advanced language Scroll developers use to extend the Scroll language with new parsers. Parsers files end in .parsers. Book available: Parsers Explained.


Parser Definition Parsers define parsers that acquire, analyze and act on code.

// A comment. AssembleTime.
atoms Set required atomTypes. AnalyzeTime.
baseParser Set for blobs or errors. AnalyzeTime.
boolean A constant. ActTime.
catchAllAtomType Use for lists. AnalyzeTime.
catchAllParser Attach this to unmatched lines. AcquireTime.
cue Attach by matching first atom. AcquireTime.
cueFromId Derive cue from parserId. AcquireTime.
description Parser description. AssembleTime.
example Set example for docs and tests. AssembleTime.
extends Extend another parser. AssembleTime.
float A constant. ActTime.
inScope Parsers in scope. AcquireTime.
int A constant. ActTime.
javascript Javascript code for Parser Actions. ActTime.
listDelimiter Split content by this delimiter. AnalyzeTime.
pattern Attach via regex. AcquireTime.
popularity Parser popularity. AssembleTime.
required Assert is present at least once. AnalyzeTime.
root Set root parser. AssembleTime.
single Assert used once. AnalyzeTime.
string A constant. ActTime.
tags Custom metadata. AssembleTime.
uniqueCue Assert unique first atoms. For pattern parsers. AnalyzeTime.
uniqueLine Assert unique lines. For pattern parsers. AnalyzeTime.

Atom Definition Parsers analyze the atoms in a line.

// A comment. AssembleTime.
description Atom Type description. AssembleTime.
enum Set enum options. AnalyzeTime.
enumFromAtomTypes Runtime enum options. AnalyzeTime.
examples Examples for documentation and tests. AssembleTime.
extends Extend another atomType. AssembleTime.
max Specify a max if numeric. AnalyzeTime.
min Specify a min if numeric. AnalyzeTime.
paint Instructor editor how to color these. AnalyzeTime.
regex Atoms must match this. AnalyzeTime.
reservedAtoms Atoms can't be any of these. AnalyzeTime.

Parser Phases: Assemble -> Acquire -> Analyze -> Act

Links - Parser DesignerParticles Sandboxr/WorldWideScrollRelease Notes & RoadmapScroll LeetSheetParticles LeetSheet


Parser usage rankings

A rough estimate of parser usage in Parsers.

count id
2293 catchAllJavascriptCodeLineParser
341 catchAllMultilineStringConstantParser
258 parserDefinitionParser
212 extendsParserParser
184 parserDescriptionParser
164 javascriptParser
155 catchAllExampleLineParser
80 cueFromIdParser
69 atomsParser
66 cueParser
66 catchAllAtomTypeParser
61 exampleParser
43 atomTypeDefinitionParser
36 stringParser
34 slashCommentParser
32 booleanParser
26 catchAllParserParser
25 paintParser
21 inScopeParser
21 extendsAtomTypeParser
12 atomTypeDescriptionParser
8 patternParser
7 singleParser
6 baseParserParser
4 enumParser
3 regexParser
3 commentLineParser
2 floatParser
1 tagsParser
1 rootFlagParser