Hello! I'd like to use the peg.search vocab, and for that I need to pass it a parser. Most of the parsing words in peg.ebnf produce either a quotation that is immediately called inline (EBNF[[), or produce a word that calls a parser hidden inside it (EBNF:). There are only two ways to pass a parser to peg.search:search: construct it from words without using the EBNF syntax, or by using the undocumented EBNF-PARSER: word.
I managed to figure out how the EBNF-PARSER: works, and the unfortunate thing about it is that the syntax is the following: EBNF-PARSER: word "...EBNF string..." The word will be what we need: ( -- parser ). The unfortunate part is that it's very annoying having to escape all the double quotes in the "EBNF string". So, now I have two questions. 1. Is it possible to convert a word defined with EBNF: into a word returning a parser, or to somehow extract the parser from inside it? Is there maybe an undocumented word that could help with that, like by making a wrapper? 2. Is it possible to return the """ (triple double quoted) string syntax, which doesn't require escaping single double quotes inside them? ---=====--- Александр _______________________________________________ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk