module analysis::text::search::Grammars
rascal-0.40.16
Usage
import analysis::text::search::Grammars;
Dependencies
extend analysis::text::search::Lucene;
import ParseTree;
import String;
function analyzerFromGrammar
Analyzer analyzerFromGrammar(type[&T <: Tree] grammar)
function identifierAnalyzerFromGrammar
Analyzer identifierAnalyzerFromGrammar(type[&T <: Tree] grammar)
function commentAnalyzerFromGrammar
Analyzer commentAnalyzerFromGrammar(type[&T <: Tree] grammar)
function tokenizerFromGrammar
Use a generate parser as a Lucene tokenizer. Skipping nothing.
Tokenizer tokenizerFromGrammar(type[&T <: Tree] grammar)
function identifierTokenizerFromGrammar
Use a generated parser as a Lucene tokenizer, and skip all keywords and punctuation.
Tokenizer identifierTokenizerFromGrammar(type[&T <: Tree] grammar)
function commentTokenizerFromGrammar
Use a generated parser as a Lucene tokenizer, and skip all keywords and punctuation.
Tokenizer commentTokenizerFromGrammar(type[&T <: Tree] grammar)
function tokens
list[Tree] tokens(amb({Tree x, *_}), bool(Tree) isToken)
default list[Tree] tokens(Tree tok, bool(Tree) isToken)
function isTokenType
bool isTokenType(lit(_))
bool isTokenType(cilit(_))
bool isTokenType(lex(_))
bool isTokenType(layouts(_))
bool isTokenType(label(str _, Symbol s))
default bool isTokenType(Symbol _)
function isToken
bool isToken(appl(prod(Symbol s, _, _), _))
bool isToken(char(_))
default bool isToken(Tree _)
function isLexical
bool isLexical(appl(prod(Symbol s, _, _), _))
default bool isLexical(Tree _)
function isComment
bool isComment(Tree t)
default bool isComment(Tree _)