Update release

This commit is contained in:
Zihan Chen
2020-07-24 16:23:10 -07:00
parent ce20620f55
commit e2137ca2f5
16 changed files with 4297 additions and 1046 deletions
+322 -61
View File
File diff suppressed because it is too large Load Diff
+81 -15
View File
@@ -7,6 +7,11 @@ DEVELOPER: Zihan Chen(vczh)
/***********************************************************************
.\FILESYSTEM.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#if defined VCZH_MSVC
#include <Windows.h>
#include <Shlwapi.h>
@@ -841,6 +846,11 @@ Folder
/***********************************************************************
.\HTTPUTILITY.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#ifdef VCZH_MSVC
#include <winhttp.h>
@@ -855,14 +865,13 @@ namespace vl
HttpRequest
***********************************************************************/
HttpRequest::HttpRequest()
:port(0)
,secure(false)
{
}
bool HttpRequest::SetHost(const WString& inputQuery)
{
if (method == L"")
{
method = L"GET";
}
server = L"";
query = L"";
port = 0;
@@ -940,11 +949,6 @@ HttpRequest
HttpResponse
***********************************************************************/
HttpResponse::HttpResponse()
:statusCode(0)
{
}
WString HttpResponse::GetBodyUtf8()
{
WString response;
@@ -1187,6 +1191,11 @@ Utilities
/***********************************************************************
.\LOCALE.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#if defined VCZH_MSVC
#elif defined VCZH_GCC
#include <ctype.h>
@@ -1851,6 +1860,11 @@ Locale
/***********************************************************************
.\THREADING.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#ifdef VCZH_MSVC
namespace vl
@@ -2842,6 +2856,11 @@ namespace vl
/***********************************************************************
.\THREADINGLINUX.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#ifdef VCZH_GCC
#include <pthread.h>
#include <fcntl.h>
@@ -3759,6 +3778,11 @@ ThreadLocalStorage
/***********************************************************************
.\STREAM\ACCESSOR.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#include <string.h>
namespace vl
@@ -4346,6 +4370,11 @@ DecoderStream
/***********************************************************************
.\STREAM\BROADCASTSTREAM.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -4440,7 +4469,8 @@ BroadcastStream
{
for(vint i=0;i<streams.Count();i++)
{
streams[i]->Write(_buffer, _size);
vint written = streams[i]->Write(_buffer, _size);
CHECK_ERROR(written == _size, L"BroadcastStream::Write(void*, vint)#Failed to copy data to the output stream.");
}
position+=_size;
return _size;
@@ -4456,6 +4486,11 @@ BroadcastStream
/***********************************************************************
.\STREAM\CACHESTREAM.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -4760,6 +4795,11 @@ CacheStream
/***********************************************************************
.\STREAM\CHARFORMAT.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#if defined VCZH_MSVC
#include <windows.h>
#elif defined VCZH_GCC
@@ -5861,6 +5901,11 @@ CharEncoder
/***********************************************************************
.\STREAM\COMPRESSIONSTREAM.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -6301,6 +6346,11 @@ Helper Functions
/***********************************************************************
.\STREAM\FILESTREAM.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#if defined VCZH_GCC
#endif
@@ -6529,6 +6579,11 @@ FileStream
/***********************************************************************
.\STREAM\MEMORYSTREAM.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -6704,6 +6759,11 @@ MemoryStream
/***********************************************************************
.\STREAM\MEMORYWRAPPERSTREAM.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -6850,6 +6910,11 @@ MemoryWrapperStream
/***********************************************************************
.\STREAM\RECORDERSTREAM.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -6901,8 +6966,8 @@ RecorderStream
void RecorderStream::Close()
{
in=0;
out=0;
in = nullptr;
out = nullptr;
}
pos_t RecorderStream::Position()const
@@ -6933,7 +6998,8 @@ RecorderStream
vint RecorderStream::Read(void* _buffer, vint _size)
{
_size = in->Read(_buffer, _size);
out->Write(_buffer, _size);
vint written = out->Write(_buffer, _size);
CHECK_ERROR(written == _size, L"RecorderStream::Read(void*, vint)#Failed to copy data to the output stream.");
return _size;
}
+612 -331
View File
File diff suppressed because it is too large Load Diff
+75
View File
@@ -7,6 +7,11 @@ DEVELOPER: Zihan Chen(vczh)
/***********************************************************************
.\PARSING.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -1082,6 +1087,11 @@ Type Loader
/***********************************************************************
.\PARSINGANALYZER.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -2449,6 +2459,11 @@ ValidateDefinition
/***********************************************************************
.\PARSINGAUTOMATON.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -2753,6 +2768,11 @@ Automaton
/***********************************************************************
.\PARSINGAUTOMATON_CLOSURE.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -2900,6 +2920,11 @@ RemoveEpsilonTransitions
/***********************************************************************
.\PARSINGAUTOMATON_EPDA.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -3080,6 +3105,11 @@ CreateEpsilonPDA
/***********************************************************************
.\PARSINGAUTOMATON_GENERATETABLE.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -3784,6 +3814,11 @@ GenerateTable
/***********************************************************************
.\PARSINGAUTOMATON_JPDA.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -4126,6 +4161,11 @@ MarkLeftRecursiveInJointPDA
/***********************************************************************
.\PARSINGAUTOMATON_MERGESTATES.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -4417,6 +4457,11 @@ MergeStates
/***********************************************************************
.\PARSINGAUTOMATON_NPDA.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -4491,6 +4536,11 @@ CreateNondeterministicPDAFromEpsilonPDA
/***********************************************************************
.\PARSINGDEFINITIONS.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -4989,6 +5039,11 @@ ParsingDefinitionWriter
/***********************************************************************
.\PARSINGDEFINITIONS_CREATEPARSERDEFINITION.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -5720,6 +5775,11 @@ Bootstrap
/***********************************************************************
.\PARSINGLOGGING.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -6779,6 +6839,11 @@ Logger (ParsingTreeNode)
/***********************************************************************
.\PARSINGSTATE.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#if defined(VCZH_GCC) && defined(__clang__)
#pragma clang diagnostic push
@@ -7905,6 +7970,11 @@ ParsingTransitionCollector
/***********************************************************************
.\PARSINGTABLE.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -8452,6 +8522,11 @@ ParsingTable
/***********************************************************************
.\PARSINGTREE.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#if defined(VCZH_GCC) && defined(__clang__)
#pragma clang diagnostic push
+14 -35
View File
@@ -11,11 +11,8 @@ DEVELOPER: Zihan Chen(vczh)
.\PARSINGTREE.H
***********************************************************************/
/***********************************************************************
Vczh Library++ 3.0
Developer: Zihan Chen(vczh)
Parsing::Parsing Tree
Classes:
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#ifndef VCZH_PARSING_PARSINGTREE
@@ -586,11 +583,8 @@ Logging
.\PARSINGDEFINITIONS.H
***********************************************************************/
/***********************************************************************
Vczh Library++ 3.0
Developer: Zihan Chen(vczh)
Parsing::Definitions
Classes:
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#ifndef VCZH_PARSING_PARSINGDEFINITIONS
@@ -1093,11 +1087,8 @@ Bootstrap
.\PARSINGANALYZER.H
***********************************************************************/
/***********************************************************************
Vczh Library++ 3.0
Developer: Zihan Chen(vczh)
Parsing::Analyzing
Classes:
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#ifndef VCZH_PARSING_PARSINGANALYZER
@@ -1271,11 +1262,8 @@ Semantic Analyzer
.\PARSINGTABLE.H
***********************************************************************/
/***********************************************************************
Vczh Library++ 3.0
Developer: Zihan Chen(vczh)
Parsing::Table
Classes:
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#ifndef VCZH_PARSING_PARSINGTABLE
@@ -1861,11 +1849,8 @@ Helper Functions
.\PARSINGAUTOMATON.H
***********************************************************************/
/***********************************************************************
Vczh Library++ 3.0
Developer: Zihan Chen(vczh)
Parsing::Automaton
Classes:
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#ifndef VCZH_PARSING_PARSINGAUTOMATON
@@ -2093,11 +2078,8 @@ Helper: Parsing Table Generating
.\PARSINGSTATE.H
***********************************************************************/
/***********************************************************************
Vczh Library++ 3.0
Developer: Zihan Chen(vczh)
Parsing::State
Classes:
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#ifndef VCZH_PARSING_PARSINGSTATE
@@ -2420,11 +2402,8 @@ AST Generating
.\PARSING.H
***********************************************************************/
/***********************************************************************
Vczh Library++ 3.0
Developer: Zihan Chen(vczh)
Parsing::Parser
Classes:
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#ifndef VCZH_PARSING_PARSING
+25
View File
@@ -7,6 +7,11 @@ DEVELOPER: Zihan Chen(vczh)
/***********************************************************************
.\GUITYPEDESCRIPTOR.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -1153,6 +1158,11 @@ Cpp Helper Functions
/***********************************************************************
.\GUITYPEDESCRIPTORBUILDER.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -2438,6 +2448,11 @@ Function Related
/***********************************************************************
.\GUITYPEDESCRIPTORPREDEFINED.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -2589,6 +2604,11 @@ IValueException
/***********************************************************************
.\GUITYPEDESCRIPTORREFLECTION.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
#include <limits.h>
#include <float.h>
@@ -3443,6 +3463,11 @@ LoadPredefinedTypes
/***********************************************************************
.\GUITYPEDESCRIPTOR_LOG.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
+2110 -159
View File
File diff suppressed because it is too large Load Diff
+52 -4
View File
@@ -7,6 +7,11 @@ DEVELOPER: Zihan Chen(vczh)
/***********************************************************************
.\REGEX.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -177,8 +182,6 @@ Regex
}
Regex::Regex(const WString& code, bool preferPure)
:pure(0)
,rich(0)
{
CharRange::List subsets;
RegexExpression::Ref regex=ParseRegexExpression(code);
@@ -770,7 +773,6 @@ RegexLexerColorizer
if ((internalState.interTokenState = token.interTokenState))
{
internalState.interTokenId = token.token;
internalState.currentState = walker.GetStartState();
}
if (colorize)
{
@@ -814,7 +816,9 @@ RegexLexerColorizer
vint lastFinalStateLength = 0;
vint lastFinalStateToken = -1;
vint lastFinalStateState = -1;
vint tokenStartState = internalState.currentState;
for (vint i = start; i < length; i++)
{
vint currentToken = -1;
@@ -824,27 +828,35 @@ RegexLexerColorizer
if (previousTokenStop)
{
internalState.currentState = walker.GetStartState();
if (proc.extendProc && lastFinalStateToken != -1)
{
RegexProcessingToken token(start, lastFinalStateLength, lastFinalStateToken, true, nullptr);
CallExtendProcAndColorizeProc(input, length, token, colorize);
if (token.completeToken)
{
internalState.currentState = walker.GetStartState();
}
return start + token.length;
}
else if (i == start)
{
if (tokenStartState == GetStartState())
{
if (colorize)
{
proc.colorizeProc(proc.argument, start, 1, -1);
}
internalState.currentState = walker.GetStartState();
return i + 1;
}
}
else
{
if (colorize)
{
proc.colorizeProc(proc.argument, start, lastFinalStateLength, lastFinalStateToken);
}
internalState.currentState = lastFinalStateState;
return start + lastFinalStateLength;
}
}
@@ -853,6 +865,7 @@ RegexLexerColorizer
{
lastFinalStateLength = i + 1 - start;
lastFinalStateToken = currentToken;
lastFinalStateState = internalState.currentState;
}
}
@@ -1009,6 +1022,11 @@ RegexLexer
/***********************************************************************
.\REGEXAUTOMATON.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -1370,6 +1388,11 @@ Helpers
/***********************************************************************
.\REGEXDATA.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -1458,6 +1481,11 @@ CharRange
/***********************************************************************
.\REGEXEXPRESSION.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -2392,6 +2420,11 @@ Expression::Apply
/***********************************************************************
.\REGEXPARSER.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -3090,6 +3123,11 @@ Helper Functions
/***********************************************************************
.\REGEXPURE.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -3322,6 +3360,11 @@ PureInterpretor
/***********************************************************************
.\REGEXRICH.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
@@ -3782,6 +3825,11 @@ RichInterpretor
/***********************************************************************
.\REGEXWRITER.CPP
***********************************************************************/
/***********************************************************************
Author: Zihan Chen (vczh)
Licensed under https://github.com/vczh-libraries/License
***********************************************************************/
namespace vl
{
+731 -166
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+4 -4
View File
@@ -1,4 +1,4 @@
function Start-Process-And-Wait([String[][]] $Pairs, [Boolean]$Inline = $false, [String]$workingDirectory = "") {
function Start-Process-And-Wait([String[][]] $Pairs, [Boolean]$Inline = $false, [String]$WorkingDirectory = "", [Boolean]$ThrowOnCrash = $true) {
$processes = New-Object System.Diagnostics.Process[] $Pairs.Length
for ($i = 0; $i -lt $Pairs.Length; $i++) {
Write-Host " Running: $($Pairs[$i][0]) $($Pairs[$i][1])" -ForegroundColor DarkGray
@@ -9,8 +9,8 @@ function Start-Process-And-Wait([String[][]] $Pairs, [Boolean]$Inline = $false,
}
$arguments.Add("PassThru", $true)
$arguments.Add("NoNewWindow", $Inline)
if ($workingDirectory -ne "") {
$arguments.Add("WorkingDirectory", $workingDirectory)
if ($WorkingDirectory -ne "") {
$arguments.Add("WorkingDirectory", $WorkingDirectory)
}
$processes[$i] = Start-Process $Pairs[$i][0] @arguments
@@ -21,7 +21,7 @@ function Start-Process-And-Wait([String[][]] $Pairs, [Boolean]$Inline = $false,
$process = $processes[$i]
$process_handle = $process.Handle
$process.WaitForExit()
if ($process.ExitCode -ne 0) {
if (($process.ExitCode -ne 0) -and $ThrowOnCrash) {
Write-Host " Crashes($($process.ExitCode)): $($Pairs[$i][0]) $($Pairs[$i][1])" -ForegroundColor Red
$failed = $true
}
Binary file not shown.
Binary file not shown.