「Tiny_Python試用録(3)」

%630:「Tiny_Python試用録(3)」

%631:「Python7(2)」の復習
`▼
--------------------------------------------------------------------------------
(0)「Courier_Python」を「Python7」と略称したので,「Python7」が準拠する
  「Tiny_Python」も,このブログではPython6」(どこでも通用しない)と略称する.
(1)参考資料
 ①Docs by tinypy.org
 ②「https://docs.python.org/ja/3/tutorial/」/*〔§□で参照〕*/
 ③「http://www.tohoho-web.com/python/
 ④「Python7暫定仕様(2)★」★https://www.blogger.com/blog/post/edit/6943714883075862421/3089653751167164942
(2)「(1)④」からの引用/*[%721](3)簡略記法の要約*/

 ①「ASCII」の任意の文字列を「0」,「1」,「2」のように略記.
 ②トークン「0」の先頭に「'`'」を置き末尾に(位置調整用の)複数個の「' '」を
  付加し,「`0_    」と表示して字句解析を簡易化する./*
[%711](2)①*/
 ③「'0   '_」を「`0_」で代替することを「`0   '_
`0_」と表示
 ④「□1」と「□2」が等価であることを「□1」「□2」と略記
  「''''_
'""'_'\0'_」./*「空列」*/
 ⑤「0」のフォントは等幅の「
Courier」で表示.
  目立つように「'
`'」,「'_'」をシアンにしてもよい(オプション).
 ⑥ブロックを「{□}」
`{_`}_」と略記.
(3)[%721](0)②からの引用を追加
 ・文字列の背景色(オプション)の設定は断念する./*〔原稿を手動で着色〕*/
--------------------------------------------------------------------------------
`▲」,「」,「」は「デフォルトのフォント」/*〔「Nexus7」には無効〕*/

%636:補遺
`▼
--------------------------------------------------------------------------------
(0)[%631]の英訳のためのメモ
(1)参考資料
 ①[%631](2)
(2)「Python6」の名前空間を「`$Name6」と略記
 ①名前の先頭に「$」を付加/*〔simbol_table 作成用〕*/
 ②英文字で始まる名前は集合./*〔「$Name6」ia a set.〕*/
 ③英文字で始まる名前は集合の元./*〔「$name1 ∈ Name6〕*/
 ④10進数の計算式は定数
 ⑤10進数の名前は局所変数./*〔「$31」is a local variable.〕*/
 ⑥英字で始まる名前は大域変数./*〔「$x1」is a global variable.〕*/
(3)「raw_string★」を「単語」と略称./*「word」*/
 ①単語を「","」で連結したリストを「」と略称./*「phrase」*/
 ②句の末尾に「"\n"」を付加した文字列を「」と略称./*「statement」*/
 ③数式を「","」で連結した句の末尾に
  「"\n"」を付加した「文」を「実行文」と略称./*「do_st」*/
 ④大域変数の直後に「実行文」を付加した文を「宣言文」と略称./*「let_st」*/
  /*〔適宜,「if_st」,「while_st」等を定義〕*/
 ⑤局所変数への「代入文」は「会話モード」での「実行文」
  /*〔「$1=□1」`{_「In[1]:>>>□1」,_「Out[1]:$1」「print(□1)」`}_〕*/
(4)参考までに「IDLE (Python 3.7 64bit)」の「Python3.7.7 Shell」の画面を
 「GoogleDrive」に保存しました
(5)【[%637]】のPR用の画像も保存しました.
(6)「IDLE」は「Python.org」のサイトからダウンロードできますが
  「GoogleDrive」に保存できません「(7)」の資料を見てください.
 ・公式サイト Python.org からのインストール(Windows)
--------------------------------------------------------------------------------
`▲①②③④⑤⑥⑦⑧⑨⑩⑪⑫⑬⑭⑮⑯⑰⑱⑲⑳〔〕【】/*「∈⇒⇔∀∃」*/

%637:Note in English
`▼
--------------------------------------------------------------------------------
(0)【[%631](2)】is explained as follows
 ①「□0」is an ASCII string.
 ②〔「□1」⇒「□2」〕means that「□2」is replaced by「□1」.
 ③〔「□1」⇔「□2」〕means that「□2」is equivalent to「□1」.
 ④「'□0'」⇒「'□0'_」,「"□0"」⇒「"□0"_」.
  「''''_」⇒「'""'_」==「'\0'_」==「chr(0)」
 ⑤Let「□0」be a token ,which is expressed as「`□0_    」
  in order to simplify「lexical analysis★」./*「(2)②」*/
 ⑥Non-proportional font Courier is selected to express「□0」.
  Background color cyan can be is used optionary in order to clarify syntax.
 ⑦Any block「{}」must be expressed as「`{_`}_」with「`」and「_」.
  ・「d = `{_'Yamada': 30,_ 'Suzuki': 40,_ 'Tanaka': 80`}_
(1)Any script in accordance with「(0)」reduced to that of Tiny Python,
  if every 「`」and「_」are replaced by「chr(32)」.
(2)Notation of operator「□0」such as「□0,_□1」and「□1.□0,_□2」is simple and
  easy to use
  ・「not,_□1」
  ・「□1.and,_□2」⇔「□1 & □2」/*「bitwise operation」*/
  ・「□1.or,_□2」 ⇔「□1 | □2」/*「bitwise operation」*/
  ・「□1.xor,_□2」⇔「□1 ^ □2」/*「bitwise operation」*/
  ・「□1.ge,_□2」⇔「□1≧□2」
  ・「□1.lt,_□2」⇔「□1<□2」
  ・「□1.le,_□2」⇔「□1≦□2」
  ・「□1.gt,_□2」⇔「□1>□2」
  ・「□1.ge,_□2」⇔「□1≧□2」
(3)Notations defined by Python.org are not changed.
  ・「□1 `in_ □2」⇔「□1 in □2」
  ・「□1 `and_ □2」⇔「□1 and □2」
  ・
--------------------------------------------------------------------------------
`▲∈∋⊆⊇⊂⊃∪∩∧∨¬⇒⇔∀∃+-±×÷=≠<>≦≧

%639:EOL(@L26)

コメント

このブログの人気の投稿

アカウント試用録(1)

わいわい川柳(2021 夏)

「Python試用録(13)」