Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Modify the inputstream or charstream

7 views
Skip to first unread message

mmatassoni

unread,
Nov 11, 2013, 5:50:39 AM11/11/13
to
Hi,
I'm doing a parser for a custom syntax and I want to provide in the
grammar an "input" command like the one of latex (\input{filename}
imports the commands from filename into the target file; it's
equivalent to typing all the commands from filename right into the
current file where the \input line is). How can I achieve this? I
thought of preprocess the inputstream/charstream in the parser constructor, but I
would like to know if I can insert the content of the file in the inputstream/char at
parse time

Thanks
0 new messages