Type-3 grammars must have a single non-terminal on the left-hand side and a right-hand side consisting of a terminals or single terminal followed by a single non-terminal.
The productions must be in the form where y is single terminal and a
X → a or X → aY /// right linear
or
X → a or X → Ya /////left linear
any type 3 can be grammar can be written right linear form or left linear form but not with both at same time. if we r using left linear form than all production in grammar should follow left linear form
now consider Example
S → X a ////left linear
X → a
X → aX ////right linear
X → abc
X → ε
this grammar utillised both left and right linear form at same time thatswhy not a type-3 grammar
now example of "ab" as a substring
S-->XabX
X-->XaX | XbX
X-->∈