peg vocabulary
Factor handbook ยป Vocabulary index


Summary
Parsing expression grammar and packrat parser

Metadata
Tags:text, parsing
Authors:Chris Double


Words

Tuple classes
ClassSuperclassSlots
could-not-parse tuple
parse-error tupleposition got messages
parse-result tupleremaining ast
parser tuplepeg compiled id
unable-to-fully-parse tupleremaining


Parsing words
WordSyntax
PARTIAL-PEG:PARTIAL-PEG: word ( stack -- effect ) definition... ;
PEG:PEG: word ( stack -- effect ) definition... ;


Generic words
WordStack effect
parser-quot( peg -- quot )


Symbol words
fail
ignore


Ordinary words
WordStack effect
(parse)( input parser -- result )
2choice( parser1 parser2 -- parser )
2seq( parser1 parser2 -- parser )
3choice( parser1 parser2 parser3 -- parser )
3seq( parser1 parser2 parser3 -- parser )
4choice( parser1 parser2 parser3 parser4 -- parser )
4seq( parser1 parser2 parser3 parser4 -- parser )
<parse-error>( position got messages -- parse-error )
<parse-result>( remaining ast -- parse-result )
action( parser quot -- parser )
box( quot -- parser )
check-parse-result( result -- result )
choice( seq -- parser )
choice*( quot -- parser )
could-not-parse( -- * )
delay( quot -- parser )
ensure( parser -- parser )
ensure-not( parser -- parser )
hide( parser -- parser )
optional( parser -- parser )
parse( input parser -- ast )
parse-fully( input parser -- ast )
range( min max -- parser )
repeat0( parser -- parser )
repeat1( parser -- parser )
satisfy( quot -- parser )
semantic( parser quot -- parser )
seq( seq -- parser )
seq*( quot -- parser )
sp( parser -- parser )
token( string -- parser )
unable-to-fully-parse( remaining -- * )


Class predicate words
WordStack effect
could-not-parse?( object -- ? )
parse-error?( object -- ? )
parse-result?( object -- ? )
parser?( object -- ? )
unable-to-fully-parse?( object -- ? )


Files


Metadata files


Children from resource:basis
VocabularySummary
peg.debugger
peg.ebnfDeclarative EBNF language for writing PEG parsers
peg.parsersAdditional PEG parsers
peg.searchSearch and replace using parsing expression grammars


Children from resource:extra
VocabularySummary
peg.exprSimple expression evaluator using EBNF
peg.javascriptJavaScript Parser
peg.pl0Grammar for PL/0 Language