Skip to content

Commit

Permalink
FreeTextLiteral - added option 'AllowEmpty'
Browse files Browse the repository at this point in the history
  • Loading branch information
rivantsov committed Sep 3, 2013
1 parent 8c910de commit d2da140
Show file tree
Hide file tree
Showing 66 changed files with 3,589 additions and 59 deletions.
178 changes: 178 additions & 0 deletions Irony.GrammarExplorer/030.Irony.GrammarExplorer.2012.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{AE1C04A8-B03D-4144-98E9-BF66C50265E7}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Irony.GrammarExplorer</RootNamespace>
<AssemblyName>Irony.GrammarExplorer</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="FastColoredTextBox">
<HintPath>..\Libraries\FastColoredTextBox\FastColoredTextBox.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<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="fmGrammarExplorer.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="fmGrammarExplorer.Designer.cs">
<DependentUpon>fmGrammarExplorer.cs</DependentUpon>
</Compile>
<Compile Include="fmSelectGrammars.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="fmSelectGrammars.Designer.cs">
<DependentUpon>fmSelectGrammars.cs</DependentUpon>
</Compile>
<Compile Include="GrammarItemList.cs" />
<Compile Include="GrammarLoader.cs" />
<Compile Include="Highlighter\EditorAdapter.cs" />
<Compile Include="Highlighter\EditorViewAdapter.cs" />
<Compile Include="Highlighter\FastColoredTextBoxHighlighter.cs" />
<Compile Include="Highlighter\WavyLineStyle.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="fmGrammarExplorer.resx">
<DependentUpon>fmGrammarExplorer.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="fmSelectGrammars.resx">
<DependentUpon>fmSelectGrammars.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="fmShowException.resx">
<SubType>Designer</SubType>
<DependentUpon>fmShowException.cs</DependentUpon>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<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="fmShowException.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="fmShowException.Designer.cs">
<DependentUpon>fmShowException.cs</DependentUpon>
</Compile>
<Compile Include="Highlighter\RichTextBoxHighlighter.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Highlighter\AboutCodeHighlighter.txt" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Irony.Interpreter\015.Irony.Interpreter.2012.csproj">
<Project>{321A7F5D-00C2-4095-9970-075CDEE8C139}</Project>
<Name>015.Irony.Interpreter.2012</Name>
</ProjectReference>
<ProjectReference Include="..\Irony\010.Irony.2012.csproj">
<Project>{D81F5C91-D7DB-46E5-BC99-49488FB6814C}</Project>
<Name>010.Irony.2012</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</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>
2 changes: 1 addition & 1 deletion Irony.GrammarExplorer/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Irony.GrammarExplorer/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Irony.GrammarExplorer/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
<userSettings>
<Irony.GrammarExplorer.Properties.Settings>
<setting name="SourceSample" serializeAs="String">
<value />
<value/>
</setting>
<setting name="LanguageIndex" serializeAs="String">
<value>0</value>
</setting>
<setting name="SearchPattern" serializeAs="String">
<value />
<value/>
</setting>
<setting name="Grammars" serializeAs="String">
<value />
<value/>
</setting>
<setting name="EnableTrace" serializeAs="String">
<value>False</value>
Expand All @@ -30,4 +30,4 @@
</setting>
</Irony.GrammarExplorer.Properties.Settings>
</userSettings>
</configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
135 changes: 135 additions & 0 deletions Irony.Interpreter/015.Irony.Interpreter.2012.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{321A7F5D-00C2-4095-9970-075CDEE8C139}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Irony.Interpreter</RootNamespace>
<AssemblyName>Irony.Interpreter</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>irony.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
<Reference Include="System.Xml.Linq" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Ast\Base\BasicTypes.cs" />
<Compile Include="Ast\Base\AstInterfaces.cs" />
<Compile Include="Ast\Base\AstNode.cs" />
<Compile Include="Ast\Expressions\IndexedAccessNode.cs" />
<Compile Include="Ast\Expressions\MemberAccessNode.cs" />
<Compile Include="Ast\AstContext\InterpreterAstContext.cs" />
<Compile Include="Ast\Functions\LambdaNode.cs" />
<Compile Include="LanguageRuntime\SpecialFormsLibrary.cs" />
<Compile Include="Ast\Expressions\BinaryOperationNode.cs" />
<Compile Include="Ast\Expressions\ExpressionListNode.cs" />
<Compile Include="Ast\Expressions\IfNode.cs" />
<Compile Include="Ast\Expressions\IncDecNode.cs" />
<Compile Include="Ast\Expressions\UnaryOperationNode.cs" />
<Compile Include="Ast\Functions\Closure.cs" />
<Compile Include="Ast\Functions\FunctionCallNode.cs" />
<Compile Include="Ast\Functions\FunctionDefNode.cs" />
<Compile Include="Ast\Functions\ParamListNode.cs" />
<Compile Include="Ast\PrimitiveNodes\IdentifierNode.cs" />
<Compile Include="Ast\PrimitiveNodes\LiteralValueNode.cs" />
<Compile Include="Ast\PrimitiveNodes\StringTemplateNode.cs" />
<Compile Include="Ast\SpecialNodes\EmptyStatementNode.cs" />
<Compile Include="Ast\SpecialNodes\NotSupportedNode.cs" />
<Compile Include="Ast\SpecialNodes\NullNode.cs" />
<Compile Include="Ast\Statements\AssignmentNode.cs" />
<Compile Include="Ast\Statements\StatementListNode.cs" />
<Compile Include="Diagnostics\ScriptException.cs" />
<Compile Include="Diagnostics\ScriptStackTrace.cs" />
<Compile Include="Bindings\BindingTargetInfo.cs" />
<Compile Include="Bindings\IBindingSource.cs" />
<Compile Include="Utilities\Extensions.cs" />
<Compile Include="InterpretedLanguageGrammar.cs" />
<Compile Include="LanguageRuntime\LanguageRuntime.cs" />
<Compile Include="LanguageRuntime\LanguageRuntime_Binding.cs" />
<Compile Include="LanguageRuntime\LanguageRuntime_OpDispatch.cs" />
<Compile Include="LanguageRuntime\LanguageRuntime_OpDispatch_Init.cs" />
<Compile Include="LanguageRuntime\NoneClass.cs" />
<Compile Include="LanguageRuntime\OperatorImplementation.cs" />
<Compile Include="Bindings\BindingRequest.cs" />
<Compile Include="Bindings\BuiltInObjectBinding.cs" />
<Compile Include="Bindings\SpecialFormBinding.cs" />
<Compile Include="Bindings\ModuleExport.cs" />
<Compile Include="SriptApplication\ConsoleAdaptor.cs" />
<Compile Include="Ast\AstContext\OperatorHandler.cs" />
<Compile Include="Utilities\Util.cs" />
<Compile Include="_Evaluator\ExpressionEvaluator.cs" />
<Compile Include="_Evaluator\ExpressionEvaluatorGrammar.cs" />
<Compile Include="_Evaluator\ExpressionEvaluatorRuntime.cs" />
<None Include="irony.snk" />
<Compile Include="Bindings\Binding.cs" />
<Compile Include="Bindings\ClrInteropBindings.cs" />
<Compile Include="Bindings\SlotBinding.cs" />
<Compile Include="Scopes\Scope.cs" />
<Compile Include="Scopes\ScopeInfo.cs" />
<Compile Include="Scopes\ScopeValuesDictionary.cs" />
<Compile Include="Scopes\AppDataMap.cs" />
<Compile Include="Scopes\ModuleInfo.cs" />
<Compile Include="Scopes\SlotInfo.cs" />
<Compile Include="Scopes\ScopeBase.cs" />
<Compile Include="SriptApplication\CommandLine.cs" />
<Compile Include="SriptApplication\ScriptApp.cs" />
<Compile Include="SriptApplication\ScriptThread.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Bindings\_about_bindings.txt" />
<Content Include="Scopes\_about_storage.txt" />
<Content Include="_about_Irony_Interpreter.txt" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Irony\010.Irony.2012.csproj">
<Project>{D81F5C91-D7DB-46E5-BC99-49488FB6814C}</Project>
<Name>010.Irony.2012</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\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>
8 changes: 4 additions & 4 deletions Irony.Interpreter/Ast/Functions/Closure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@

namespace Irony.Interpreter.Ast {
public class Closure : ICallTarget {
//The scope that created closure - used as Creator property of new scope, and will be used to find Parents (enclosing scopes)
public Scope CreatorScope;
//The scope that created closure; is used to find Parents (enclosing scopes)
public Scope ParentScope;
public LambdaNode Lamda;
public Closure(Scope parentScope, LambdaNode targetNode) {
CreatorScope = parentScope;
ParentScope = parentScope;
Lamda = targetNode;
}

public object Call(ScriptThread thread, object[] parameters) {
return Lamda.Call(CreatorScope, thread, parameters);
return Lamda.Call(ParentScope, thread, parameters);
}

public override string ToString() {
Expand Down
Loading

0 comments on commit d2da140

Please sign in to comment.