Implementation of SS – Teaching Activity Lexical and Syntactical Analysis Private Sub cmdPlay_Click () Dim Password As String IF txtPassword.Text <> "hello" THEN Do MsgBox "Invalid Password, try again!", , "Login" Password = InputBox("Enter Your Password") LOOP UNTIL Password = "hello" MsgBox "Login Successful!", , "Login" Me.Hide frmMain.Show ELSE MsgBox "Login Successful!", , "Login" Me.Hide rmMain.Show END IF End Sub
Activity 1. Construct a token table that will identify the programming structures evident within Visual Basic. 2. Construct a lexical analysis to change the code into tokens. 3. Construct a parse tree on the IF-THEN-ELSE statement to determine if it is syntactically correct.