⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testcases.c

📁 it is a basic java browser
💻 C
字号:
#define first thingif/* First we will test the comments */ifif/* There should be no if that is commented */ifif// End of line commentif/** Documentation comment */ifif/* multiple line          comment   */ifif/** multiple line    doc comment   */ifif/*  * nice * looking * comment */ifif// /* end of line comment */ more commentif// /* end of line commentif// end of line comment */ more commentif/*back to*//*back*/ifif/*back to*///backif/**/ifif/***/ifif/****/ifif/*****/ifif/******/ifif/* */ifif/* **/ifif/* ***/ifif/* ****/ifif/** */ifif/** **/ifif/** ***/ifif/** ****/ifif/*** */ifif/**** */ifif/* * */ifif/* ** */ifif/** * */ifif/** ** */ifif/*  * */ifif/*  ** */ifif/**  * */ifif/**  ** */ifif/* * ** *** **** / // /// //// */ifif/** * ** *** **** / // /// //// */ifif/*/*/ifif/*/**/ifif/*/***/ifif/*/****/ifif/*//*/ifif/*//**/ifif/*//***/ifif/*//****/ifif/*\*/ifif/*\\*/ifif/* *??/*/ifif// the next line should not be a comment \if/* c and c++ keywords */autobreakcaseconstcontinuedefaultdoelseenumexternforgotoifregisterreturnsizeofstaticstructswitchtypedefunionvolatilewhilecatchclassconst_castdeletedynamic_castfriendinlinemutablenamespacenewoperatoroverloadprivateprotectedpublicreinterpret_caststatic_casttemplatethistryvirtualboolchardoublefloatintlongshortsignedunsignedvoid/* pp test (no if should be in a pp or comment) */#include#include_next#define#undef#if#ifdef#ifndef#else#elif#endif#line#pragma#errorif#define 1 //commentif#define//commentif#define/*comment*/if#define /*comment*/ 1if#define/*comment*/1if# define 1// a space after the hash if #define 1 // a space before the hashif??=define // using a trigraph to represent the hash	 ??= define 1  // really nastyif#define something /*multiple line */ \     4if#define aString "A string with escape sequences\n\r\t\\\""if#defineNo space after keywordif#define stuff /*how about using a trigraph to get to the next line?*/ ??/	1 // should be part of define stuff.if/* Lets try some weird stuff to try and confuse it with trigraphs */#define line \\1 // still in define (somebody correct me if the pp does something different here)if#define a ??\line // still in defineif#define\ many ??/ multiple \ lines if/* Characters */'a','b','c','d','x','y','z','1','2','9','0','A','B','C','D','X','Y','Z',' ','	','!','@','#','$','%','^','&','*','(',')','{','}','?','=','+','|','~','`','"',// escape sequences'\a','\b','\f','\n','\r','\t','\v','\'','\"','\?','\\','\0','\1','\2','\03','\12','\012','\111','\222','\333','\xFF','\x12','\x00','\xDB','\X00','\XFF','\XDB'// trigraphs including escape sequence trigraphs'??-','??=','??(','??)','??/0','??/xDB','??/XDB','??/012','??/'','??'','??<','??>','??!','??-'/* Strings */"hello","","abcxyz123890ABCXYZ, 	!@#$%^&*(){}?+=|~`'","\a\b\f\n\r\t\v\'\"\?\\\0",// if you are wondering about why some of the following are valid, consider// "\xFFF" = '\xFF' + 'F'// "\29" = '\2' + '9'"\1\2\03\12\012\111\222\333\x000\xFFF\08\29\444","??-??=??(??)??'??<??>??!??-??a??b??{??}??","?","??","???","??A","??/xDB??/0??/012??/"","string that \spans ??/multiple \lines",/* Identifiers *//**/identifier/**//**/a0b1c2d3e4f5g/**//**/h6i7j8k9l0mno/**//**/pqrstuvwxyz/**//**/ABCDEFGHIJK/**//**/LMNOPQRSTUVWXYZ/**//**/dollar$ign/**//**/under_score/**//**/_begin_under_score/**//* operators and separators */++operand;--operand;expression1=expression2;expression1*=expression2;expression1/=expression2;expression1%=expression2;expression1+=expression2;expression1-=expression2;expression1<<=shift_value;expression1>>=shift_value;expression1&=expression2;expression1^=expression2;expression1??'=expression2;expression1|=expression2;expression1??!=expression2;!operand~operand??-operandexpression1+expression2expression1-expression2expression1*expression2expression1/expression2expression1%expression2expression1&expression2expression1|expression2expression1??!expression2expression1^expression2expression1??'expression2expression1>>shift_valueexpression1<<shift_valueexpression1&&expression2expression1||expression2expression1??!|expression2expression1|??!expression2expression1??!??!expression2expression1<expression2expression1>expression2 expression1<=expression2 expression1>=expression2 expression1==expression2 expression1!=expression2expression?expression1:expression2 ++ operand;-- operand;expression1 = expression2;expression1 *= expression2;expression1 /= expression2;expression1 %= expression2;expression1 += expression2;expression1 -= expression2;expression1 <<= shift_value;expression1 >>= shift_value;expression1 &= expression2;expression1 ^= expression2;expression1 ??'= expression2;expression1 |= expression2;expression1 ??!= expression2;! operand~ operand??-operandexpression1 + expression2expression1 - expression2expression1 * expression2expression1 / expression2expression1 % expression2expression1 & expression2expression1 | expression2expression1 ??! expression2expression1 ^ expression2expression1 ??' expression2expression1 >> shift_valueexpression1 << shift_valueexpression1 && expression2expression1 || expression2expression1 ??!| expression2expression1 |??! expression2expression1 ??!??! expression2expression1 < expression2 expression1 > expression2 expression1 <= expression2 expression1 >= expression2 expression1 == expression2 expression1 != expression2 expression ? expression1 : expression2/* separators */( ) [ ??( ] ??) { ??< } ??> ; , . ->// each separator should be its own token()[??(]??){??<}??>;,.->/* Integer Literals */1 2 3 4 99 13700002l 2L 2u 2U 2ul 2Ul 2UL 2uL 2lu 2Lu 2lU 2LU 0x0 0x1 0x2 0xA 0xa 0xf 0xF 0x100 0xdeadbeef 0x4l 0x4L 0x4u 0x4U 0x4ul 0x4Ul 0x4UL 0x4uL 0x4lu 0x4Lu 0x4lU 0x4LU01 02 03 04 0453222 03207l 07L 07u 07U 07ul 07Ul 07UL 07uL 07lu 07Lu 07lU 07LU/* Float Literals */0e0 .0 0. 0.0 0.0e0 0.e0 .0e0 0.0e-0 0.0e881e1 .1 1. 1.1 1.1e1 1.e1 .1e1 1.1e-1 3.141592654 6.022e-221.79769313486231570e+308 4.94065645841246544e-3241.0 0.1 1.1 2. .3 4e10 4.e23 8.3e88 2.1e-3 2E20e0f 0.0e0F 0.0e-0f 1.1e1f 3.141592654f 6.022e-22f 3.40282347e+38f 1.40239846e-45f0e0l 0.0e0L 0.0e-0L 1.1e1L 3.141592654L 6.022e-22L 3.40282347e+38L 1.40239846e-45L/* Errors  *  * Anything after this has some sort of error associated with it. * Since there is no standard definition of what an error is or how * recovery after errors should be done, there is no standard way to  * display errors.  However, if one of the errors gets reported as  * valid that is a problem. */ /* Comment Errors */if??/*This is not a comment*/ifif??//This is not a commentif/* pp errors (no if should be in a pp or comment) */if#notdefined This should be an error /* with a */ comment in the middle of it \      extending to multiple lines. // heck a comment here too.if#netif#something // commentif#frog /* comment */if#bugs// commentif#logs/* comment */ifidentifier #define A pp statement cannot go hereif/* Character Errors *//**/'string'/**//**/'\A'/**//**/'\N'/**//**/'unclosed/**//**/'''unclosed/**//**/'\'closed'/**//**/'\'unclosed/**//**/'\8'/**//**/'\29'/**//**/'\444'/**//**/'\1111'/**//**/'\xFFF'/**//**/'\xGG'/**//**/'\x000'/**//**/'\x111'/**//**/'??a'/**//**/'??"'/**//**/'??}'/**//**/'??/'closed'/**//**/'??/'unclosed/**//**/'??/444'/**//**/'\uFFF'/**//**/'\uFFFFF'/**//**/'\uu'/**//**/'\u0'/**//**/'\uFFFF'/**//**/'\u1234'/**//**/'\u0000'/**//* String Errors *//**/"\A"/**//**/"\N"/**//**/"unclosed/**//**/"\"unclosed/**//**/"\8"/**//**/"\xGG"/**//**/"??/"unclosed/**//**/"??/8"/**//* Identifier Errors *//**/1cannot_start_with_number/**//**/$cannot_start_with_dollar/**//**/weird`character/**//**/weird#character/**//**/weird??=character/**//**/weird@character/**//* Integer Literal Errors *//**/08/**//**/09/**//**/0xg/**//**/0xG/**//* Float Literal Errors *//**/0f/**//**/0F/**//**/1f/**//**/0e/**//**/88.8e/**//**/1.3d/**//**/1.3D/**//* Comment at end intentionally * left open. *//*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -