Package redempt.redlex.bnf
Class BNFParser
java.lang.Object
redempt.redlex.bnf.BNFParser
A parser used to create lexers from BNF files
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LexercreateLexer(InputStream stream) Parses the input String and returns a Lexerstatic LexercreateLexer(String input) Parses the input String and returns a Lexerstatic LexercreateLexer(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
-