Welcome Jesse to the list!

9 views
Skip to first unread message

Joe Gibbs Politz

unread,
Apr 7, 2013, 4:47:30 PM4/7/13
to lamb...@googlegroups.com, Jesse Millikan
Hi everyone, meet Jesse, one of your peers from PL online last fall.

For a little while now, he's been working on a pure Racket parser for Python over at https://github.com/jmillikan/lambda-py/tree/lex-ragg.  It's a drop-in replacement for parse-python.rkt and python-parser.py.

It works on all the examples we're testing on, though he's still working through some parts of parsing that don't affect us (yet) like unicode escapes.  This will remove our dependency on Python for parsing, and we can hopefully merge it in quite soon.

Cool stuff!

Alejandro Martinez

unread,
Apr 7, 2013, 7:17:48 PM4/7/13
to lamb...@googlegroups.com, Jesse Millikan
Welcome Jesse, Nice job!

Does this make the #lang python in DrRacket any closer?


2013/4/7 Joe Gibbs Politz <joe.p...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "lambda-py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lambda-py+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Alejandro.

Shriram Krishnamurthi

unread,
Apr 7, 2013, 8:40:25 PM4/7/13
to lamb...@googlegroups.com, Jesse Millikan
I agree -- great job! Just for the record, in principle the #lang
version could call out to an external parser just as well. But, to
have it all integrated so it runs entirely inside the language would
be awesome.

Junsong Li

unread,
Apr 7, 2013, 10:07:11 PM4/7/13
to lamb...@googlegroups.com, Jesse Millikan
Welcome Jesse!


Jesse Millikan

unread,
Apr 8, 2013, 12:14:21 AM4/8/13
to lamb...@googlegroups.com, Jesse Millikan
Thanks, everyone. Also, I was a bit mistaken - it doesn't correctly parse all the tests yet, as some of them do use unicode escapes (Wouldn't want anyone to question my sanity, or theirs, on my account). Should be done within a few days regardless.

Alejandro Martinez

unread,
Apr 8, 2013, 10:05:39 AM4/8/13
to lamb...@googlegroups.com
Do you plan to parse docstrings?


2013/4/8 Jesse Millikan <jesse.a....@gmail.com>
--
You received this message because you are subscribed to the Google Groups "lambda-py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lambda-py+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Alejandro.

Jesse Millikan

unread,
Apr 8, 2013, 12:31:51 PM4/8/13
to lamb...@googlegroups.com
The parser already 'parses' docstrings, since they are,"a string literal that occurs as the first statement in a module, function, class, or method definition." (PEP 257) How these become metadata is a design issue. That said, I'm currently testing toward producing an AST that matches what Python (specifically python-parser.py) produces, which does not include docstrings.

Joe Gibbs Politz

unread,
Apr 8, 2013, 1:17:15 PM4/8/13
to lamb...@googlegroups.com
On Mon, Apr 8, 2013 at 12:31 PM, Jesse Millikan <jesse.a....@gmail.com> wrote:
The parser already 'parses' docstrings, since they are,"a string literal that occurs as the first statement in a module, function, class, or method definition." (PEP 257) How these become metadata is a design issue. That said, I'm currently testing toward producing an AST that matches what Python (specifically python-parser.py) produces, which does not include docstrings.

Interesting; do you know offhand if I missed something in python-parser.py, or does Python's own AST just not include docstrings? 

Jesse Millikan

unread,
Apr 8, 2013, 2:02:27 PM4/8/13
to lamb...@googlegroups.com
As far as I know, python-parser.py is fine. Judging from the definition of ast.get_docstring (http://svn.python.org/projects/python/branches/release32-maint/Lib/ast.py), the docstring is being pulled directly from the body.

Matthew Milano

unread,
Apr 8, 2013, 3:19:07 PM4/8/13
to lamb...@googlegroups.com
Welcome Jesse!

--

Alejandro Martinez

unread,
Apr 9, 2013, 10:36:58 AM4/9/13
to lamb...@googlegroups.com
Excellent, so docstrings are already available and we could desugar them to the corresponding __doc__ attribute, the same goes for __name__ attribute and they could be done together. Thanks.


2013/4/8 Jesse Millikan <jesse.a....@gmail.com>
--
You received this message because you are subscribed to the Google Groups "lambda-py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lambda-py+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Alejandro.
Reply all
Reply to author
Forward
0 new messages