Remove the lexer-factory because nothing uses it. Update usages.

db4
Doug Coleman 2011-10-29 01:11:19 -07:00
parent 53c6d08b54
commit dc0a921866
4 changed files with 1 additions and 10 deletions

View File

@ -364,7 +364,6 @@ IN: tools.deploy.shaker
compiler.crossref:generic-call-site-crossref
compiler-impl
compiler.errors:compiler-errors
lexer-factory
print-use-hook
root-cache
require-when-vocabs

View File

@ -104,10 +104,6 @@ HELP: with-lexer
{ $values { "lexer" lexer } { "quot" quotation } { "newquot" quotation } }
{ $description "Calls the quotation with the " { $link lexer } " variable set to the given lexer. The quotation can make use of words such as " { $link scan-token } ". Any errors thrown by the quotation are wrapped in " { $link lexer-error } " instances." } ;
HELP: lexer-factory
{ $var-description "A variable holding a quotation with stack effect " { $snippet "( lines -- lexer )" } ". This quotation is called by the parser to create " { $link lexer } " instances. This variable can be rebound to a quotation which outputs a custom tuple delegating to " { $link lexer } " to customize syntax." } ;
ARTICLE: "parser-lexer" "The lexer"
"A variable that encapsulate internal parser state:"
{ $subsections lexer }

View File

@ -150,7 +150,3 @@ M: lexer-error error-line [ error>> error-line ] [ line>> ] bi or ;
: with-lexer ( lexer quot -- newquot )
[ lexer set ] dip [ <lexer-error> rethrow ] recover ; inline
SYMBOL: lexer-factory
[ <lexer> ] lexer-factory set-global

View File

@ -125,7 +125,7 @@ M: f parse-quotation \ ] parse-until >quotation ;
[ f parse-until >quotation ] with-lexer ;
: parse-lines ( lines -- quot )
lexer-factory get call( lines -- lexer ) (parse-lines) ;
<lexer> (parse-lines) ;
: parse-literal ( accum end quot -- accum )
[ parse-until ] dip call suffix! ; inline