I give an answer myself: I came quite a bit, and I am now so far that I can make different instances of a subclass of a BaseParser class, that can all run and rerun, as long as they are not going after each other.
I will show the code to David shortly if you are interested. Struggling now on capuring line numbers when include files are in the stream of data. Quintijn On 15 dec, 14:02, Quintijn <[email protected]> wrote: > Hello list, > > I have been trying to make some additions to the classed base > approach, with the possibility of adding markers in the lexer (by > adding specific lexer classes) like ENDMARKER (at end of file) and > STARTLINE marker, for newline sensitive grammars. I am willing to > share these efforts if it is usefull to others. > > When testing things with unittest, I cannot establish a good reset > method, so I can give new data to the parser. Can anybody help? > > I am also wondering, if more parsers are subclasses of the same > BaseParser class, how to distinguish inputs of one or the other. They > all go to yacc.parse. > > Thanks, Quintijn -- You received this message because you are subscribed to the Google Groups "ply-hack" 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/ply-hack?hl=en.
