Hi Todd, <br><br>This is not really what you're looking for, but just in case it can help:<br><br>Maybe you can use both readers and make two passes on the file?<br>You'd need to reassemble things afterwards though.<br>
<br>IIRC, in the docs about documenting packages with scribble, a special reader is used to format code with comments. Maybe this can help too.<br><br>Also, just in case, the Lazy-doc package might be of interest for parsing files:<br>
<a href="http://planet.plt-scheme.org/display.ss?package=lazy-doc.plt&owner=orseau">http://planet.plt-scheme.org/display.ss?package=lazy-doc.plt&owner=orseau</a><br>It makes it easy to define moderately complex parsers (not necessarily for scribble).<br>
<br>Hope this helps,<br>Laurent<br>P.S. : I know Lazy-doc is probably not really suited to document packages, especially for a Scheme community, but I was young... ;)<br><br><br><div class="gmail_quote">On Sat, Jan 8, 2011 at 16:36, Todd O'Bryan <span dir="ltr"><<a href="mailto:toddobryan@gmail.com">toddobryan@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I'm trying to do some analysis of my student's source files. Trying to<br>
grade 90 assignments per week by brute force with no TAs just doesn't<br>
work.<br>
<br>
I want to pull out things like data definitions, contracts, templates,<br>
etc., so I can auto-grade the ones that are what I expect them to be,<br>
and quickly look at ones that aren't as expected to figure out how<br>
many points they should get.<br>
<br>
Unfortunately, I can't figure out how to get everything that I want.<br>
<br>
If I use wxme-read, all the comments and comment boxes are just gone,<br>
but I still have images and other stuff. If I use<br>
wxme-port->text-port, I can use port->string to get all the comments<br>
and the original code, but comment boxes get changed to have a single<br>
semi-colon in front of each line and things like images get converted<br>
to either a dot (for old-style images) or nothing (for 2htdp/image,<br>
although I think Robby has updated this to produce dots).<br>
<br>
I'm sure that I need to either modify wxme-read to convert comments to<br>
something that won't disappear or add something to<br>
wxme-port->port--probably through register-lib-mapping!--so that when<br>
the reader comes upon comment boxes or images it outputs something I<br>
can use.<br>
<br>
Can someone give me some direction?<br>
<br>
Thanks!<br>
Todd<br>
_________________________________________________<br>
For list-related administrative tasks:<br>
<a href="http://lists.racket-lang.org/listinfo/users" target="_blank">http://lists.racket-lang.org/listinfo/users</a><br>
</blockquote></div><br>