Recovered from cvs revision 2007-09-07 03:08:00

This commit is contained in:
2007-09-07 23:14:00 +00:00
parent 495d085cba
commit f212242f01
43 changed files with 836 additions and 92 deletions

View File

@ -0,0 +1,102 @@
# Microsoft Developer Studio Project File - Name="asetestawk++" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=asetestawk++ - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "asetestawk++.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "asetestawk++.mak" CFG="asetestawk++ - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "asetestawk++ - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "asetestawk++ - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "asetestawk++ - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../../release/bin"
# PROP Intermediate_Dir "release/cpp"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 asecmn.lib aseawk.lib aseawk++.lib aseutl.lib user32.lib kernel32.lib /nologo /subsystem:console /machine:I386 /out:"../../release/bin/aseawk++.exe" /libpath:"../../release/lib"
!ELSEIF "$(CFG)" == "asetestawk++ - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../../debug/bin"
# PROP Intermediate_Dir "debug/cpp"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 asecmn.lib aseawk.lib aseawk++.lib aseutl.lib user32.lib kernel32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../debug/bin/aseawk++.exe" /pdbtype:sept /libpath:"../../debug/lib"
!ENDIF
# Begin Target
# Name "asetestawk++ - Win32 Release"
# Name "asetestawk++ - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\Awk.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@ -36,7 +36,7 @@ BEGIN {
for (pc = 0; pc >= 0; ) {
addr = mem[pc] % 1000;
code = int(mem[pc++] / 1000);
if (code == op["get"]) { getline acc; }
if (code == op["get"]) { if (getline acc <= 0) acc = 0; }
else if (code == op["put"]) { print acc; }
else if (code == op["st"]) { mem[addr] = acc; }
else if (code == op["ld"]) { acc = mem[addr]; }

View File

@ -5,4 +5,4 @@ BEGIN {
abc = 10;
}
RUN ERROR: CODE [94] LINE [5] map 'abc' not assignable with a scalar
RUN ERROR: CODE [95] LINE [5] map 'abc' not assignable with a scalar

View File

@ -2,4 +2,4 @@ BEGIN {
delete ARGC;
}
RUN ERROR: CODE [86] LINE [2] variable 'ARGC' not deletable
RUN ERROR: CODE [87] LINE [2] variable 'ARGC' not deletable

View File

@ -3,4 +3,4 @@ BEGIN {
delete iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiix;
}
RUN ERROR: CODE [86] LINE [3] variable 'iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii...' not deletable
RUN ERROR: CODE [87] LINE [3] variable 'iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii...' not deletable

View File

@ -2,4 +2,4 @@ BEGIN {
helpxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxhelphelp ();
}
RUN ERROR: CODE [84] LINE [2] function 'helpxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxhel...' not found
RUN ERROR: CODE [85] LINE [2] function 'helpxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxhel...' not found

View File

@ -1 +1 @@
PARSE ERROR: CODE [55] LINE [2] built-in function 'substr' redefined
PARSE ERROR: CODE [56] LINE [2] built-in function 'substr' redefined

View File

@ -1 +1 @@
PARSE ERROR: CODE [55] LINE [3] built-in function 'substr' redefined
PARSE ERROR: CODE [56] LINE [3] built-in function 'substr' redefined

View File

@ -1 +1 @@
PARSE ERROR: CODE [56] LINE [9] function 'abc' redefined
PARSE ERROR: CODE [57] LINE [9] function 'abc' redefined

View File

@ -1 +1 @@
PARSE ERROR: CODE [57] LINE [4] global variable 'abc' redefined
PARSE ERROR: CODE [58] LINE [4] global variable 'abc' redefined

View File

@ -1 +1 @@
PARSE ERROR: CODE [58] LINE [4] parameter 'x' redefined
PARSE ERROR: CODE [59] LINE [4] parameter 'x' redefined

View File

@ -1 +1 @@
PARSE ERROR: CODE [56] LINE [11] function 'abc' redefined
PARSE ERROR: CODE [57] LINE [11] function 'abc' redefined

View File

@ -1 +1 @@
PARSE ERROR: CODE [56] LINE [1] function 'abc' redefined
PARSE ERROR: CODE [57] LINE [1] function 'abc' redefined

View File

@ -1 +1 @@
PARSE ERROR: CODE [42] LINE [5] a colon expected in place of ';'
PARSE ERROR: CODE [43] LINE [5] a colon expected in place of ';'

View File

@ -1 +1 @@
PARSE ERROR: CODE [37] LINE [2] a left parenthesis expected in place of '='
PARSE ERROR: CODE [38] LINE [2] a left parenthesis expected in place of '='

View File

@ -1 +1 @@
PARSE ERROR: CODE [51] LINE [2] BEGIN not followed by a left bracket on the same line
PARSE ERROR: CODE [52] LINE [2] BEGIN not followed by a left bracket on the same line

View File

@ -1 +1 @@
PARSE ERROR: CODE [62] LINE [1] '+' not a valid parameter name
PARSE ERROR: CODE [63] LINE [1] '+' not a valid parameter name

View File

@ -1 +1 @@
PARSE ERROR: CODE [63] LINE [1] '+' not a valid variable name
PARSE ERROR: CODE [64] LINE [1] '+' not a valid variable name

View File

@ -1 +1 @@
PARSE ERROR: CODE [63] LINE [3] '+' not a valid variable name
PARSE ERROR: CODE [64] LINE [3] '+' not a valid variable name

View File

@ -2,4 +2,4 @@ BEGIN {
print abc > "123\0abc";
}
RUN ERROR: CODE [109] LINE [2] i/o name containing a null character
RUN ERROR: CODE [110] LINE [2] i/o name containing a null character

View File

@ -3,4 +3,4 @@ BEGIN {
split ("a b c",xx);
}
RUN ERROR: CODE [95] LINE [3] cannot change a scalar value to a map
RUN ERROR: CODE [96] LINE [3] cannot change a scalar value to a map

View File

@ -1,5 +1,5 @@
/*
* $Id: Awk.cs,v 1.1 2007/09/03 03:50:39 bacon Exp $
* $Id: Awk.cs,v 1.2 2007/09/06 09:37:42 bacon Exp $
*/
using System;
@ -142,10 +142,10 @@ namespace ase.com
set { awk.SupportBlockless = value; }
}
public bool StringBaseOne
public bool BaseOne
{
get { return awk.StringBaseOne; }
set { awk.StringBaseOne = value; }
get { return awk.BaseOne; }
set { awk.BaseOne = value; }
}
public bool StripSpaces

