Skip to content

Instantly share code, notes, and snippets.

@kmizu
Last active January 26, 2017 07:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kmizu/8a51d5cefbaccde8b2bc64c2c41e86be to your computer and use it in GitHub Desktop.
Save kmizu/8a51d5cefbaccde8b2bc64c2c41e86be to your computer and use it in GitHub Desktop.
プログラミング言語ハンズオン:提案構文拡張

二項演算子の追加(難易度:★)

  • 累乗演算子の追加
  • 剰余演算子の追加
  • 代入系演算子の追加 +=, -= ...

構文の追加(難易度:★★)

  • for構文
    • Cのforはちょっと難しいのでもうちょっと簡単なものを
for(i in 1 to 10) {
  println(i);
}

データ型の追加(難易度:★★)

  • 文字列の追加
  • 浮動小数点数リテラルの追加
  • 真偽値リテラルの追加

配列型 or リスト型の追加(難易度:★★★)

  • 配列リテラル or リストリテラルの追加
  • 配列の要素へのアクセス
  • 配列の要素への代入

事前のチェック(意味解析)(難易度:★★★)

Evaluatorで評価するより前にチェックする必要がある

  • 未定義の変数を事前にみつける
  • 未定義の関数を事前にみつける
  • 引数の数が一致しているかをチェックする

to be continued ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment