my language has a simple pre-processor that expands text of the form
${<env-var-name>} as a first phase of translation; the expanded stream
is then input to my ANTLRInputStream, where it proceeds onward to the
lexer/parser in the usual fashion. said another way, neither the lexer
nor the parser is aware of the ${...} construct.
needless to say, character-position information (eg., token start/stop)
are relative to the expanded stream and not the original file; this
creates an problem, of course, when error indicators are not correctly
positioned in the original source file (as i'm doing through some editor
integration inside eclipse).
is there some pattern and/or (simple!) example that illustrates a
technique for managing this situation; is there some way (say) i might
embedded the equivalent of #line directives in the expanded stream which
are then stripped further downstream while adjusting token offsets???
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.