Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #26217

simplified Python parsing question

Date 2012-07-29 19:21 -0400
From "Eric S. Johansson" <esj@harvee.org>
Subject simplified Python parsing question
Newsgroups comp.lang.python
Message-ID <mailman.2705.1343604584.4697.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

simplified Python parsing question "Eric S. Johansson" <esj@harvee.org> - 2012-07-29 19:21 -0400
  Re: simplified Python parsing question Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-07-30 03:33 +0000
    Re: simplified Python parsing question "Eric S. Johansson" <esj@harvee.org> - 2012-07-30 02:17 -0400

csiph-web