What is the highest type number that can be assigned to this following grammar: S→Aa, A→Ba, B→abc

What is the highest type number that can be assigned to this following grammar: S→Aa, A→Ba, B→abc Correct Answer Type 3

Above grammar generates string abcaa.

Type-3 or a regular grammar is a formal grammar that is right-regular or left-regular, given grammar is left-linear regular grammar hence it's a type-3 grammar.

Related Questions

Consider the following grammar (that admits a series of declarations, followed by expressions) and the associated syntax directed translation (SDT) actions, given as pseudo-code: P → D* E* D → int ID {record that ID.lexeme is of type int} D → bool ID { record that ID.lexeme is of type bool} E → E1 + E2 {check that E1.type = E2.type = int; set E.type := int} E → !E1 {check that E1.type = bool; set E.type := bool} E → ID {set E.type := int} With respect to the above grammar; which one of the following choices is correct?