Hi Tim,
I do understand the use of “!” but I thought I could intersperse lines anywhere in
the grammar.
THE SOURCE HAS::
“”"
A minimal SQLite shell for experiments
import sqlite3
“”"
AND THE GRAMMAR HAS:
:
<raise_stmt> ::= ‘raise’ | ‘raise’ | ‘raise’ ‘from’
<import_stmt> ::= <import_name> | <import_from> | ‘import’ <import_as_name>
<import_name> ::= ‘import’ <dotted_as_names> | ‘import’ <name_list>
! note below ::= the (‘.’ | ‘…’) is necessary because ‘…’ is tokenized as ELLIPSIS
<import_from> ::= ‘from’ ‘.’ | ‘…’ <dotted_name> | ‘.’ | ‘…’ ‘import’ ‘*’ | ‘(’ <name_list> ‘)’ | <name_list> | <dotted_as_names>
<import_as_name> ::= NAME ‘as’ NAME
NAME
<dotted_as_name> ::= <dotted_name> ‘as’ NAME
<dotted_as_names> ::= <dotted_as_name> | <dotted_as_name> ‘,’ <dotted_as_names>
<dotted_name> ::= NAME ‘.’ <dotted_name>
NAME ‘.’ NAME
<name_list> ::= NAME ‘,’ NAME | <name_list> ‘,’ NAME
···
:
“”"
Are you saying the “!note below” line is causing a problem? On my screen it shows up green but the line below shows blue
When I step through the source, it stops right after “import”.
I will remove the comment and see if it works. That would imply
that there is a bug somewhere in ignoring comments.
Thanks,
Robin
On Sun, Feb 22, 2015 at 10:14 PM, Tim Roberts timr@probo.com wrote:
On Feb 21, 2015, at 1:39 PM, RLRandallx robinlrandall@gmail.com wrote:
Simple DBTEST.py module will not pass grammar test. “sqlite3” wiill not pass basically an {AlphaNumeric}+ specification. I’ve tried
{Letter}{AlphaNumeric}* and others but nothing works. Grammar “compiles” fine with no errors. I can’t see anything wrong with “‘import’ NAME” rule.
Right, because I believe the problem isn’t the “import” statement, it’s the comment before it. Do you understand that ! is the comment character in that parser? All lines starting with ! are ignored.
—
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
–
You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/27K9TI3_cS4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Phone: 650-948-8037
Email: RobinLRandall@gmail.com
Mountain View, CA 94041