Package redempt.redlex.bnf
Class BNFParser
java.lang.Object
redempt.redlex.bnf.BNFParser
A parser used to create lexers from BNF files
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Lexer
createLexer
(InputStream stream) Parses the input String and returns a Lexerstatic Lexer
createLexer
(String input) Parses the input String and returns a Lexerstatic Lexer
createLexer
(Path path) Parses the input String and returns a Lexer
-
Constructor Details
-
BNFParser
public BNFParser()
-
-
Method Details
-
createLexer
Parses the input String and returns a Lexer- Parameters:
input
- The input String defining the format for the Lexer- Returns:
- A Lexer for the given format
-
createLexer
Parses the input String and returns a Lexer- Parameters:
path
- The path to a file containing the format for the Lexer- Returns:
- A Lexer for the given format
-
createLexer
Parses the input String and returns a Lexer- Parameters:
stream
- The InputStream the bnf contents can be read from- Returns:
- A Lexer for the given format
-