On Oct 22, 2009, at 11:31 PM, Юрушкин Михаил wrote: > David-Sarah Hopwood <[email protected]> писал(а) в > своём письме Fri, 23 Oct 2009 09:20:32 +0400: >> Юрушкин Михаил wrote:>> first example: stmnt <\n> stmnt >> <\n> stmnt <;> <\n> // i mean <\n> is>> enough to seperate >> statements. >> >> For most languages that do that, it's sufficient to add an >> empty > statement> rule in the parser. > mm.. empty lines can be in every place of grammar: between > statements, procedures, declarations etc where empty_statement rule > isn't exist.I think it's important to skip redudant <\n> on lexer > level... but i don't know how to do that clearly (without > overriding nextToken for example). > -- Best regards,Michael > List: http://www.antlr.org/mailman/listinfo/antlr- > interestUnsubscribe: > http://www.antlr.org/mailman/options/antlr-interest/your-email-address > FWIW Fortran handles this by defining empty lines to be comments so they are normally discarded with other comments or whitespace.
List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
