Lines Matching defs:pStrmInput

153     PSCMSTREAM      pStrmInput;
1061 static RTEXITCODE vbcppOutputComment(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offStart, size_t cchOutputted,
1064 size_t offCur = ScmStreamTell(pStrmInput);
1067 int rc = ScmStreamSeekAbsolute(pStrmInput, offStart);
1073 size_t cchIndent = offStart - ScmStreamTellOffsetOfLine(pStrmInput, ScmStreamTellLine(pStrmInput));
1084 while (ScmStreamTell(pStrmInput) < offCur)
1086 unsigned ch = ScmStreamGetCh(pStrmInput);
1118 * @param pStrmInput The input stream.
1120 static void vbcppProcessSkipWhiteAndEscapedEol(PSCMSTREAM pStrmInput)
1124 while ((ch = ScmStreamPeekCh(pStrmInput)) != ~(unsigned)0)
1131 ScmStreamSeekByLine(pStrmInput, ScmStreamTellLine(pStrmInput) + 1);
1136 ch = ScmStreamGetCh(pStrmInput);
1149 * @param pStrmInput The input stream.
1151 static RTEXITCODE vbcppProcessSkipWhiteEscapedEolAndComments(PVBCPP pThis, PSCMSTREAM pStrmInput)
1155 while ((ch = ScmStreamPeekCh(pStrmInput)) != ~(unsigned)0)
1163 size_t offSaved = ScmStreamTell(pStrmInput);
1164 ScmStreamGetCh(pStrmInput);
1165 if (ScmStreamPeekCh(pStrmInput) != '*')
1167 ScmStreamSeekAbsolute(pStrmInput, offSaved);
1172 while ((ch = ScmStreamGetCh(pStrmInput)) != ~(unsigned)0)
1176 ch = ScmStreamGetCh(pStrmInput);
1194 ScmStreamSeekByLine(pStrmInput, ScmStreamTellLine(pStrmInput) + 1);
1200 ch = ScmStreamGetCh(pStrmInput);
1213 * @param pStrmInput The input stream.
1215 static RTEXITCODE vbcppProcessSkipWhiteEscapedEolAndCommentsCheckEol(PVBCPP pThis, PSCMSTREAM pStrmInput)
1217 RTEXITCODE rcExit = vbcppProcessSkipWhiteEscapedEolAndComments(pThis, pStrmInput);
1220 unsigned ch = ScmStreamPeekCh(pStrmInput);
1234 * @param pStrmInput The input stream.
1236 static size_t vbcppProcessSkipWhite(PSCMSTREAM pStrmInput)
1239 while ((ch = ScmStreamPeekCh(pStrmInput)) != ~(unsigned)0)
1243 unsigned chCheck = ScmStreamGetCh(pStrmInput);
1246 return ScmStreamTell(pStrmInput);
1260 * @param pStrmInput The input stream.
1262 static bool vbcppInputLookForLeftParenthesis(PVBCPP pThis, PSCMSTREAM pStrmInput)
1264 size_t offSaved = ScmStreamTell(pStrmInput);
1265 RTEXITCODE rcExit = vbcppProcessSkipWhiteEscapedEolAndComments(pThis, pStrmInput);
1266 unsigned ch = ScmStreamPeekCh(pStrmInput);
1270 int rc = ScmStreamSeekAbsolute(pStrmInput, offSaved);
1284 * @param pStrmInput The input stream.
1288 static RTEXITCODE vbcppInputSkipToEndOfDirectiveLine(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t *poffComment)
1297 while ((ch = ScmStreamPeekCh(pStrmInput)) != ~(unsigned)0)
1303 ScmStreamSeekByLine(pStrmInput, ScmStreamTellLine(pStrmInput) + 1);
1316 *poffComment = ScmStreamTell(pStrmInput) - 1;
1321 *poffComment = ScmStreamTell(pStrmInput) - 1;
1322 rcExit = vbcppProcessSkipWhiteEscapedEolAndComments(pThis, pStrmInput);
1331 ch = ScmStreamGetCh(pStrmInput); Assert(ch == chPrev);
1345 * @param pStrmInput The input stream.
1347 static RTEXITCODE vbcppProcessMultiLineComment(PVBCPP pThis, PSCMSTREAM pStrmInput)
1350 ScmStreamGetCh(pStrmInput); /* '*' */
1359 && (ch = ScmStreamGetCh(pStrmInput)) != ~(unsigned)0 )
1364 unsigned ch2 = ScmStreamPeekCh(pStrmInput);
1367 ScmStreamGetCh(pStrmInput);
1404 * @param pStrmInput The input stream.
1406 static RTEXITCODE vbcppProcessOneLineComment(PVBCPP pThis, PSCMSTREAM pStrmInput)
1411 const char *pszLine = ScmStreamGetLine(pStrmInput, &cchLine, &enmEol); Assert(pszLine);
1428 pszLine = ScmStreamGetLine(pStrmInput, &cchLine, &enmEol);
1445 * @param pStrmInput The input stream.
1447 static RTEXITCODE vbcppProcessStringLitteral(PVBCPP pThis, PSCMSTREAM pStrmInput)
1455 unsigned ch = ScmStreamGetCh(pStrmInput);
1482 * @param pStrmInput The input stream.
1484 static RTEXITCODE vbcppProcessCharacterConstant(PVBCPP pThis, PSCMSTREAM pStrmInput)
1492 unsigned ch = ScmStreamGetCh(pStrmInput);
1519 * @param pStrmInput The input stream.
1522 static RTEXITCODE vbcppProcessNumber(PVBCPP pThis, PSCMSTREAM pStrmInput, char chFirst)
1528 && (ch = ScmStreamPeekCh(pStrmInput)) != ~(unsigned)0)
1534 unsigned ch2 = ScmStreamGetCh(pStrmInput);
1548 * @param pStrmInput The input stream.
1551 static RTEXITCODE vbcppProcessIdentifier(PVBCPP pThis, PSCMSTREAM pStrmInput, char ch)
1555 const char *pchDefine = ScmStreamCGetWordM1(pStrmInput, &cchDefine);
1564 || vbcppInputLookForLeftParenthesis(pThis, pStrmInput)) )
1573 ExpCtx.pStrmInput = pStrmInput;
1592 unsigned chAfter = ScmStreamPeekCh(pStrmInput);
1755 return pExp->pStrmInput ? ScmStreamPeekCh(pExp->pStrmInput) : ~(unsigned)0;
1764 return pExp->pStrmInput ? ScmStreamGetCh(pExp->pStrmInput) : ~(unsigned)0;
1777 ch2 = ScmStreamGetCh(pExp->pStrmInput);
2292 PSCMSTREAM pStrmInput = pExp->pStrmInput;
2293 size_t offSaved = ScmStreamTell(pStrmInput);
2294 RTEXITCODE rcExit = vbcppProcessSkipWhiteEscapedEolAndComments(pThis, pStrmInput);
2295 unsigned ch = ScmStreamPeekCh(pStrmInput);
2302 int rc = ScmStreamSeekAbsolute(pStrmInput, offSaved);
2321 Assert(!pExp->pStrmInput); /* offset usage below. */
2968 * @param pStrmInput The input stream.
2972 static RTEXITCODE vbcppDirectiveDefine(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offStart)
2977 RTEXITCODE rcExit = vbcppProcessSkipWhiteEscapedEolAndComments(pThis, pStrmInput);
2981 const char *pchDefine = ScmStreamCGetWord(pStrmInput, &cchDefine);
2987 unsigned ch = ScmStreamPeekCh(pStrmInput);
2990 ScmStreamGetCh(pStrmInput);
2991 pchParams = ScmStreamGetCur(pStrmInput);
2994 while ((ch = ScmStreamPeekCh(pStrmInput)) != ~(unsigned)0)
3003 ScmStreamSeekByLine(pStrmInput, ScmStreamTellLine(pStrmInput) + 1);
3007 cchParams = ScmStreamGetCur(pStrmInput) - pchParams;
3008 ScmStreamGetCh(pStrmInput);
3011 ScmStreamGetCh(pStrmInput);
3020 rcExit = vbcppProcessSkipWhiteEscapedEolAndComments(pThis, pStrmInput);
3023 size_t offValue = ScmStreamTell(pStrmInput);
3024 const char *pchValue = ScmStreamGetCur(pStrmInput);
3026 while ((ch = ScmStreamPeekCh(pStrmInput)) != ~(unsigned)0)
3032 ScmStreamSeekByLine(pStrmInput, ScmStreamTellLine(pStrmInput) + 1);
3034 chPrev = ScmStreamGetCh(pStrmInput);
3036 size_t cchValue = ScmStreamGetCur(pStrmInput) - pchValue;
3061 vbcppOutputComment(pThis, pStrmInput, offValue, cch, 1);
3082 * @param pStrmInput The input stream.
3086 static RTEXITCODE vbcppDirectiveUndef(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offStart)
3091 RTEXITCODE rcExit = vbcppProcessSkipWhiteEscapedEolAndComments(pThis, pStrmInput);
3095 const char *pchDefine = ScmStreamCGetWord(pStrmInput, &cchDefine);
3098 size_t offMaybeComment = vbcppProcessSkipWhite(pStrmInput);
3099 rcExit = vbcppProcessSkipWhiteEscapedEolAndCommentsCheckEol(pThis, pStrmInput);
3125 vbcppOutputComment(pThis, pStrmInput, offMaybeComment, cch, 1);
3176 * @param pStrmInput The current input stream.
3184 static RTEXITCODE vbcppCondPush(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offStart,
4269 static RTEXITCODE vbcppExtractSkipCommentLine(PVBCPP pThis, PSCMSTREAM pStrmInput)
4271 unsigned chPrev = ScmStreamGetCh(pStrmInput); Assert(chPrev == '/');
4273 while ((ch = ScmStreamPeekCh(pStrmInput)) != ~(unsigned)0)
4279 ScmStreamSeekByLine(pStrmInput, ScmStreamTellLine(pStrmInput) + 1);
4284 chPrev = ScmStreamGetCh(pStrmInput);
4292 static RTEXITCODE vbcppExtractSkipComment(PVBCPP pThis, PSCMSTREAM pStrmInput)
4294 unsigned ch = ScmStreamGetCh(pStrmInput); Assert(ch == '*');
4295 while ((ch = ScmStreamGetCh(pStrmInput)) != ~(unsigned)0)
4299 ch = ScmStreamGetCh(pStrmInput);
4308 static RTEXITCODE vbcppExtractQuotedString(PVBCPP pThis, PSCMSTREAM pStrmInput, PVBCPPSTRBUF pStrBuf,
4311 unsigned ch = ScmStreamGetCh(pStrmInput);
4320 ch = ScmStreamGetCh(pStrmInput);
4323 ch = ScmStreamGetCh(pStrmInput);
4354 * @param pStrmInput The input stream.
4361 static RTEXITCODE vbcppExtractDirectiveLine(PVBCPP pThis, PSCMSTREAM pStrmInput, PVBCPPSTRBUF pStrBuf, size_t *poffComment)
4365 while ((ch = ScmStreamPeekCh(pStrmInput)) != ~(unsigned)0)
4371 unsigned ch2 = ScmStreamGetCh(pStrmInput); Assert(ch == ch2);
4372 ch = ScmStreamPeekCh(pStrmInput);
4375 offComment = ScmStreamTell(pStrmInput) - 1;
4376 rcExit = vbcppExtractSkipComment(pThis, pStrmInput);
4380 offComment = ScmStreamTell(pStrmInput) - 1;
4381 rcExit = vbcppExtractSkipCommentLine(pThis, pStrmInput);
4389 rcExit = vbcppExtractQuotedString(pThis, pStrmInput, pStrBuf, '\'', '\'');
4394 rcExit = vbcppExtractQuotedString(pThis, pStrmInput, pStrBuf, '"', '"');
4402 unsigned ch2 = ScmStreamGetCh(pStrmInput);
4408 unsigned ch2 = ScmStreamGetCh(pStrmInput); Assert(ch == ch2);
4412 && ( (ch2 = ScmStreamPeekCh(pStrmInput)) == '\r'
4415 ScmStreamSeekByLine(pStrmInput, ScmStreamTellLine(pStrmInput) + 1);
4439 * @param pStrmInput The input stream.
4444 static RTEXITCODE vbcppDirectiveIfOrElif(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offStart,
4457 const char *pchCondition = ScmStreamGetCur(pStrmInput);
4463 ExpCtx.pStrmInput = NULL;
4468 RTEXITCODE rcExit = vbcppExtractDirectiveLine(pThis, pStrmInput, &ExpCtx.StrBuf, &offComment);
4471 size_t const cchCondition = ScmStreamGetCur(pStrmInput) - pchCondition;
4506 rcExit = vbcppCondPush(pThis, pStrmInput, offComment, enmKind, enmResult,
4540 rcExit = vbcppOutputComment(pThis, pStrmInput, offStart, cch, 2);
4563 * @param pStrmInput The input stream.
4567 static RTEXITCODE vbcppDirectiveIfDef(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offStart)
4572 RTEXITCODE rcExit = vbcppProcessSkipWhiteEscapedEolAndComments(pThis, pStrmInput);
4576 const char *pchDefine = ScmStreamCGetWord(pStrmInput, &cchDefine);
4579 rcExit = vbcppProcessSkipWhiteEscapedEolAndCommentsCheckEol(pThis, pStrmInput);
4593 rcExit = vbcppCondPush(pThis, pStrmInput, offStart, kVBCppCondKind_IfDef, enmEval,
4609 * @param pStrmInput The input stream.
4613 static RTEXITCODE vbcppDirectiveIfNDef(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offStart)
4618 RTEXITCODE rcExit = vbcppProcessSkipWhiteEscapedEolAndComments(pThis, pStrmInput);
4622 const char *pchDefine = ScmStreamCGetWord(pStrmInput, &cchDefine);
4625 rcExit = vbcppProcessSkipWhiteEscapedEolAndCommentsCheckEol(pThis, pStrmInput);
4639 rcExit = vbcppCondPush(pThis, pStrmInput, offStart, kVBCppCondKind_IfNDef, enmEval,
4655 * @param pStrmInput The input stream.
4659 static RTEXITCODE vbcppDirectiveElse(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offStart)
4664 offStart = vbcppProcessSkipWhite(pStrmInput);
4665 RTEXITCODE rcExit = vbcppProcessSkipWhiteEscapedEolAndCommentsCheckEol(pThis, pStrmInput);
4698 rcExit = vbcppOutputComment(pThis, pStrmInput, offStart, cch, 2);
4720 * @param pStrmInput The input stream.
4724 static RTEXITCODE vbcppDirectiveEndif(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offStart)
4729 offStart = vbcppProcessSkipWhite(pStrmInput);
4730 RTEXITCODE rcExit = vbcppProcessSkipWhiteEscapedEolAndCommentsCheckEol(pThis, pStrmInput);
4750 rcExit = vbcppOutputComment(pThis, pStrmInput, offStart, cch, 1);
4811 * @param pStrmInput The input stream.
4815 static RTEXITCODE vbcppDirectiveInclude(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offStart)
4820 RTEXITCODE rcExit = vbcppProcessSkipWhiteEscapedEolAndComments(pThis, pStrmInput);
4828 unsigned ch = ScmStreamPeekCh(pStrmInput);
4832 ScmStreamGetCh(pStrmInput);
4833 pchFileSpec = pchFilename = ScmStreamGetCur(pStrmInput);
4836 while ( (ch = ScmStreamGetCh(pStrmInput)) != ~(unsigned)0
4849 cchFileSpec = cchFilename = ScmStreamGetCur(pStrmInput) - pchFilename - 1;
4856 //pchFileSpec = ScmStreamCGetWord(pStrmInput, &cchFileSpec);
4867 size_t const offIncEnd = vbcppProcessSkipWhite(pStrmInput);
4869 rcExit = vbcppProcessSkipWhiteEscapedEolAndCommentsCheckEol(pThis, pStrmInput);
4897 rcExit = vbcppOutputComment(pThis, pStrmInput, offIncEnd, cch, 1);
4918 * @param pStrmInput The input stream.
4922 static RTEXITCODE vbcppDirectivePragma(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offStart)
4927 RTEXITCODE rcExit = vbcppProcessSkipWhiteEscapedEolAndComments(pThis, pStrmInput);
4931 const char *pchPragma = ScmStreamCGetWord(pStrmInput, &cchPragma);
4934 size_t const off2nd = vbcppProcessSkipWhite(pStrmInput);
4936 rcExit = vbcppInputSkipToEndOfDirectiveLine(pThis, pStrmInput, &offComment);
4957 rcExit = vbcppOutputComment(pThis, pStrmInput, off2nd, cch, 1);
4978 * @param pStrmInput The input stream.
4982 static RTEXITCODE vbcppDirectiveError(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offStart)
4993 * @param pStrmInput The input stream.
4997 static RTEXITCODE vbcppDirectiveLineNo(PVBCPP pThis, PSCMSTREAM pStrmInput, size_t offStart)
5008 * @param pStrmInput The input stream.
5010 static RTEXITCODE vbcppDirectiveLineNoShort(PVBCPP pThis, PSCMSTREAM pStrmInput)
5021 * @param pStrmInput The input stream.
5023 static RTEXITCODE vbcppProcessDirective(PVBCPP pThis, PSCMSTREAM pStrmInput)
5028 RTEXITCODE rcExit = vbcppProcessSkipWhiteEscapedEolAndComments(pThis, pStrmInput);
5032 const char *pchDirective = ScmStreamCGetWord(pStrmInput, &cchDirective);
5035 size_t const offStart = ScmStreamTell(pStrmInput);
5038 rcExit = vbcppDirectiveIfOrElif(pThis, pStrmInput, offStart, kVBCppCondKind_If);
5040 rcExit = vbcppDirectiveIfOrElif(pThis, pStrmInput, offStart, kVBCppCondKind_ElIf);
5042 rcExit = vbcppDirectiveIfDef(pThis, pStrmInput, offStart);
5044 rcExit = vbcppDirectiveIfNDef(pThis, pStrmInput, offStart);
5046 rcExit = vbcppDirectiveElse(pThis, pStrmInput, offStart);
5048 rcExit = vbcppDirectiveEndif(pThis, pStrmInput, offStart);
5052 rcExit = vbcppDirectiveInclude(pThis, pStrmInput, offStart);
5054 rcExit = vbcppDirectiveDefine(pThis, pStrmInput, offStart);
5056 rcExit = vbcppDirectiveUndef(pThis, pStrmInput, offStart);
5058 rcExit = vbcppDirectivePragma(pThis, pStrmInput, offStart);
5060 rcExit = vbcppDirectiveError(pThis, pStrmInput, offStart);
5062 rcExit = vbcppDirectiveLineNo(pThis, pStrmInput, offStart);
5071 unsigned ch = ScmStreamPeekCh(pStrmInput);
5073 rcExit = vbcppDirectiveLineNoShort(pThis, pStrmInput);
5111 PSCMSTREAM pStrmInput = &pThis->pInputStack->StrmInput;
5113 while ((ch = ScmStreamGetCh(pStrmInput)) != ~(unsigned)0)
5117 ch = ScmStreamPeekCh(pStrmInput);
5119 rcExit = vbcppProcessMultiLineComment(pThis, pStrmInput);
5121 rcExit = vbcppProcessOneLineComment(pThis, pStrmInput);
5131 rcExit = vbcppProcessDirective(pThis, pStrmInput);
5132 pStrmInput = &pThis->pInputStack->StrmInput;
5155 rcExit = vbcppProcessStringLitteral(pThis, pStrmInput);
5157 rcExit = vbcppProcessCharacterConstant(pThis, pStrmInput);
5159 rcExit = vbcppProcessIdentifier(pThis, pStrmInput, ch);
5161 rcExit = vbcppProcessNumber(pThis, pStrmInput, ch);