123
ase/test/com/AwkForm.resx Normal file
View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -0,0 +1,33 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ase.com")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ase.com")]
[assembly: AssemblyCopyright("© 2007 Hyung-Hwan Chung, All rights reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("7cd62543-7cf6-4b69-90b9-be0becdbfa19")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ase.com.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ase.com.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ase.test.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@ -0,0 +1,86 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{F14B75D8-3ED7-4621-B5B9-E96A80B5D809}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ase.com</RootNamespace>
<AssemblyName>ase.com</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Debug\bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Release\bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Interop.ASECOM, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\cnt\obj\Debug\Interop.ASECOM.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Awk.cs" />
<Compile Include="AwkForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="AwkForm.Designer.cs">
<DependentUpon>AwkForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="AwkForm.resx">
<SubType>Designer</SubType>
<DependentUpon>AwkForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="StdAwk.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -12,6 +12,17 @@ namespace ase.net
System.Windows.Forms.TextBox consoleInput;
System.Windows.Forms.TextBox consoleOutput;
System.ComponentModel.ISynchronizeInvoke si;
public Awk(System.ComponentModel.ISynchronizeInvoke si)
{
this.si = si;
SetSourceOutputHandlers += SetSourceOutput;
SetConsoleOutputHandlers += SetConsoleOutput;
AddFunction("sleep", 1, 1, Sleep);
}
public bool Parse(
System.Windows.Forms.TextBox sourceInput,
System.Windows.Forms.TextBox sourceOutput)
@ -31,6 +42,13 @@ namespace ase.net
return base.Run(main, args);
}
protected bool Sleep(string name, Argument[] args, Return ret)
{
System.Threading.Thread.Sleep((int)(args[0].LongValue*1000));
ret.LongValue = 0;
return true;
}
protected override int OpenSource(ASE.Net.StdAwk.Source source)
{
//System.IO.FileMode mode;
@ -63,6 +81,22 @@ namespace ase.net
return -1;
}
public delegate void SetSourceOutputHandler(string text);
public delegate void SetConsoleOutputHandler(string text);
public event SetSourceOutputHandler SetSourceOutputHandlers;
public event SetConsoleOutputHandler SetConsoleOutputHandlers;
private void SetSourceOutput(string text)
{
sourceOutput.Text = text;
}
private void SetConsoleOutput(string text)
{
consoleOutput.Text = text;
}
protected override int CloseSource(ASE.Net.StdAwk.Source source)
{
if (source.Mode.Equals(ASE.Net.StdAwk.Source.MODE.READ))
@ -75,9 +109,16 @@ namespace ase.net
{
System.IO.StreamWriter sw = (System.IO.StreamWriter)source.Handle;
sw.Flush();
System.IO.MemoryStream ms = (System.IO.MemoryStream)sw.BaseStream;
sourceOutput.Text = UnicodeEncoding.UTF8.GetString(ms.GetBuffer());
sw.Close();
// MSDN: This method(GetBuffer) works when the memory stream is closed.
//sourceOutput.Text = UnicodeEncoding.UTF8.GetString(ms.GetBuffer());
if (si != null && si.InvokeRequired)
si.Invoke(SetSourceOutputHandlers, new object[] { UnicodeEncoding.UTF8.GetString(ms.GetBuffer()) });
else SetSourceOutput (UnicodeEncoding.UTF8.GetString(ms.GetBuffer()));
return 0;
}
@ -130,9 +171,16 @@ namespace ase.net
{
System.IO.StreamWriter sw = (System.IO.StreamWriter)console.Handle;
sw.Flush();
System.IO.MemoryStream ms = (System.IO.MemoryStream)sw.BaseStream;
consoleOutput.Text = UnicodeEncoding.UTF8.GetString(ms.GetBuffer());
sw.Close();
// MSDN: This method(GetBuffer) works when the memory stream is closed.
//consoleOutput.Text = UnicodeEncoding.UTF8.GetString(ms.GetBuffer());
if (si != null && si.InvokeRequired)
si.Invoke(SetConsoleOutputHandlers, new object[] { UnicodeEncoding.UTF8.GetString(ms.GetBuffer()) });
else SetConsoleOutput(UnicodeEncoding.UTF8.GetString(ms.GetBuffer()));
return 0;
}
@ -141,7 +189,7 @@ namespace ase.net
protected override int ReadConsole(ASE.Net.StdAwk.Console console, char[] buf, int len)
{
System.IO.StreamReader sr = (System.IO.StreamReader)console.Handle;
System.IO.StreamReader sr = (System.IO.StreamReader)console.Handle;
return sr.Read(buf, 0, len);
}
@ -149,6 +197,7 @@ namespace ase.net
{
System.IO.StreamWriter sw = (System.IO.StreamWriter)console.Handle;
sw.Write(buf, 0, len);
sw.Flush();
return len;
}

View File

@ -47,12 +47,12 @@ namespace ase.net
this.panel2 = new System.Windows.Forms.Panel();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.chkStripSpaces = new System.Windows.Forms.CheckBox();
this.chkPassArgumentsToEntryPoint = new System.Windows.Forms.CheckBox();
this.btnClearAllArguments = new System.Windows.Forms.Button();
this.btnAddArgument = new System.Windows.Forms.Button();
this.tbxArgument = new System.Windows.Forms.TextBox();
this.lbxArguments = new System.Windows.Forms.ListBox();
this.chkStripSpaces = new System.Windows.Forms.CheckBox();
this.tableLayoutPanel1.SuspendLayout();
this.panel1.SuspendLayout();
this.panel3.SuspendLayout();
@ -281,6 +281,18 @@ namespace ase.net
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Arguments";
//
// chkStripSpaces
//
this.chkStripSpaces.AutoSize = true;
this.chkStripSpaces.Checked = true;
this.chkStripSpaces.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkStripSpaces.Location = new System.Drawing.Point(19, 234);
this.chkStripSpaces.Name = "chkStripSpaces";
this.chkStripSpaces.Size = new System.Drawing.Size(86, 17);
this.chkStripSpaces.TabIndex = 5;
this.chkStripSpaces.Text = "Strip Spaces";
this.chkStripSpaces.UseVisualStyleBackColor = true;
//
// chkPassArgumentsToEntryPoint
//
this.chkPassArgumentsToEntryPoint.AutoSize = true;
@ -328,18 +340,6 @@ namespace ase.net
this.lbxArguments.Size = new System.Drawing.Size(147, 134);
this.lbxArguments.TabIndex = 0;
//
// chkStripSpaces
//
this.chkStripSpaces.AutoSize = true;
this.chkStripSpaces.Checked = true;
this.chkStripSpaces.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkStripSpaces.Location = new System.Drawing.Point(19, 234);
this.chkStripSpaces.Name = "chkStripSpaces";
this.chkStripSpaces.Size = new System.Drawing.Size(86, 17);
this.chkStripSpaces.TabIndex = 5;
this.chkStripSpaces.Text = "Strip Spaces";
this.chkStripSpaces.UseVisualStyleBackColor = true;
//
// AwkForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

Binary file not shown.