Previously titled Multiple Lines with Implicit Endings in ANTLR. Here is a simple example of the issue. * 1 a * b
I would like to define this wiki syntax as two tokens, "* 1\na" and "* b". The token beginning is * and ends when another list token is found. WikiToHTML is from tpdsl. http://media.pragprog.com/titles/tpdsl/code/tpdsl-code.zip This is similar to Ghrekin syntax. Then 1 a Then b I'm trying to extend this concept in ANTLR to work correctly across more than one line. In ragel you can do something like this: FeatureHeading = space* I18N_Feature %begin_content ^FeatureHeadingEnd* :>> FeatureHeadingEnd @store_feature_content; FeatureHeadingEnd = EOL+ space* (I18N_Background | I18N_Scenario | I18N_ScenarioOutline | '@' | '#' | EOF)>next_keyword_start; source: http://github.com/aslakhellesoy/gherkin/blob/master/ragel/lexer_common.rl.erb That is what I meant by defining the current token as extending until the next valid token. Is the reason I'm not finding examples of this in ANTLR because it's not possible? 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.
