From c2a967a1b9adca6c929e3dc5c218dfada00059b6 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Fri, 17 Jan 2025 14:12:16 +0100 Subject: [PATCH] runtime(c): Update syntax and ftplugin files MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit - highlight more C keywords, including some from C23 Conditionally highlight C23 features: - #embed, #elifdef and #elifndef preprocessor directives - predefined macros - UTF-8 character constants - binary integer constants, _BitInt literals, and digit separators - nullptr_t type and associated constant - decimal real floating-point, bit precise and char types - typeof operators Matchit: - update for new preprocessor directives fixes: #13667 fixes: #13679 closes: #12984 Co-authored-by: Albin Ahlbäck Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- runtime/doc/syntax.txt | 1 + runtime/doc/tags | 1 + runtime/ftplugin/c.vim | 2 +- runtime/syntax/c.vim | 135 +++++++++++++++--- .../testdir/dumps/c_bool_constant_00.dump | 20 +++ .../testdir/dumps/c_bool_constant_01.dump | 20 +++ .../dumps/c_character_constant_00.dump | 20 +++ .../dumps/c_character_constant_01.dump | 20 +++ .../dumps/c_character_constant_02.dump | 20 +++ .../testdir/dumps/c_integer_constant_00.dump | 20 +++ .../testdir/dumps/c_integer_constant_01.dump | 20 +++ .../testdir/dumps/c_integer_constant_02.dump | 20 +++ .../dumps/c_preprocessor_conditional_00.dump | 20 +++ .../dumps/c_preprocessor_conditional_01.dump | 20 +++ .../dumps/c_preprocessor_conditional_02.dump | 20 +++ .../dumps/c_preprocessor_embed_00.dump | 20 +++ .../dumps/c_preprocessor_embed_01.dump | 20 +++ .../dumps/c_preprocessor_error_00.dump | 20 +++ .../testdir/dumps/c_string_literal_00.dump | 20 +++ .../testdir/dumps/c_string_literal_01.dump | 20 +++ .../testdir/dumps/c_string_literal_02.dump | 20 +++ .../testdir/dumps/c_string_literal_03.dump | 20 +++ 22 files changed, 481 insertions(+), 18 deletions(-) create mode 100644 runtime/syntax/testdir/dumps/c_bool_constant_00.dump create mode 100644 runtime/syntax/testdir/dumps/c_bool_constant_01.dump create mode 100644 runtime/syntax/testdir/dumps/c_character_constant_00.dump create mode 100644 runtime/syntax/testdir/dumps/c_character_constant_01.dump create mode 100644 runtime/syntax/testdir/dumps/c_character_constant_02.dump create mode 100644 runtime/syntax/testdir/dumps/c_integer_constant_00.dump create mode 100644 runtime/syntax/testdir/dumps/c_integer_constant_01.dump create mode 100644 runtime/syntax/testdir/dumps/c_integer_constant_02.dump create mode 100644 runtime/syntax/testdir/dumps/c_preprocessor_conditional_00.dump create mode 100644 runtime/syntax/testdir/dumps/c_preprocessor_conditional_01.dump create mode 100644 runtime/syntax/testdir/dumps/c_preprocessor_conditional_02.dump create mode 100644 runtime/syntax/testdir/dumps/c_preprocessor_embed_00.dump create mode 100644 runtime/syntax/testdir/dumps/c_preprocessor_embed_01.dump create mode 100644 runtime/syntax/testdir/dumps/c_preprocessor_error_00.dump create mode 100644 runtime/syntax/testdir/dumps/c_string_literal_00.dump create mode 100644 runtime/syntax/testdir/dumps/c_string_literal_01.dump create mode 100644 runtime/syntax/testdir/dumps/c_string_literal_02.dump create mode 100644 runtime/syntax/testdir/dumps/c_string_literal_03.dump diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 2fb320efcb..9b204780a7 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1062,6 +1062,7 @@ Variable Highlight ~ *c_no_cformat* don't highlight %-formats in strings *c_no_c99* don't highlight C99 standard items *c_no_c11* don't highlight C11 standard items +*c_no_c23* don't highlight C23 standard items *c_no_bsd* don't highlight BSD specific types *c_functions* highlight function calls and definitions *c_function_pointers* highlight function pointers definitions diff --git a/runtime/doc/tags b/runtime/doc/tags index 6d1bf96995..0e4c14c626 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -6360,6 +6360,7 @@ c_no_ansi syntax.txt /*c_no_ansi* c_no_bracket_error syntax.txt /*c_no_bracket_error* c_no_bsd syntax.txt /*c_no_bsd* c_no_c11 syntax.txt /*c_no_c11* +c_no_c23 syntax.txt /*c_no_c23* c_no_c99 syntax.txt /*c_no_c99* c_no_cformat syntax.txt /*c_no_cformat* c_no_curly_error syntax.txt /*c_no_curly_error* diff --git a/runtime/ftplugin/c.vim b/runtime/ftplugin/c.vim index 378d58065a..915861b8d5 100644 --- a/runtime/ftplugin/c.vim +++ b/runtime/ftplugin/c.vim @@ -44,7 +44,7 @@ endif " When the matchit plugin is loaded, this makes the % command skip parens and " braces in comments properly. if !exists("b:match_words") - let b:match_words = '^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>' + let b:match_words = '^\s*#\s*if\%(\|def\|ndef\)\>:^\s*#\s*elif\%(\|def\|ndef\)\>:^\s*#\s*else\>:^\s*#\s*endif\>' let b:match_skip = 's:comment\|string\|character\|special' let b:undo_ftplugin ..= " | unlet! b:match_skip b:match_words" endif diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim index 30db9438d0..eb56239f3d 100644 --- a/runtime/syntax/c.vim +++ b/runtime/syntax/c.vim @@ -1,7 +1,7 @@ " Vim syntax file -" Language: C -" Maintainer: The Vim Project -" Last Change: 2023 Aug 10 +" Language: C +" Maintainer: The Vim Project +" Last Change: 2025 Jan 15 " Former Maintainer: Bram Moolenaar " Quit when a (custom) syntax file was already loaded @@ -111,6 +111,20 @@ if (s:ft ==# "c" && !exists("c_no_c11")) || (s:in_cpp_family && !exists("cpp_no_ syn match cSpecialCharacter display "[Uu]'\\x\x\+'" endif +if (s:ft ==# "c" && !exists("c_no_c23")) || (s:in_cpp_family && !exists("cpp_no_cpp17")) + syn match cCharacter "u8'[^\\]'" + syn match cCharacter "u8'[^']*'" contains=cSpecial + if exists("c_gnu") + syn match cSpecialError "u8'\\[^'\"?\\abefnrtv]'" + syn match cSpecialCharacter "u8'\\['\"?\\abefnrtv]'" + else + syn match cSpecialError "u8'\\[^'\"?\\abfnrtv]'" + syn match cSpecialCharacter "u8'\\['\"?\\abfnrtv]'" + endif + syn match cSpecialCharacter display "u8'\\\o\{1,3}'" + syn match cSpecialCharacter display "u8'\\x\x\+'" +endif + "when wanted, highlight trailing white space if exists("c_space_errors") if !exists("c_no_trail_space_error") @@ -191,12 +205,25 @@ syn case ignore syn match cNumbers display transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctalError,cOctal " Same, but without octal error (for comments) syn match cNumbersCom display contained transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctal -syn match cNumber display contained "\d\+\%(u\=l\{0,2}\|ll\=u\)\>" -"hex number -syn match cNumber display contained "0x\x\+\%(u\=l\{0,2}\|ll\=u\)\>" -" Flag the first zero of an octal number as something special -syn match cOctal display contained "0\o\+\%(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero -syn match cOctalZero display contained "\<0" + +" cpp.vim handles these +if !exists("c_no_c23") && !s:in_cpp_family + syn match cNumber display contained "\d\%('\=\d\+\)*\%(u\=l\{0,2}\|ll\=u\|u\=wb\|wbu\=\)\>" + "hex number + syn match cNumber display contained "0x\x\%('\=\x\+\)*\%(u\=l\{0,2}\|ll\=u\|u\=wb\|wbu\=\)\>" + " Flag the first zero of an octal number as something special + syn match cOctal display contained "0\o\%('\=\o\+\)*\%(u\=l\{0,2}\|ll\=u\|u\=wb\|wbu\=\)\>" contains=cOctalZero + "binary number + syn match cNumber display contained "0b[01]\%('\=[01]\+\)*\%(u\=l\{0,2}\|ll\=u\|u\=wb\|wbu\=\)\>" +else + syn match cNumber display contained "\d\+\%(u\=l\{0,2}\|ll\=u\)\>" + "hex number + syn match cNumber display contained "0x\x\+\%(u\=l\{0,2}\|ll\=u\)\>" + " Flag the first zero of an octal number as something special + syn match cOctal display contained "0\o\+\%(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero + syn match cOctalZero display contained "\<0" +endif + "floating point number, with dot, optional exponent syn match cFloat display contained "\d\+\.\d*\%(e[-+]\=\d\+\)\=[fl]\=" "floating point number, starting with a dot, optional exponent @@ -277,6 +304,13 @@ if !exists("c_no_c99") " ISO C99 syn keyword cType intptr_t uintptr_t syn keyword cType intmax_t uintmax_t endif +if !exists("c_no_c23") && !s:in_cpp_family + syn keyword cOperator typeof typeof_unqual + syn keyword cType _BitInt _Decimal32 _Decimal64 _Decimal128 +endif +if (s:ft ==# "c" && !exists("c_no_c23")) || (s:in_cpp_family && !exists("cpp_no_cpp11")) + syn keyword cType nullptr_t +endif syn keyword cTypedef typedef syn keyword cStructure struct union enum @@ -312,10 +346,15 @@ if !exists("c_no_c11") syn keyword cType atomic_intmax_t atomic_uintmax_t endif +if (s:ft ==# "c" && !exists("c_no_c23")) || (s:in_cpp_family && !exists("cpp_no_cpp20")) + syn keyword cType char8_t +endif + if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu") if exists("c_gnu") syn keyword cConstant __GNUC__ __FUNCTION__ __PRETTY_FUNCTION__ __func__ endif + " TODO: __STDC_HOSTED__ is C99 and C++11 syn keyword cConstant __LINE__ __FILE__ __DATE__ __TIME__ __STDC__ __STDC_VERSION__ __STDC_HOSTED__ syn keyword cConstant CHAR_BIT MB_LEN_MAX MB_CUR_MAX syn keyword cConstant UCHAR_MAX UINT_MAX ULONG_MAX USHRT_MAX @@ -324,6 +363,8 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu") syn keyword cConstant SCHAR_MIN SINT_MIN SLONG_MIN SSHRT_MIN syn keyword cConstant SCHAR_MAX SINT_MAX SLONG_MAX SSHRT_MAX if !exists("c_no_c99") + syn keyword cConstant __STDC_ISO_10646__ __STDC_IEC_559_COMPLEX__ + syn keyword cConstant __STDC_MB_MIGHT_NEQ_WC__ syn keyword cConstant __func__ __VA_ARGS__ syn keyword cConstant LLONG_MIN LLONG_MAX ULLONG_MAX syn keyword cConstant INT8_MIN INT16_MIN INT32_MIN INT64_MIN @@ -340,6 +381,26 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu") syn keyword cConstant PTRDIFF_MIN PTRDIFF_MAX SIG_ATOMIC_MIN SIG_ATOMIC_MAX syn keyword cConstant SIZE_MAX WCHAR_MIN WCHAR_MAX WINT_MIN WINT_MAX endif + if !exists("c_no_c11") + syn keyword cConstant __STDC_UTF_16__ __STDC_UTF_32__ __STDC_ANALYZABLE__ + syn keyword cConstant __STDC_LIB_EXT1__ __STDC_NO_ATOMICS__ + syn keyword cConstant __STDC_NO_COMPLEX__ __STDC_NO_THREADS__ + syn keyword cConstant __STDC_NO_VLA__ + endif + if !exists("c_no_c23") + syn keyword cConstant __STDC_UTF_16__ __STDC_UTF_32__ + syn keyword cConstant __STDC_EMBED_NOT_FOUND__ __STDC_EMBED_FOUND__ + syn keyword cConstant __STDC_EMBED_EMPTY__ __STDC_IEC_60559_BFP__ + syn keyword cConstant __STDC_IEC_60559_DFP__ __STDC_IEC_60559_COMPLEX__ + syn keyword cConstant __STDC_IEC_60559_TYPES__ + syn keyword cConstant BITINT_MAXWIDTH + endif + if (s:ft ==# "c" && !exists("c_no_c23")) || (s:in_cpp_family && !exists("cpp_no_cpp20")) + syn keyword cConstant __VA_OPT__ + endif + if (s:ft ==# "c" && !exists("c_no_c23")) || (s:in_cpp_family && !exists("cpp_no_cpp11")) + syn keyword cConstant nullptr + endif syn keyword cConstant FLT_RADIX FLT_ROUNDS FLT_DIG FLT_MANT_DIG FLT_EPSILON DBL_DIG DBL_MANT_DIG DBL_EPSILON syn keyword cConstant LDBL_DIG LDBL_MANT_DIG LDBL_EPSILON FLT_MIN FLT_MAX FLT_MIN_EXP FLT_MAX_EXP FLT_MIN_10_EXP FLT_MAX_10_EXP syn keyword cConstant DBL_MIN DBL_MAX DBL_MIN_EXP DBL_MAX_EXP DBL_MIN_10_EXP DBL_MAX_10_EXP LDBL_MIN LDBL_MAX LDBL_MIN_EXP LDBL_MAX_EXP @@ -377,37 +438,77 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu") endif if !exists("c_no_c99") " ISO C99 syn keyword cConstant true false + syn keyword cConstant INFINITY NAN + " math.h + syn keyword cConstant HUGE_VAL HUGE_VALF HUGE_VALL + syn keyword cConstant FP_FAST_FMAF FP_FAST_FMA FP_FAST_FMAL + syn keyword cConstant FP_ILOGB0 FP_ILOGBNAN + syn keyword cConstant math_errhandling MATH_ERRNO MATH_ERREXCEPT + syn keyword cConstant FP_NORMAL FP_SUBNORMAL FP_ZERO FP_INFINITE FP_NAN endif " Accept %: for # (C99) -syn region cPreCondit start="^\s*\zs\%(%:\|#\)\s*\%(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError +syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti,cBadBlock +if !exists("c_no_c23") + syn region cPreCondit start="^\s*\zs\%(%:\|#\)\s*\%(el\)\=\%(if\|ifdef\|ifndef\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError +else + syn region cPreCondit start="^\s*\zs\%(%:\|#\)\s*\%(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError +endif syn match cPreConditMatch display "^\s*\zs\%(%:\|#\)\s*\%(else\|endif\)\>" if !exists("c_no_if0") syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip syn region cCppOutWrapper start="^\s*\zs\%(%:\|#\)\s*if\s\+0\+\s*\%($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\%(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse if !exists("c_no_if0_fold") - syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold + if !exists("c_no_c23") + syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\%(%:\|#\)\s*\%(else\>\|el\%(if\|ifdef\|ifndef\)\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold + else + syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold + endif else - syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell + if !exists("c_no_c23") + syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\%(%:\|#\)\s*\%(else\>\|el\%(if\|ifdef\|ifndef\)\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell + else + syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell + endif + endif + if !exists("c_no_c23") + syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\%(%:\|#\)\s*\%(else\|el\%(if\|ifdef\|ifndef\)\)" end="^\s*\%(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit + else + syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\%(%:\|#\)\s*\%(else\|elif\)" end="^\s*\%(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit endif - syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\%(%:\|#\)\s*\%(else\|elif\)" end="^\s*\%(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit syn region cCppInWrapper start="^\s*\zs\%(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\%($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\%(%:\|#\)\s*endif\>" contains=TOP,cPreCondit if !exists("c_no_if0_fold") - syn region cCppInElse contained start="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold + if !exists("c_no_c23") + syn region cCppInElse contained start="^\s*\%(%:\|#\)\s*\%(else\>\|el\%(if\|ifdef\|ifndef\)\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold + else + syn region cCppInElse contained start="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold + endif + else + if !exists("c_no_c23") + syn region cCppInElse contained start="^\s*\%(%:\|#\)\s*\%(else\>\|el\%(if\|ifdef\|ifndef\)\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 + else + syn region cCppInElse contained start="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 + endif + endif + if !exists("c_no_c23") + syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\%(%:\|#\)\s*\%(else\|el\%(if\|ifdef\|ifndef\)\)\%([^/]\|/[^/*]\)*" end="^\s*\%(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell else - syn region cCppInElse contained start="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 + syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\%(%:\|#\)\s*\%(else\|elif\)\%([^/]\|/[^/*]\)*" end="^\s*\%(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell endif - syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\%(%:\|#\)\s*\%(else\|elif\)\%([^/]\|/[^/*]\)*" end="^\s*\%(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell syn region cCppOutSkip contained start="^\s*\%(%:\|#\)\s*\%(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\%(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\%(%:\|#\)\s*\%(if\s\+\%(\d\+\s*\%($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\%(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc endif syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match cIncluded display contained "<[^>]*>" syn match cInclude display "^\s*\zs\%(%:\|#\)\s*include\>\s*["<]" contains=cIncluded +if !exists("c_no_c23") && !s:in_cpp_family + syn region cInclude start="^\s*\zs\%(%:\|#\)\s*embed\>" skip="\\$" end="$" keepend contains=cEmbed,cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError + syn match cEmbed contained "\%(%:\|#\)\s*embed\>" nextgroup=cIncluded skipwhite transparent + syn cluster cPreProcGroup add=cEmbed +endif "syn match cLineSkip "\\$" -syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti,cBadBlock syn region cDefine start="^\s*\zs\%(%:\|#\)\s*\%(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell syn region cPreProc start="^\s*\zs\%(%:\|#\)\s*\%(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell diff --git a/runtime/syntax/testdir/dumps/c_bool_constant_00.dump b/runtime/syntax/testdir/dumps/c_bool_constant_00.dump new file mode 100644 index 0000000000..6aff5d9573 --- /dev/null +++ b/runtime/syntax/testdir/dumps/c_bool_constant_00.dump @@ -0,0 +1,20 @@ +>/+0#0000e05#ffffff0@1| |C| |b|o@1|l|e|a|n| |c|o|n|s|t|a|n|t|s| +0#0000000&@52 +@75 +|/+0#0000e05&@1| |S|o|u|r|c|e|:| |h|t@1|p|s|:|/@1|e|n|.|c|p@1|r|e|f|e|r|e|n|c|e|.|c|o|m|/|w|/|c|/|l|a|n|g|u|a|g|e|/|b|o@1|l|_|c|o|n|s|t|a|n|t| +0#0000000&@9 +@75 +|#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|a|s@1|e|r|t|.|h|>| +0#0000000&@55 +@75 +|i+0#00e0003&|n|t| +0#0000000&|m|a|i|n|(|)| @64 +|{| @73 +@4|a|s@1|e|r|t|(|t+0#e000002&|r|u|e| +0#0000000&|=@1| |1+0#e000002&| +0#0000000&|&@1| |0+0#e000002&| +0#0000000&|=@1| |f+0#e000002&|a|l|s|e|)+0#0000000&|;| @38 +|}| @73 +@75 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|1|,|1| @10|A|l@1| diff --git a/runtime/syntax/testdir/dumps/c_bool_constant_01.dump b/runtime/syntax/testdir/dumps/c_bool_constant_01.dump new file mode 100644 index 0000000000..b1d4e57321 --- /dev/null +++ b/runtime/syntax/testdir/dumps/c_bool_constant_01.dump @@ -0,0 +1,20 @@ +> +0&#ffffff0@74 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|0|,|0|-|1| @8|A|l@1| diff --git a/runtime/syntax/testdir/dumps/c_character_constant_00.dump b/runtime/syntax/testdir/dumps/c_character_constant_00.dump new file mode 100644 index 0000000000..458e2b8078 --- /dev/null +++ b/runtime/syntax/testdir/dumps/c_character_constant_00.dump @@ -0,0 +1,20 @@ +>/+0#0000e05#ffffff0@1| |C| |c|h|a|r|a|c|t|e|r| |c|o|n|s|t|a|n|t|s| +0#0000000&@50 +@75 +|/+0#0000e05&@1| |S|o|u|r|c|e|:| |h|t@1|p|s|:|/@1|e|n|.|c|p@1|r|e|f|e|r|e|n|c|e|.|c|o|m|/|w|/|c|/|l|a|n|g|u|a|g|e|/|c|h|a|r|a|c|t|e|r|_|c|o|n|s|t|a|n|t| +0#0000000&@4 +@75 +|#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d@1|e|f|.|h|>| +0#0000000&@55 +|#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d|i|o|.|h|>| +0#0000000&@56 +|#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|u|c|h|a|r|.|h|>| +0#0000000&@56 +@75 +|i+0#00e0003&|n|t| +0#0000000&|m|a|i|n| |(|v+0#00e0003&|o|i|d|)+0#0000000&| @59 +|{| @73 +@4|p|r|i|n|t|f|(|"+0#e000002&|c|o|n|s|t|a|n|t| |v|a|l|u|e| @4|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @38 +@4|p|r|i|n|t|f|(|"+0#e000002&|-@7| |-@9|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @38 +@75 +@4|/+0#0000e05&@1| |i|n|t|e|g|e|r| |c|h|a|r|a|c|t|e|r| |c|o|n|s|t|a|n|t|s|,| +0#0000000&@39 +@4|i+0#00e0003&|n|t| +0#0000000&|c|1|=|'+0#e000002&|a|'|;+0#0000000&| |p|r|i|n|t|f|(|"+0#e000002&|'|a|'|:|\+0#e000e06&|t| +0#e000002&|%+0#e000e06&|#|0|1|0|x|\|n|"+0#e000002&|,+0#0000000&| |c|1|)|;| @28 +@4|i+0#00e0003&|n|t| +0#0000000&|c|2|=|'+0#e000002&|🍌*&|'+&|;+0#0000000&| |p|r|i|n|t|f|(|"+0#e000002&|'|🍌*&|'+&|:|\+0#e000e06&|t| +0#e000002&|%+0#e000e06&|#|0|1|0|x|\|n|\|n|"+0#e000002&|,+0#0000000&| |c|2|)|;| |/+0#0000e05&@1| |i|m|p|l|e|m|e|n|t|a|t|i|o|n|-|d|e|f|i|n|e +|d| +0#0000000&@73 +@75 +@4|/+0#0000e05&@1| |m|u|l|t|i|c|h|a|r|a|c|t|e|r| |c|o|n|s|t|a|n|t| +0#0000000&@44 +@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/c_character_constant_01.dump b/runtime/syntax/testdir/dumps/c_character_constant_01.dump new file mode 100644 index 0000000000..f0ed04d32b --- /dev/null +++ b/runtime/syntax/testdir/dumps/c_character_constant_01.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@3|/+0#0000e05&@1| |i|n|t|e|g|e|r| |c|h|a|r|a|c|t|e|r| |c|o|n|s|t|a|n|t|s|,| +0#0000000&@39 +@4|i+0#00e0003&|n|t| +0#0000000&|c|1|=|'+0#e000002&|a|'|;+0#0000000&| |p|r|i|n|t|f|(|"+0#e000002&|'|a|'|:|\+0#e000e06&|t| +0#e000002&|%+0#e000e06&|#|0|1|0|x|\|n|"+0#e000002&|,+0#0000000&| |c|1|)|;| @28 +@4|i+0#00e0003&|n|t| +0#0000000&|c|2|=|'+0#e000002&|🍌*&|'+&|;+0#0000000&| |p|r|i|n|t|f|(|"+0#e000002&|'|🍌*&|'+&|:|\+0#e000e06&|t| +0#e000002&|%+0#e000e06&|#|0|1|0|x|\|n|\|n|"+0#e000002&|,+0#0000000&| |c|2|)|;| |/+0#0000e05&@1| |i|m|p|l|e|m|e|n|t|a|t|i|o|n|-|d|e|f|i|n|e +|d| +0#0000000&@73 +@75 +@4>/+0#0000e05&@1| |m|u|l|t|i|c|h|a|r|a|c|t|e|r| |c|o|n|s|t|a|n|t| +0#0000000&@44 +@4|i+0#00e0003&|n|t| +0#0000000&|c|3|=|'|a|b|'|;| |p|r|i|n|t|f|(|"+0#e000002&|'|a|b|'|:|\+0#e000e06&|t| +0#e000002&|%+0#e000e06&|#|0|1|0|x|\|n|\|n|"+0#e000002&|,+0#0000000&| |c|3|)|;| |/+0#0000e05&@1| |i|m|p|l|e|m|e|n|t|a|t|i|o|n|-|d|e|f|i|n|e +|d| +0#0000000&@73 +@75 +@4|/+0#0000e05&@1| |1|6|-|b|i|t| |w|i|d|e| |c|h|a|r|a|c|t|e|r| |c|o|n|s|t|a|n|t|s| +0#0000000&@36 +@4|c+0#00e0003&|h|a|r|1|6|_|t| +0#0000000&|u|c|1| |=| |u+0#e000002&|'|a|'|;+0#0000000&| |p|r|i|n|t|f|(|"+0#e000002&|'|a|'|:|\+0#e000e06&|t| +0#e000002&|%+0#e000e06&|#|0|1|0|x|\|n|"+0#e000002&|,+0#0000000&| |(|i+0#00e0003&|n|t|)+0#0000000&|u|c|1|)|;| @13 +@4|c+0#00e0003&|h|a|r|1|6|_|t| +0#0000000&|u|c|2| |=| |u+0#e000002&|'|¢|'|;+0#0000000&| |p|r|i|n|t|f|(|"+0#e000002&|'|¢|'|:|\+0#e000e06&|t| +0#e000002&|%+0#e000e06&|#|0|1|0|x|\|n|"+0#e000002&|,+0#0000000&| |(|i+0#00e0003&|n|t|)+0#0000000&|u|c|2|)|;| @13 +@4|c+0#00e0003&|h|a|r|1|6|_|t| +0#0000000&|u|c|3| |=| |u+0#e000002&|'|猫*&|'+&|;+0#0000000&| |p|r|i|n|t|f|(|"+0#e000002&|'|猫*&|'+&|:|\+0#e000e06&|t| +0#e000002&|%+0#e000e06&|#|0|1|0|x|\|n|"+0#e000002&|,+0#0000000&| |(|i+0#00e0003&|n|t|)+0#0000000&|u|c|3|)|;| @11 +@4|/+0#0000e05&@1| |i|m|p|l|e|m|e|n|t|a|t|i|o|n|-|d|e|f|i|n|e|d| |(|🍌*&| +&|m|a|p|s| |t|o| |t|w|o| |1|6|-|b|i|t| |c|h|a|r|a|c|t|e|r|s|)| +0#0000000&@10 +@4|c+0#00e0003&|h|a|r|1|6|_|t| +0#0000000&|u|c|4| |=| |u+0#e000002&|'|🍌*&|'+&|;+0#0000000&| |p|r|i|n|t|f|(|"+0#e000002&|'|🍌*&|'+&|:|\+0#e000e06&|t| +0#e000002&|%+0#e000e06&|#|0|1|0|x|\|n|\|n|"+0#e000002&|,+0#0000000&| |(|i+0#00e0003&|n|t|)+0#0000000&|u|c|4|)|;| @9 +@75 +@4|/+0#0000e05&@1| |3|2|-|b|i|t| |w|i|d|e| |c|h|a|r|a|c|t|e|r| |c|o|n|s|t|a|n|t|s| +0#0000000&@36 +@4|c+0#00e0003&|h|a|r|3|2|_|t| +0#0000000&|U|c|1| |=| |U+0#e000002&|'|a|'|;+0#0000000&| |p|r|i|n|t|f|(|"+0#e000002&|'|a|'|:|\+0#e000e06&|t| +0#e000002&|%+0#e000e06&|#|0|1|0|x|\|n|"+0#e000002&|,+0#0000000&| |(|i+0#00e0003&|n|t|)+0#0000000&|U|c|1|)|;| @13 +@4|c+0#00e0003&|h|a|r|3|2|_|t| +0#0000000&|U|c|2| |=| |U+0#e000002&|'|¢|'|;+0#0000000&| |p|r|i|n|t|f|(|"+0#e000002&|'|¢|'|:|\+0#e000e06&|t| +0#e000002&|%+0#e000e06&|#|0|1|0|x|\|n|"+0#e000002&|,+0#0000000&| |(|i+0#00e0003&|n|t|)+0#0000000&|U|c|2|)|;| @13 +@57|1|8|,|5| @9|5|6|%| diff --git a/runtime/syntax/testdir/dumps/c_character_constant_02.dump b/runtime/syntax/testdir/dumps/c_character_constant_02.dump new file mode 100644 index 0000000000..e08b11b9db --- /dev/null +++ b/runtime/syntax/testdir/dumps/c_character_constant_02.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@3|c+0#00e0003&|h|a|r|3|2|_|t| +0#0000000&|U|c|2| |=| |U+0#e000002&|'|¢|'|;+0#0000000&| |p|r|i|n|t|f|(|"+0#e000002&|'|¢|'|:|\+0#e000e06&|t| +0#e000002&|%+0#e000e06&|#|0|1|0|x|\|n|"+0#e000002&|,+0#0000000&| |(|i+0#00e0003&|n|t|)+0#0000000&|U|c|2|)|;| @13 +@4|c+0#00e0003&|h|a|r|3|2|_|t| +0#0000000&|U|c|3| |=| |U+0#e000002&|'|猫*&|'+&|;+0#0000000&| |p|r|i|n|t|f|(|"+0#e000002&|'|猫*&|'+&|:|\+0#e000e06&|t| +0#e000002&|%+0#e000e06&|#|0|1|0|x|\|n|"+0#e000002&|,+0#0000000&| |(|i+0#00e0003&|n|t|)+0#0000000&|U|c|3|)|;| @11 +@4|c+0#00e0003&|h|a|r|3|2|_|t| +0#0000000&|U|c|4| |=| |U+0#e000002&|'|🍌*&|'+&|;+0#0000000&| |p|r|i|n|t|f|(|"+0#e000002&|'|🍌*&|'+&|:|\+0#e000e06&|t| +0#e000002&|%+0#e000e06&|#|0|1|0|x|\|n|\|n|"+0#e000002&|,+0#0000000&| |(|i+0#00e0003&|n|t|)+0#0000000&|U|c|4|)|;| @9 +@75 +@4|/+0#0000e05&@1| |w|i|d|e| |c|h|a|r|a|c|t|e|r| |c|o|n|s|t|a|n|t|s| +0#0000000&@43 +@4>w+0#00e0003&|c|h|a|r|_|t| +0#0000000&|w|c|1| |=| |L+0#e000002&|'|a|'|;+0#0000000&| |p|r|i|n|t|f|(|"+0#e000002&|'|a|'|:|\+0#e000e06&|t| +0#e000002&|%+0#e000e06&|#|0|1|0|x|\|n|"+0#e000002&|,+0#0000000&| |(|i+0#00e0003&|n|t|)+0#0000000&|w|c|1|)|;| @14 +@4|w+0#00e0003&|c|h|a|r|_|t| +0#0000000&|w|c|2| |=| |L+0#e000002&|'|¢|'|;+0#0000000&| |p|r|i|n|t|f|(|"+0#e000002&|'|¢|'|:|\+0#e000e06&|t| +0#e000002&|%+0#e000e06&|#|0|1|0|x|\|n|"+0#e000002&|,+0#0000000&| |(|i+0#00e0003&|n|t|)+0#0000000&|w|c|2|)|;| @14 +@4|w+0#00e0003&|c|h|a|r|_|t| +0#0000000&|w|c|3| |=| |L+0#e000002&|'|猫*&|'+&|;+0#0000000&| |p|r|i|n|t|f|(|"+0#e000002&|'|猫*&|'+&|:|\+0#e000e06&|t| +0#e000002&|%+0#e000e06&|#|0|1|0|x|\|n|"+0#e000002&|,+0#0000000&| |(|i+0#00e0003&|n|t|)+0#0000000&|w|c|3|)|;| @12 +@4|w+0#00e0003&|c|h|a|r|_|t| +0#0000000&|w|c|4| |=| |L+0#e000002&|'|🍌*&|'+&|;+0#0000000&| |p|r|i|n|t|f|(|"+0#e000002&|'|🍌*&|'+&|:|\+0#e000e06&|t| +0#e000002&|%+0#e000e06&|#|0|1|0|x|\|n|\|n|"+0#e000002&|,+0#0000000&| |(|i+0#00e0003&|n|t|)+0#0000000&|w|c|4|)|;| @10 +|}| @73 +@75 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|3|5|,|5| @9|B|o|t| diff --git a/runtime/syntax/testdir/dumps/c_integer_constant_00.dump b/runtime/syntax/testdir/dumps/c_integer_constant_00.dump new file mode 100644 index 0000000000..2a87e5bc2f --- /dev/null +++ b/runtime/syntax/testdir/dumps/c_integer_constant_00.dump @@ -0,0 +1,20 @@ +>/+0#0000e05#ffffff0@1| |C| |i|n|t|e|g|e|r| |c|o|n|s|t|a|n|t|s| +0#0000000&@52 +@75 +|/+0#0000e05&@1| |S|o|u|r|c|e|:| |h|t@1|p|s|:|/@1|e|n|.|c|p@1|r|e|f|e|r|e|n|c|e|.|c|o|m|/|w|/|c|/|l|a|n|g|u|a|g|e|/|i|n|t|e|g|e|r|_|c|o|n|s|t|a|n|t| +0#0000000&@6 +@75 +|#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|i|n|t@1|y|p|e|s|.|h|>| +0#0000000&@53 +|#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d|i|o|.|h|>| +0#0000000&@56 +@75 +|i+0#00e0003&|n|t| +0#0000000&|m|a|i|n|(|v+0#00e0003&|o|i|d|)+0#0000000&| @60 +|{| @73 +@4|p|r|i|n|t|f|(|"+0#e000002&|1|2|3| |=| |%+0#e000e06&|d|\|n|"+0#e000002&|,+0#0000000&| |1+0#e000002&|2|3|)+0#0000000&|;| @44 +@4|p|r|i|n|t|f|(|"+0#e000002&|0|1|2|3| |=| |%+0#e000e06&|d|\|n|"+0#e000002&|,+0#0000000&| |0+0#e000002&|1|2|3|)+0#0000000&|;| @42 +@4|p|r|i|n|t|f|(|"+0#e000002&|0|x|1|2|3| |=| |%+0#e000e06&|d|\|n|"+0#e000002&|,+0#0000000&| |0+0#e000002&|x|1|2|3|)+0#0000000&|;| @40 +@4|p|r|i|n|t|f|(|"+0#e000002&|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|u|l@1| |=| |%+0#e000e06&|l@1|u|\|n|"+0#e000002&|,+0#0000000&| |1+0#e000002&|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|u|l@1|)+0#0000000&|;| @2 +@4|/+0#0000e05&@1| |t|h|e| |t|y|p|e| |i|s| |a| |6|4|-|b|i|t| |t|y|p|e| |(|u|n|s|i|g|n|e|d| |l|o|n|g| |l|o|n|g| |o|r| |p|o|s@1|i|b|l|y| |u|n|s|i|g|n|e|d| |l +|o|n|g|)| +0#0000000&@70 +@4|/+0#0000e05&@1| |e|v|e|n| |w|i|t|h|o|u|t| |a| |l|o|n|g| |s|u|f@1|i|x| +0#0000000&@41 +@4|p|r|i|n|t|f|(|"+0#e000002&|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|u| |=| |%|"|P+0#0000000&|R|I|u|6|4|"+0#e000002&|\+0#e000e06&|n|"+0#e000002&|,+0#0000000&| |1+0#e000002&|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|u| +0#0000000&|)|;| +@75 +@4|/+0#0000e05&@1| |p|r|i|n|t|f|(|"|%|l@1|d|\|n|"|,| |-|9|2@1|3@1|7|2|0|3|6|8|5|4|7@1|5|8|0|8|)|;| |/@1| |E|r@1|o|r|:| +0#0000000&@18 +@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/c_integer_constant_01.dump b/runtime/syntax/testdir/dumps/c_integer_constant_01.dump new file mode 100644 index 0000000000..f1ebddd15a --- /dev/null +++ b/runtime/syntax/testdir/dumps/c_integer_constant_01.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@3|/+0#0000e05&@1| |t|h|e| |t|y|p|e| |i|s| |a| |6|4|-|b|i|t| |t|y|p|e| |(|u|n|s|i|g|n|e|d| |l|o|n|g| |l|o|n|g| |o|r| |p|o|s@1|i|b|l|y| |u|n|s|i|g|n|e|d| |l +|o|n|g|)| +0#0000000&@70 +@4|/+0#0000e05&@1| |e|v|e|n| |w|i|t|h|o|u|t| |a| |l|o|n|g| |s|u|f@1|i|x| +0#0000000&@41 +@4|p|r|i|n|t|f|(|"+0#e000002&|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|u| |=| |%|"|P+0#0000000&|R|I|u|6|4|"+0#e000002&|\+0#e000e06&|n|"+0#e000002&|,+0#0000000&| |1+0#e000002&|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|u| +0#0000000&|)|;| +@75 +@4>/+0#0000e05&@1| |p|r|i|n|t|f|(|"|%|l@1|d|\|n|"|,| |-|9|2@1|3@1|7|2|0|3|6|8|5|4|7@1|5|8|0|8|)|;| |/@1| |E|r@1|o|r|:| +0#0000000&@18 +@8|/+0#0000e05&@1| |t|h|e| |v|a|l|u|e| |9|2@1|3@1|7|2|0|3|6|8|5|4|7@1|5|8|0|8| |c|a|n@1|o|t| |f|i|t| |i|n| |s|i|g|n|e|d| |l|o|n|g| |l|o|n|g|,| |w|h +|i|c|h| +0#0000000&@71 +@8|/+0#0000e05&@1| |i|s| |t|h|e| |b|i|g@1|e|s|t| |t|y|p|e| |a|l@1|o|w|e|d| |f|o|r| |u|n|s|u|f@1|i|x|e|d| |d|e|c|i|m|a|l| |i|n|t|e|g|e|r| |c|o|n|s|t +|a|n|t| +0#0000000&@71 +@75 +@4|p|r|i|n|t|f|(|"+0#e000002&|%+0#e000e06&|l@1|u|\|n|"+0#e000002&|,+0#0000000&| |-|9+0#e000002&|2@1|3@1|7|2|0|3|6|8|5|4|7@1|5|8|0|8|u|l@1| +0#0000000&|)|;| @27 +@4|/+0#0000e05&@1| |u|n|a|r|y| |m|i|n|u|s| |a|p@1|l|i|e|d| |t|o| |u|n|s|i|g|n|e|d| |v|a|l|u|e| |s|u|b|t|r|a|c|t|s| |i|t| |f|r|o|m| |2|^|6|4|,| +0#0000000&@6 +@4|/+0#0000e05&@1| |t|h|i|s| |g|i|v|e|s| |u|n|s|i|g|n|e|d| |9|2@1|3@1|7|2|0|3|6|8|5|4|7@1|5|8|0|8| +0#0000000&@28 +@75 +@4|p|r|i|n|t|f|(|"+0#e000002&|%+0#e000e06&|l@1|d|\|n|"+0#e000002&|,+0#0000000&| |-|9+0#e000002&|2@1|3@1|7|2|0|3|6|8|5|4|7@1|5|8|0|7|l@1| +0#0000000&|-| |1+0#e000002&|)+0#0000000&|;| @25 +@4|/+0#0000e05&@1| |c|o|r@1|e|c|t| |w|a|y| |t|o| |f|o|r|m| |s|i|g|n|e|d| |v|a|l|u|e| |-|9|2@1|3@1|7|2|0|3|6|8|5|4|7@1|5|8|0|8| +0#0000000&@14 +|}| @73 +@75 +@57|1|8|,|5| @9|5|2|%| diff --git a/runtime/syntax/testdir/dumps/c_integer_constant_02.dump b/runtime/syntax/testdir/dumps/c_integer_constant_02.dump new file mode 100644 index 0000000000..0fd7251643 --- /dev/null +++ b/runtime/syntax/testdir/dumps/c_integer_constant_02.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@74 +|i+0#00e0003&|n|t| +0#0000000&|d| |=| |4+0#e000002&|2|;+0#0000000&| @63 +|i+0#00e0003&|n|t| +0#0000000&|o| |=| |0+0#e000002&|5|2|;+0#0000000&| @62 +|i+0#00e0003&|n|t| +0#0000000&|x| |=| |0+0#e000002&|x|2|a|;+0#0000000&| @61 +|i+0#00e0003&|n|t| +0#0000000&|X| |=| |0+0#e000002&|X|2|A|;+0#0000000&| @61 +>i+0#00e0003&|n|t| +0#0000000&|b| |=| |0+0#e000002&|b|1|0|1|0|1|0|;+0#0000000&| |/+0#0000e05&@1| |C|2|3| +0#0000000&@50 +@75 +|/+0#0000e05&@1| |T|h|e| |f|o|l@1|o|w|i|n|g| |v|a|r|i|a|b|l|e|s| |a|r|e| |a|l|s|o| |i|n|i|t|i|a|l|i|z|e|d| |t|o| |t|h|e| |s|a|m|e| |v|a|l|u|e|:| +0#0000000&@8 +@75 +|u+0#00e0003&|n|s|i|g|n|e|d| +0#0000000&|l+0#00e0003&|o|n|g| +0#0000000&|l+0#00e0003&|o|n|g| +0#0000000&|l|1| |=| |1+0#e000002&|8|4@1|6|7|4@1|0|7|3|7|0|9|5@1|0|5|9|2|u|l@1|;+0#0000000&| |/+0#0000e05&@1| |C|9@1| +0#0000000&@19 +|u+0#00e0003&|n|s|i|g|n|e|d| +0#0000000&|l+0#00e0003&|o|n|g| +0#0000000&|l+0#00e0003&|o|n|g| +0#0000000&|l|2| |=| |1+0#e000002&|8|'|4@1|6|'|7|4@1|'|0|7|3|'|7|0|9|'|5@1|0|'|5|9|2|l@1|u|;+0#0000000&| |/+0#0000e05&@1| |C|2|3| +0#0000000&@13 +|u+0#00e0003&|n|s|i|g|n|e|d| +0#0000000&|l+0#00e0003&|o|n|g| +0#0000000&|l+0#00e0003&|o|n|g| +0#0000000&|l|3| |=| |1+0#e000002&|8|4@1|'|6|7|4@1|'|0|7|3|7|'|0|9|5@1|'|0|5|9|2|u|L@1|;+0#0000000&| |/+0#0000e05&@1| |C|2|3| +0#0000000&@15 +|u+0#00e0003&|n|s|i|g|n|e|d| +0#0000000&|l+0#00e0003&|o|n|g| +0#0000000&|l+0#00e0003&|o|n|g| +0#0000000&|l|4| |=| |1+0#e000002&|8|4@1|6|7|'|4@1|0|7|3|7|'|0|'|9|5@1|0|5|'|9|2|L@1|U|;+0#0000000&| |/+0#0000e05&@1| |C|2|3| +0#0000000&@15 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|3|4|,|1| @9|B|o|t| diff --git a/runtime/syntax/testdir/dumps/c_preprocessor_conditional_00.dump b/runtime/syntax/testdir/dumps/c_preprocessor_conditional_00.dump new file mode 100644 index 0000000000..c8a8e3a4f1 --- /dev/null +++ b/runtime/syntax/testdir/dumps/c_preprocessor_conditional_00.dump @@ -0,0 +1,20 @@ +>/+0#0000e05#ffffff0@1| |C| |p|r|e|p|r|o|c|e|s@1|o|r| |-| |c|o|n|d|i|t|i|o|n|a|l| |i|n|c|l|u|s|i|o|n| +0#0000000&@33 +@75 +|/+0#0000e05&@1| |S|o|u|r|c|e|:| |h|t@1|p|s|:|/@1|e|n|.|c|p@1|r|e|f|e|r|e|n|c|e|.|c|o|m|/|w|/|c|/|p|r|e|p|r|o|c|e|s@1|o|r|/|c|o|n|d|i|t|i|o|n|a|l| +0#0000000&@7 +@75 +|#+0#e000e06&|d|e|f|i|n|e| |A|B|C|D| |2+0#e000002&| +0#0000000&@60 +|#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d|i|o|.|h|>| +0#0000000&@56 +@75 +|i+0#00e0003&|n|t| +0#0000000&|m|a|i|n|(|v+0#00e0003&|o|i|d|)+0#0000000&| @60 +|{| @73 +@75 +|#+0#e000e06&|i|f|d|e|f| |A|B|C|D| +0#0000000&@63 +@4|p|r|i|n|t|f|(|"+0#e000002&|1|:| |y|e|s|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @51 +|#+0#e000e06&|e|l|s|e| +0#0000000&@69 +@4|p|r|i|n|t|f|(|"+0#e000002&|1|:| |n|o|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @52 +|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68 +@75 +|#+0#e000e06&|i|f|n|d|e|f| |A|B|C|D| +0#0000000&@62 +@4|p|r|i|n|t|f|(|"+0#e000002&|2|:| |n|o|1|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @51 +|#+0#e000e06&|e|l|i|f| |A|B|C|D| |=@1| |2+0#e000002&| +0#0000000&@59 +@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/c_preprocessor_conditional_01.dump b/runtime/syntax/testdir/dumps/c_preprocessor_conditional_01.dump new file mode 100644 index 0000000000..c63205e87f --- /dev/null +++ b/runtime/syntax/testdir/dumps/c_preprocessor_conditional_01.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@3|p|r|i|n|t|f|(|"+0#e000002&|1|:| |n|o|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @52 +|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68 +@75 +|#+0#e000e06&|i|f|n|d|e|f| |A|B|C|D| +0#0000000&@62 +@4|p|r|i|n|t|f|(|"+0#e000002&|2|:| |n|o|1|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @51 +>#+0#e000e06&|e|l|i|f| |A|B|C|D| |=@1| |2+0#e000002&| +0#0000000&@59 +@4|p|r|i|n|t|f|(|"+0#e000002&|2|:| |y|e|s|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @51 +|#+0#e000e06&|e|l|s|e| +0#0000000&@69 +@4|p|r|i|n|t|f|(|"+0#e000002&|2|:| |n|o|2|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @51 +|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68 +@75 +|#+0#e000e06&|i|f| |!|d|e|f|i|n|e|d|(|D|C|B|A|)| |&@1| |(|A|B|C|D| |<| |2+0#e000002&| +0#e000e06&|*| |4+0#e000002&| +0#e000e06&|-| |3+0#e000002&|)+0#e000e06&| +0#0000000&@34 +@4|p|r|i|n|t|f|(|"+0#e000002&|3|:| |y|e|s|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @51 +|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68 +@75 +|/+0#0000e05&@1| |C|2|3| |d|i|r|e|c|t|i|v|e|s| |#|e|l|i|f|d|e|f|/|#|e|l|i|f|n|d|e|f| +0#0000000&@38 +|#+0#e000e06&|i|f|d|e|f| |C|P|U| +0#0000000&@64 +@4|p|r|i|n|t|f|(|"+0#e000002&|4|:| |n|o|1|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @51 +|#+0#e000e06&|e|l|i|f|d|e|f| |G|P|U| +0#0000000&@62 +@57|1|9|,|1| @9|6|1|%| diff --git a/runtime/syntax/testdir/dumps/c_preprocessor_conditional_02.dump b/runtime/syntax/testdir/dumps/c_preprocessor_conditional_02.dump new file mode 100644 index 0000000000..17bbac19f0 --- /dev/null +++ b/runtime/syntax/testdir/dumps/c_preprocessor_conditional_02.dump @@ -0,0 +1,20 @@ +|#+0#e000e06#ffffff0|e|l|i|f|d|e|f| |G|P|U| +0#0000000&@62 +@4|p|r|i|n|t|f|(|"+0#e000002&|4|:| |n|o|2|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @51 +|#+0#e000e06&|e|l|i|f|n|d|e|f| |R|A|M| +0#0000000&@61 +@4|p|r|i|n|t|f|(|"+0#e000002&|4|:| |y|e|s|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| |/+0#0000e05&@1| |s|e|l|e|c|t|e|d| |i|n| |C|2|3| |m|o|d|e|,| |m|a|y| |b|e| |s|e|l|e|c|t|e|d| |i|n| |p|r|e|-|C|2|3 +| |m|o|d|e| +0#0000000&@69 +>#+0#e000e06&|e|l|s|e| +0#0000000&@69 +@4|p|r|i|n|t|f|(|"+0#e000002&|4|:| |n|o|3|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| |/+0#0000e05&@1| |m|a|y| |b|e| |s|e|l|e|c|t|e|d| |i|n| |p|r|e|-|C|2|3| |m|o|d|e| +0#0000000&@16 +|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68 +|}| @73 +@75 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|3|6|,|1| @9|B|o|t| diff --git a/runtime/syntax/testdir/dumps/c_preprocessor_embed_00.dump b/runtime/syntax/testdir/dumps/c_preprocessor_embed_00.dump new file mode 100644 index 0000000000..ead46401e4 --- /dev/null +++ b/runtime/syntax/testdir/dumps/c_preprocessor_embed_00.dump @@ -0,0 +1,20 @@ +>/+0#0000e05#ffffff0@1| |C| |p|r|e|p|r|o|c|e|s@1|o|r| |-| |b|i|n|a|r|y| |r|e|s|o|u|r|c|e| |i|n|c|l|u|s|i|o|n| +0#0000000&@29 +@75 +|/+0#0000e05&@1| |S|o|u|r|c|e|:| |h|t@1|p|s|:|/@1|e|n|.|c|p@1|r|e|f|e|r|e|n|c|e|.|c|o|m|/|w|/|c|/|p|r|e|p|r|o|c|e|s@1|o|r|/|e|m|b|e|d| +0#0000000&@13 +@75 +|#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d|i|n|t|.|h|>| +0#0000000&@55 +|#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d|i|o|.|h|>| +0#0000000&@56 +@75 +|c+0#00e0003&|o|n|s|t| +0#0000000&|u+0#00e0003&|i|n|t|8|_|t| +0#0000000&|i|m|a|g|e|_|d|a|t|a|[|]| |=| |{| @44 +|#+0#e000e06&|e|m|b|e|d| |"+0#e000002&|i|m|a|g|e|.|p|n|g|"| +0#0000000&@56 +|}|;| @72 +@75 +|c+0#00e0003&|o|n|s|t| +0#0000000&|c+0#00e0003&|h|a|r| +0#0000000&|m|e|s@1|a|g|e|[|]| |=| |{| @50 +|#+0#e000e06&|e|m|b|e|d| |"+0#e000002&|m|e|s@1|a|g|e|.|t|x|t|"| +0#e000e06&|i|f|_|e|m|p|t|y|(|'+0#e000002&|M|'|,+0#e000e06&| |'+0#e000002&|i|'|,+0#e000e06&| |'+0#e000002&|s|'|,+0#e000e06&| |'+0#e000002&|s|'|,+0#e000e06&| |'+0#e000002&|i|'|,+0#e000e06&| |'+0#e000002&|n|'|,+0#e000e06&| |'+0#e000002&|g|'|,+0#e000e06&| |'|\|n|'|)| +0#0000000&@4 +|,|'+0#e000e06&|\|0|'| +0#0000000&|/+0#0000e05&@1| |n|u|l@1| |t|e|r|m|i|n|a|t|o|r| +0#0000000&@50 +|}|;| @72 +@75 +|v+0#00e0003&|o|i|d| +0#0000000&|d|u|m|p|(|c+0#00e0003&|o|n|s|t| +0#0000000&|u+0#00e0003&|i|n|t|8|_|t| +0#0000000&|a|r@1|[|]|,| |s+0#00e0003&|i|z|e|_|t| +0#0000000&|s|i|z|e|)| @31 +|{| @73 +@4|f+0#af5f00255&|o|r| +0#0000000&|(|s+0#00e0003&|i|z|e|_|t| +0#0000000&|i| |=| |0+0#e000002&|;+0#0000000&| |i| |!|=| |s|i|z|e|;| |+@1|i|)| @36 +@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/c_preprocessor_embed_01.dump b/runtime/syntax/testdir/dumps/c_preprocessor_embed_01.dump new file mode 100644 index 0000000000..0f594266a8 --- /dev/null +++ b/runtime/syntax/testdir/dumps/c_preprocessor_embed_01.dump @@ -0,0 +1,20 @@ +|,+0&#ffffff0|'+0#e000e06&|\|0|'| +0#0000000&|/+0#0000e05&@1| |n|u|l@1| |t|e|r|m|i|n|a|t|o|r| +0#0000000&@50 +|}|;| @72 +@75 +|v+0#00e0003&|o|i|d| +0#0000000&|d|u|m|p|(|c+0#00e0003&|o|n|s|t| +0#0000000&|u+0#00e0003&|i|n|t|8|_|t| +0#0000000&|a|r@1|[|]|,| |s+0#00e0003&|i|z|e|_|t| +0#0000000&|s|i|z|e|)| @31 +|{| @73 +@4>f+0#af5f00255&|o|r| +0#0000000&|(|s+0#00e0003&|i|z|e|_|t| +0#0000000&|i| |=| |0+0#e000002&|;+0#0000000&| |i| |!|=| |s|i|z|e|;| |+@1|i|)| @36 +@8|p|r|i|n|t|f|(|"+0#e000002&|%+0#e000e06&|0|2|X|%|c|"+0#e000002&|,+0#0000000&| |a|r@1|[|i|]|,| |(|i| |+| |1+0#e000002&|)+0#0000000&| |%| |1+0#e000002&|6| +0#0000000&|?| |'+0#e000002&| |'| +0#0000000&|:| |'+0#e000e06&|\|n|'|)+0#0000000&|;| @14 +@4|p|u|t|s|(|"+0#e000002&@1|)+0#0000000&|;| @61 +|}| @73 +@75 +|i+0#00e0003&|n|t| +0#0000000&|m|a|i|n|(|)| @64 +|{| @73 +@4|p|u|t|s|(|"+0#e000002&|i|m|a|g|e|_|d|a|t|a|[|]|:|"|)+0#0000000&|;| @48 +@4|d|u|m|p|(|i|m|a|g|e|_|d|a|t|a|,| |s+0#af5f00255&|i|z|e|o|f| +0#0000000&|i|m|a|g|e|_|d|a|t|a|)|;| @34 +@4|p|u|t|s|(|"+0#e000002&|m|e|s@1|a|g|e|[|]|:|"|)+0#0000000&|;| @51 +@4|d|u|m|p|(@1|c+0#00e0003&|o|n|s|t| +0#0000000&|u+0#00e0003&|i|n|t|8|_|t|*+0#0000000&|)|m|e|s@1|a|g|e|,| |s+0#af5f00255&|i|z|e|o|f| +0#0000000&|m|e|s@1|a|g|e|)|;| @24 +|}| @73 +@75 +|~+0#4040ff13&| @73 +| +0#0000000&@56|1|9|,|5| @9|B|o|t| diff --git a/runtime/syntax/testdir/dumps/c_preprocessor_error_00.dump b/runtime/syntax/testdir/dumps/c_preprocessor_error_00.dump new file mode 100644 index 0000000000..b178efee79 --- /dev/null +++ b/runtime/syntax/testdir/dumps/c_preprocessor_error_00.dump @@ -0,0 +1,20 @@ +>/+0#0000e05#ffffff0@1| |C| |p|r|e|p|r|o|c|e|s@1|o|r| |-| |d|i|a|g|n|o|s|t|i|c| |d|i|r|e|c|t|i|v|e|s| +0#0000000&@33 +@75 +|/+0#0000e05&@1| |S|o|u|r|c|e|:| |h|t@1|p|s|:|/@1|e|n|.|c|p@1|r|e|f|e|r|e|n|c|e|.|c|o|m|/|w|/|c|/|p|r|e|p|r|o|c|e|s@1|o|r|/|e|r@1|o|r| +0#0000000&@13 +@75 +|#+0#e000e06&|i|f| |_@1|S|T|D|C|_@1| |!|=| |1+0#e000002&| +0#0000000&@57 +|#+0#e000e06&| @1|e|r@1|o|r| |"+0#e000002&|N|o|t| |a| |s|t|a|n|d|a|r|d| |c|o|m|p|l|i|a|n|t| |c|o|m|p|i|l|e|r|"| +0#0000000&@30 +|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68 +@75 +|#+0#e000e06&|i|f| |_@1|S|T|D|C|_|V|E|R|S|I|O|N|_@1| |>|=| |2+0#e000002&|0|2|3|1@1|L| +0#0000000&@43 +|#+0#e000e06&| @1|w|a|r|n|i|n|g| |"+0#e000002&|U|s|i|n|g| |#|w|a|r|n|i|n|g| |a|s| |a| |s|t|a|n|d|a|r|d| |f|e|a|t|u|r|e|"| +0#0000000&@25 +|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68 +@75 +|#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d|i|o|.|h|>| +0#0000000&@56 +@75 +|i+0#00e0003&|n|t| +0#0000000&|m|a|i|n| |(|v+0#00e0003&|o|i|d|)+0#0000000&| @59 +|{| @73 +@4|p|r|i|n|t|f|(|"+0#e000002&|T|h|e| |c|o|m|p|i|l|e|r| |u|s|e|d| |c|o|n|f|o|r|m|s| |t|o| |t|h|e| |I|S|O| |C| |S|t|a|n|d|a|r|d| |!@1|"|)+0#0000000&|;| @8 +|}| @73 +@75 +@57|1|,|1| @10|A|l@1| diff --git a/runtime/syntax/testdir/dumps/c_string_literal_00.dump b/runtime/syntax/testdir/dumps/c_string_literal_00.dump new file mode 100644 index 0000000000..65f222db5f --- /dev/null +++ b/runtime/syntax/testdir/dumps/c_string_literal_00.dump @@ -0,0 +1,20 @@ +>/+0#0000e05#ffffff0@1| |C| |s|t|r|i|n|g| |l|i|t|e|r|a|l|s| +0#0000000&@54 +@75 +|/+0#0000e05&@1| |S|o|u|r|c|e|:| |h|t@1|p|s|:|/@1|e|n|.|c|p@1|r|e|f|e|r|e|n|c|e|.|c|o|m|/|w|/|c|/|l|a|n|g|u|a|g|e|/|s|t|r|i|n|g|_|l|i|t|e|r|a|l| +0#0000000&@8 +@75 +|#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|i|n|t@1|y|p|e|s|.|h|>| +0#0000000&@53 +|#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|l|o|c|a|l|e|.|h|>| +0#0000000&@55 +|#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d@1|e|f|.|h|>| +0#0000000&@55 +|#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d|i|o|.|h|>| +0#0000000&@56 +|#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|s|t|d|l|i|b|.|h|>| +0#0000000&@55 +|#+0#e000e06&|i|n|c|l|u|d|e| |<+0#e000002&|u|c|h|a|r|.|h|>| +0#0000000&@56 +@75 +|i+0#00e0003&|n|t| +0#0000000&|m|a|i|n|(|v+0#00e0003&|o|i|d|)+0#0000000&| @60 +|{| @73 +@4|c+0#00e0003&|h|a|r| +0#0000000&|s|1|[|]| |=| |"+0#e000002&|a|猫*&|🍌|"+&|;+0#0000000&| |/+0#0000e05&@1| |o|r| |"|a|\|u|7|3|2|B|\|U|0@2|1|F|3|4|C|"| +0#0000000&@24 +|#+0#e000e06&|i|f| |_@1|S|T|D|C|_|V|E|R|S|I|O|N|_@1| |>|=| |2+0#e000002&|0|2|3|1@1|L| +0#0000000&@43 +@4|c+0#00e0003&|h|a|r|8|_|t| +0#0000000&@63 +|#+0#e000e06&|e|l|s|e| +0#0000000&@69 +@4|c+0#00e0003&|h|a|r| +0#0000000&@66 +|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68 +@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/c_string_literal_01.dump b/runtime/syntax/testdir/dumps/c_string_literal_01.dump new file mode 100644 index 0000000000..a2c5a46a61 --- /dev/null +++ b/runtime/syntax/testdir/dumps/c_string_literal_01.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@3|c+0#00e0003&|h|a|r| +0#0000000&|s|1|[|]| |=| |"+0#e000002&|a|猫*&|🍌|"+&|;+0#0000000&| |/+0#0000e05&@1| |o|r| |"|a|\|u|7|3|2|B|\|U|0@2|1|F|3|4|C|"| +0#0000000&@24 +|#+0#e000e06&|i|f| |_@1|S|T|D|C|_|V|E|R|S|I|O|N|_@1| |>|=| |2+0#e000002&|0|2|3|1@1|L| +0#0000000&@43 +@4|c+0#00e0003&|h|a|r|8|_|t| +0#0000000&@63 +|#+0#e000e06&|e|l|s|e| +0#0000000&@69 +@4|c+0#00e0003&|h|a|r| +0#0000000&@66 +>#+0#e000e06&|e|n|d|i|f| +0#0000000&@68 +@4|s|2|[|]| |=| |u+0#e000002&|8|"|a|猫*&|🍌|"+&|;+0#0000000&| @53 +@4|c+0#00e0003&|h|a|r|1|6|_|t| +0#0000000&|s|3|[|]| |=| |u+0#e000002&|"|a|猫*&|🍌|"+&|;+0#0000000&| @45 +@4|c+0#00e0003&|h|a|r|3|2|_|t| +0#0000000&|s|4|[|]| |=| |U+0#e000002&|"|a|猫*&|🍌|"+&|;+0#0000000&| @45 +@4|w+0#00e0003&|c|h|a|r|_|t| +0#0000000&|s|5|[|]| |=| |L+0#e000002&|"|a|猫*&|🍌|"+&|;+0#0000000&| @46 +@75 +@4|s|e|t|l|o|c|a|l|e|(|L+0#e000002&|C|_|A|L@1|,+0#0000000&| |"+0#e000002&|e|n|_|U|S|.|u|t|f|8|"|)+0#0000000&|;| @38 +@4|p|r|i|n|t|f|(|"+0#e000002&| @1|\+0#e000e06&|"|%|s|\|"| +0#e000002&|i|s| |a| |c|h|a|r|[|%+0#e000e06&|z|u|]+0#e000002&| |h|o|l|d|i|n|g| @4|{| |"|,+0#0000000&| |s|1|,| |s+0#af5f00255&|i|z|e|o|f| +0#0000000&|s|1| |/| |s+0#af5f00255&|i|z|e|o|f +| +0#0000000&|*|s|1|)|;| @68 +@4|f+0#af5f00255&|o|r|(+0#0000000&|s+0#00e0003&|i|z|e|_|t| +0#0000000&|n| |=| |0+0#e000002&|;+0#0000000&| |n| |<| |s+0#af5f00255&|i|z|e|o|f| +0#0000000&|s|1| |/| |s+0#af5f00255&|i|z|e|o|f| +0#0000000&|*|s|1|;| |+@1|n|)| @20 +@8|p|r|i|n|t|f|(|"+0#e000002&|0|x|%+0#e000e06&|0|2|X| +0#e000002&|"|,+0#0000000&| |+|(|u+0#00e0003&|n|s|i|g|n|e|d| +0#0000000&|c+0#00e0003&|h|a|r|)+0#0000000&|s|1|[|n|]|)|;| @25 +@4|p|u|t|s|(|"+0#e000002&|}|"|)+0#0000000&|;| @60 +@4|p|r|i|n|t|f|(| @63 +|#+0#e000e06&|i|f| |_@1|S|T|D|C|_|V|E|R|S|I|O|N|_@1| |>|=| |2+0#e000002&|0|2|3|1@1|L| +0#0000000&@43 +@57|1|9|,|1| @9|3@1|%| diff --git a/runtime/syntax/testdir/dumps/c_string_literal_02.dump b/runtime/syntax/testdir/dumps/c_string_literal_02.dump new file mode 100644 index 0000000000..a038a36634 --- /dev/null +++ b/runtime/syntax/testdir/dumps/c_string_literal_02.dump @@ -0,0 +1,20 @@ +|#+0#e000e06#ffffff0|i|f| |_@1|S|T|D|C|_|V|E|R|S|I|O|N|_@1| |>|=| |2+0#e000002&|0|2|3|1@1|L| +0#0000000&@43 +@4|"+0#e000002&|u|8|\+0#e000e06&|"|%|s|\|"| +0#e000002&|i|s| |a| |c|h|a|r|8|_|t|[|%+0#e000e06&|z|u|]+0#e000002&| |h|o|l|d|i|n|g| @1|{| |"| +0#0000000&@30 +|#+0#e000e06&|e|l|s|e| +0#0000000&@69 +@4|"+0#e000002&|u|8|\+0#e000e06&|"|%|s|\|"| +0#e000002&|i|s| |a| |c|h|a|r|[|%+0#e000e06&|z|u|]+0#e000002&| |h|o|l|d|i|n|g| @4|{| |"| +0#0000000&@30 +|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68 +>,| |s|2|,| |s+0#af5f00255&|i|z|e|o|f| +0#0000000&|s|2| |/| |s+0#af5f00255&|i|z|e|o|f| +0#0000000&|*|s|2|)|;| @44 +@4|f+0#af5f00255&|o|r|(+0#0000000&|s+0#00e0003&|i|z|e|_|t| +0#0000000&|n| |=| |0+0#e000002&|;+0#0000000&| |n| |<| |s+0#af5f00255&|i|z|e|o|f| +0#0000000&|s|2| |/| |s+0#af5f00255&|i|z|e|o|f| +0#0000000&|*|s|2|;| |+@1|n|)| @20 +|#+0#e000e06&|i|f| |_@1|S|T|D|C|_|V|E|R|S|I|O|N|_@1| |>|=| |2+0#e000002&|0|2|3|1@1|L| +0#0000000&@43 +@7|p|r|i|n|t|f|(|"+0#e000002&|0|x|%+0#e000e06&|0|2|X| +0#e000002&|"|,+0#0000000&| |s|2|[|n|]|)|;| @42 +|#+0#e000e06&|e|l|s|e| +0#0000000&@69 +@7|p|r|i|n|t|f|(|"+0#e000002&|0|x|%+0#e000e06&|0|2|X| +0#e000002&|"|,+0#0000000&| |+|(|u+0#00e0003&|n|s|i|g|n|e|d| +0#0000000&|c+0#00e0003&|h|a|r|)+0#0000000&|s|2|[|n|]|)|;| @26 +|#+0#e000e06&|e|n|d|i|f| +0#0000000&@68 +@4|p|u|t|s|(|"+0#e000002&|}|"|)+0#0000000&|;| @60 +@4|p|r|i|n|t|f|(|"+0#e000002&| |u|\+0#e000e06&|"|a+0#e000002&|猫*&|🍌|\+0#e000e06&|"| +0#e000002&|i|s| |a| |c|h|a|r|1|6|_|t|[|%+0#e000e06&|z|u|]+0#e000002&| |h|o|l|d|i|n|g| |{| |"|,+0#0000000&| |s+0#af5f00255&|i|z|e|o|f| +0#0000000&|s|3| |/| |s+0#af5f00255&|i|z|e|o|f| +0#0000000& +|*|s|3|)|;| @69 +@4|f+0#af5f00255&|o|r|(+0#0000000&|s+0#00e0003&|i|z|e|_|t| +0#0000000&|n| |=| |0+0#e000002&|;+0#0000000&| |n| |<| |s+0#af5f00255&|i|z|e|o|f| +0#0000000&|s|3| |/| |s+0#af5f00255&|i|z|e|o|f| +0#0000000&|*|s|3|;| |+@1|n|)| @20 +@7|p|r|i|n|t|f|(|"+0#e000002&|0|x|%|0|4|"| +0#0000000&|P|R|I|X|L|E|A|S|T|1|6|"+0#e000002&| |"|,+0#0000000&| |s|3|[|n|]|)|;| @29 +@4|p|u|t|s|(|"+0#e000002&|}|"|)+0#0000000&|;| @60 +@4|p|r|i|n|t|f|(|"+0#e000002&| |U|\+0#e000e06&|"|a+0#e000002&|猫*&|🍌|\+0#e000e06&|"| +0#e000002&|i|s| |a| |c|h|a|r|3|2|_|t|[|%+0#e000e06&|z|u|]+0#e000002&| |h|o|l|d|i|n|g| |{| |"|,+0#0000000&| |s+0#af5f00255&|i|z|e|o|f| +0#0000000&|s|4| |/| |s+0#af5f00255&|i|z|e|@+0#4040ff13&@2 +| +0#0000000&@56|3|6|,|1| @9|7|5|%| diff --git a/runtime/syntax/testdir/dumps/c_string_literal_03.dump b/runtime/syntax/testdir/dumps/c_string_literal_03.dump new file mode 100644 index 0000000000..081796705a --- /dev/null +++ b/runtime/syntax/testdir/dumps/c_string_literal_03.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@3|p|r|i|n|t|f|(|"+0#e000002&| |U|\+0#e000e06&|"|a+0#e000002&|猫*&|🍌|\+0#e000e06&|"| +0#e000002&|i|s| |a| |c|h|a|r|3|2|_|t|[|%+0#e000e06&|z|u|]+0#e000002&| |h|o|l|d|i|n|g| |{| |"|,+0#0000000&| |s+0#af5f00255&|i|z|e|o|f| +0#0000000&|s|4| |/| |s+0#af5f00255&|i|z|e|o|f| +0#0000000& +|*|s|4|)|;| @69 +@4|f+0#af5f00255&|o|r|(+0#0000000&|s+0#00e0003&|i|z|e|_|t| +0#0000000&|n| |=| |0+0#e000002&|;+0#0000000&| |n| |<| |s+0#af5f00255&|i|z|e|o|f| +0#0000000&|s|4| |/| |s+0#af5f00255&|i|z|e|o|f| +0#0000000&|*|s|4|;| |+@1|n|)| @20 +@7|p|r|i|n|t|f|(|"+0#e000002&|0|x|%|0|8|"| +0#0000000&|P|R|I|X|L|E|A|S|T|3|2|"+0#e000002&| |"|,+0#0000000&| |s|4|[|n|]|)|;| @29 +@4|p|u|t|s|(|"+0#e000002&|}|"|)+0#0000000&|;| @60 +@4>p|r|i|n|t|f|(|"+0#e000002&| |L|\+0#e000e06&|"|%|l|s|\|"| +0#e000002&|i|s| |a| |w|c|h|a|r|_|t|[|%+0#e000e06&|z|u|]+0#e000002&| |h|o|l|d|i|n|g| @1|{| |"|,+0#0000000&| |s|5|,| |s+0#af5f00255&|i|z|e|o|f| +0#0000000&|s|5| |/| |s+0#af5f00255&|i|z|e|o +|f| +0#0000000&|*|s|5|)|;| @67 +@4|f+0#af5f00255&|o|r|(+0#0000000&|s+0#00e0003&|i|z|e|_|t| +0#0000000&|n| |=| |0+0#e000002&|;+0#0000000&| |n| |<| |s+0#af5f00255&|i|z|e|o|f| +0#0000000&|s|5| |/| |s+0#af5f00255&|i|z|e|o|f| +0#0000000&|*|s|5|;| |+@1|n|)| @20 +@7|p|r|i|n|t|f|(|"+0#e000002&|0|x|%+0#e000e06&|0|8|X| +0#e000002&|"|,+0#0000000&| |(|u+0#00e0003&|n|s|i|g|n|e|d|)+0#0000000&|s|5|[|n|]|)|;| @32 +@4|p|u|t|s|(|"+0#e000002&|}|"|)+0#0000000&|;| @60 +|}| @73 +@75 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|5|2|,|5| @9|B|o|t| -- 2.39.5