#contents * ソースコード - SourceCode [#cfa31cf2] 文字コードは次の3種類に限定。 |形式|BOM|h |ASCII|なし| |UTF8|EF BB BF| |UTF16|0xFEFF| - UTF16はランタイム環境のバイトオーダーのみ扱う。(PPCならUTF16BE、i386ならUTF16LE) - ASCII,UTF8は内部ではUTF16に変換して処理を行う。 - %%ASCII,UTF8は内部ではUTF16に変換して処理を行う。%% - <検討中>最大行数はコンパイラの都合で制約を設けるかもしれない。 #code(){{ SourceCode: EndOfFile CodeElements EndOfFile CodeElements: WhiteSpace EndOfLine Comment Token }} * 空白文字 - WhiteSpace [#nad02589] #code(){{ WhiteSpace: Space Space WhiteSpace Space: 0x0020 0x0009 0x000B 0x000C }} * 行終端 - EndOfLine [#r4d2738d] #code(){{ EndOfLine: 0x000D 0x000A 0x000D 0x000A EndOfFile }} * ファイル終端 - EndOfFile [#va7e837a] #code(){{ EndOfFile: physical end of the file 0x0000 0x001A }} * コメント - Comment [#qa54bd26] - D言語と同様。 #code(d,){{ /* ネストできないコメントブロック */ // 行コメント /+ ネストできるコメントブロック /+ +/ +/ }} #code(){{ Comment: "/*" Characters "*/" "//" Characters EndOfLine NestingBlockComment Characters: Character Character Characters NestingBlockComment: "/+" NestingBlockCommentCharacters "+/" NestingBlockCommentCharacters: NestingBlockCommentCharacter NestingBlockCommentCharacter NestingBlockCommentCharacters NestingBlockCommentCharacter: Character NestingBlockComment }} * トークン - Token [#v8f771eb] #code(){{ Token: Identifier StringLiteral CharacterLiteral IntegerLiteral FloatLiteral Keyword "/" "/=" "." "&" "&=" "&&" "|" "|=" "||" "-" "-=" "--" "+" "+=" "++" "<" "<=" "<<" "<<=" ">" ">=" ">>=" ">>" "!" "!=" "(" ")" "[" "]" "{" "}" "?" "," ";" ":" "=" "==" "*" "*=" "%" "%=" "^" "^=" "~" }} ** 識別子 - Identifier [#b861bbb3] - 頭文字に数値とアンダーバーは使えない #code(){{ Identifier: IdentiferStart IdentiferStart IdentifierChars IdentifierChars: IdentiferChar IdentiferChar IdentifierChars IdentifierStart: EnglishAlpha UniversalAlpha IdentifierChar: IdentiferStart Digit "_" EnglishAlpha: a-zA-Z UniversalAlpha: あいうえお... Digit: 0-9 }} ** 文字列リテラル - StringLiteral [#h73c4447] - Dとほぼ同じ。一部削除している。 #code(){{ StringLiteral: WysiwygString DoubleQuotedString WysiwygString: r" WysiwygCharacters " Postfix(opt) WysiwygCharacters: WysiwygCharacter WysiwygCharacter WysiwygCharacters WysiwygCharacter: Character EndOfLine DoubleQuotedString: " DoubleQuotedCharacters " Postfix(opt) DoubleQuotedCharacters: DoubleQuotedCharacter DoubleQuotedCharacter DoubleQuotedCharacters DoubleQuotedCharacter: Character EscapeSequence EndOfLine EscapeSequence: \' \" \? \\ \a (0x07) \b (0x08) \f (0x0C) \n (0x0A) \r (0x0D) \t (0x09) \v (0x0B) Postfix: c w d }} ** 文字リテラル - CharacterLiteral [#a8af45e6] ** 整数リテラル - IntegerLiteral [#s6dcb4a0] ** 浮動小数点数リテラル - FloatLiteral [#te85f937] ** 予約語 - Keyword [#m8527744] |