[Skip Navigation] [CSUSB] / [CNS] / [CSE] / [R J Botting] / [Samples] / python.lexicon
[Index] [Contents] [Source Text] [About] [Notation] [Copyright] [Comment/Contact] [Search ]
Tue Nov 9 07:14:29 PST 2010

Contents


  1. adder::lexeme= "+".
  2. and::lexeme.
  3. and_op::lexeme="&".
  4. as::lexeme.
  5. assert::lexeme.
  6. assigner::lexeme= "=".
  7. atom::lexeme= identifier | literal | enclosure.
  8. attributor::lexeme= ".".
  9. break::lexeme.
  10. class::lexeme, defines a class in a classdef.
  11. continue::lexeme.
  12. decimalinteger::lexeme= nonzerodigit #( digit) | "0".
  13. def::lexeme, defines a function in funcdef.
  14. del::lexeme.
  15. digit::lexeme= "0".."9".
  16. digits::lexeme=N(digit).
  17. ellipsis::lexeme= "..."
  18. else::lexeme, see try_stmt, while_stmt, for_stmt.
  19. end_dictionary::lexeme= "}".
  20. end_list::lexeme= "]".
  21. escapeseq::lexeme= "\\" char.
  22. except::lexeme, see try_stmt.
  23. exec::lexeme, used in exec_stmt.
  24. exponentfloat::lexeme= (intpart | pointfloat) exponent.
  25. exponent::lexeme= ("e" | "E") O("+" | "-") digits.
  26. finally::lexeme, see try_stmt.
  27. float_divisor::lexeme= "/".
  28. floatnumber::lexeme= pointfloat | exponentfloat.
  29. for::lexeme, used for for loops and comprehensions, for_clause, list_for, ...
  30. fraction::lexeme= "." digits.
  31. global::lexeme, used in a global_stmt.
  32. hexdigit::lexeme= digit | "a".."f" | "A".."F".
  33. hexinteger::lexeme= "0" ("x" | "X") N(hexdigit).
  34. identifier::lexeme= (letter|"_") #(letter | digit | "_").
  35. if::lexeme.
  36. if::lexeme, in if_stmt.
  37. imagnumber::lexeme= (floatnumber | intpart) ("j" | "J").
  38. import::lexeme, used in an import_stmt.
  39. in::lexeme.
  40. int_divisor::lexeme= "//".
  41. integer::lexeme= decimalinteger | octinteger | hexinteger.
  42. intpart::lexeme= digits.
  43. lambda::lexeme.
  44. left_shift::lexeme="<<".
  45. letter::lexeme= lowercase | uppercase.
  46. longinteger::lexeme= integer ("l" | "L").
  47. longstringchar::lexeme= char~ "\\".
  48. longstringitem::lexeme= longstringchar | escapeseq.
  49. longstring::lexeme= "'''" #( longstringitem) "'''" | three_quotes #( longstringitem) three_quotes, inside a longstring there can be newlines and escape sequence but not the three quot or quotes string that starts and finishes it.
  50. lowercase::lexeme= "a".."z".
  51. modulus::lexeme= "%".
  52. multiplier::lexeme= "*" .
  53. nonzerodigit::lexeme= "1".."9".
  54. not::lexeme.
  55. octdigit::lexeme= "0".."7".
  56. octinteger::lexeme= "0" N(octdigit).
  57. or::lexeme.
  58. or_op::lexeme= ":".
  59. pass::lexeme.
  60. pointfloat::lexeme= O(intpart) fraction | intpart ".".
  61. print::lexeme.
  62. quote::lexeme= "'", used in shortstring, and threequotes.
  63. quotes::lexeme= "\"", double quotation symbol, used in shortstring.
  64. raise::lexeme.
  65. return::lexeme.
  66. right_shift::lexeme=">>".
  67. shortstringchar::lexeme= char ~ ("\\" | x | NEWLINE ).
  68. shortstringitem(x)::lexeme= shortstringchar(x) | escapeseq .
  69. shortstring::lexeme= quote #( shortstringitem(quote)) quote | quotes #( shortstringitem(quotes) quotes.
  70. slicer::lexeme= ":".
  71. start_dictionary::lexeme= "{".
  72. start_list::lexeme= "[".
  73. stringliteral::lexeme= O(stringprefix)(shortstring | longstring).
  74. stringprefix::lexeme= "r" | "u" | "ur" | "R" | "U" | "UR" | "Ur" | "uR".
  75. subtractor::lexeme= "-".
  76. three_quotes::lexeme=quotes quotes quotes, used in longstring.
  77. try::lexeme, see try_stmt.
  78. unary_operator::lexeme= "-" | "+" | "~".
  79. uppercase::lexeme= "A".."Z".
  80. while::lexeme, in while_stmt.
  81. with::lexeme, used in a with_stmt.
  82. xor_op::lexeme= "^".

End