|
Bash++
Bash++ compiler internal documentation
|
A driver class to wrap around the Bison-generated parser for Bash++. This class manages both the lexer and parser state, and provides methods to set the input source. More...
#include <BashppParser.h>
Public Member Functions | |
| BashppParser ()=default | |
| void | setUTF16Mode (bool enabled) |
| bool | getUTF16Mode () const |
| void | setDisplayLexerOutput (bool enabled) |
| bool | getDisplayLexerOutput () const |
| void | setInputFromFilePath (const std::string &file_path) |
| void | setInputFromFilePtr (FILE *file_ptr, const std::string &file_path) |
| void | setInputFromStringContents (const std::string &contents) |
| void | setIncludeChain (const std::vector< std::string > &includes) |
| std::shared_ptr< AST::Program > | program () |
Private Types | |
| enum class | InputType { FILEPATH , FILEPTR , STRING_CONTENTS } |
Private Member Functions | |
| void | _initialize_lexer () |
| void | _destroy_lexer () |
| void | _parse () |
Private Attributes | |
| yyscan_t | lexer |
| std::shared_ptr< AST::Program > | m_program = nullptr |
| bool | current_command_can_receive_lvalues = true |
| bool | utf16_mode = false |
| bool | display_lexer_output = false |
| std::string | input_file_path = "<stdin>" |
| std::vector< std::string > | include_chain |
| enum AST::BashppParser::InputType | input_type = InputType::FILEPATH |
| std::variant< std::string, FILE *, std::monostate > | input_source = std::monostate{} |
| std::string | input_string_contents |
| FILE * | input_file = nullptr |
A driver class to wrap around the Bison-generated parser for Bash++. This class manages both the lexer and parser state, and provides methods to set the input source.
|
strongprivate |
|
default |
|
private |
|
private |
|
private |
| bool AST::BashppParser::getDisplayLexerOutput | ( | ) | const |
| bool AST::BashppParser::getUTF16Mode | ( | ) | const |
| std::shared_ptr< AST::Program > AST::BashppParser::program | ( | ) |
| void AST::BashppParser::setDisplayLexerOutput | ( | bool | enabled | ) |
| void AST::BashppParser::setIncludeChain | ( | const std::vector< std::string > & | includes | ) |
| void AST::BashppParser::setInputFromFilePath | ( | const std::string & | file_path | ) |
| void AST::BashppParser::setInputFromFilePtr | ( | FILE * | file_ptr, |
| const std::string & | file_path | ||
| ) |
| void AST::BashppParser::setInputFromStringContents | ( | const std::string & | contents | ) |
| void AST::BashppParser::setUTF16Mode | ( | bool | enabled | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |