antlr3 - Antlr - multiple lexer imports -
I am trying to create a joint interpreter grammar that has multiple lacquer import but it does not work I have two laser files that are being imported into a composite grammar file. But I'm getting this error: Error (103): Parser rule is not allowed in the lixar.
Lesser grammar LSUB; place: ''; Laser grammar l; Letter: 'A' .. 'J'; // space: ''; Number: '0' .. '9'; Parser grammar p1; Letter: Letter; Spaces: SPACE +; Grammar c; Import L, LSUB, P1; Accessories: (letter blank) +; Letter: 'A' .. 'J';
In addition, if I try this two levels of laser import, then I think that I have two Laxers L1 and L2; If I imported L2 in L2 import L1 and joint grammar After this, I get Nalpinetrexception in the test class.
Lesser grammar LSUB; place: ''; Laser grammar l; Import; Letter: 'A' .. 'J'; // space: ''; Number: '0' .. '9'; Parser grammar p1; Letter: Letter; Spaces: SPACE +; Parser grammar P2; Import P1; Letter: Letter +; Grammar c; Import L, P2; Accessories: (letter blank) +; Letter: 'A' .. 'J';
Is there a solution to this problem?
Multiple lasers are not allowed in any parser file It is a draw back in Entry 3.5. Try importing LSB in L, then you can get P1 in L.
Comments
Post a Comment