changing the Python grammar ?

Skip Montanaro skip at pobox.com
Mon Nov 18 15:56:06 EST 2002


    Michele> Suppose for instance I want to make able Python to recognize
    Michele> identifiers starting with some funny symbol, say "@". All I
    Michele> must do is to modify the first line of the grammar as

    Michele> identifier ::= 
    Michele>                ["@"] (letter|"_") (letter | digit | "_")*

Sure, take a look at the file Grammar/Grammar in the source distribution.

-- 
Skip Montanaro - skip at pobox.com
http://www.mojam.com/
http://www.musi-cal.com/




More information about the Python-list mailing list