simplified Python parsing question

Eric S. Johansson esj at harvee.org
Sun Jul 29 19:21:49 EDT 2012


as some folks may remember, I have been working on making Python and its tool 
base more accessible to disabled programmers. I've finally come up with a really 
simple technique which should solve 80% of the problem. What I need to figure 
out is how to find a spot in the code where a symbol exists and potentially, 
it's rough type (class name, instance, etc.). This is really a much bigger 
question that I want to get into right now but I'm looking just to build a demo 
to back up a storyboard plus video.

When you are sitting on or in a name, you look to the left or look to the right 
what would you see that would tell you that you have gone past the end of that 
name. For example

a = b + c

if you are sitting on a, the boundaries are beginning of line and =, if you are 
sitting on b, the boundaries are = and +, if you are sitting on c, the 
boundaries are + and end of line.  a call the region between those boundaries 
the symbol region.

if this example is clear to you, what you suggest for a method of finding a 
whole statement, or a whole symbol region? note, doesn't have to be perfect or 
complete solution, just good enough to let me do a moderately complex demo and 
seek funding accessibility world to build a complete environment.

I appreciate the help because I believe that once this is working, it'll make a 
significant difference in the ability for disabled programmers to write code 
again as well as be able to integrate within existing development team and their 
naming conventions.

Looking forward to responses.

--- eric

first draft write up of technique
https://docs.google.com/document/d/1In11apApKozw_UOPAhVz0ePqns72_6652Dra34xWp4E/edit



More information about the Python-list mailing list