// Regular Expression Parser Code // // File: parser.cc // Assignment: 6 // Author: () #include "ndfa.h" #include "parser.h" // Parser implementing the grammar: // // RE ::= RT { | RT }* // RT ::= RF RF* // RF ::= alphanum | # | ? | RF* | RF+ | ( RE ) // // where FIRST (RF) ::= inline isalphanum (char c) { return isdigit (c) || isalpha (c); } static ndfa RT(); static ndfa RF(); // RE ::= RT { | RT }* // ndfa RE() { // Replace this line and the next with your code. return ndfa (NULL, NULL); } // RT ::= RF RF* // ndfa RT() { // Replace this line and the next with your code. return ndfa (NULL, NULL); } // RF ::= alphanum | # | ? | RF* | RF+ | ( RE ) // ndfa RF(void) { // Replace this line and the next with your code. return ndfa (NULL, NULL); }