Prexonite, a .NET hosted scripting language with a focus on meta-programming and embedded DSLs
0

Configure Feed

Select the types of activity you want to include in your feed.

Support closed splices in partial indirect-call expressions.

Eg., supports `f.(?, *xs, ?, y)`. Not yet supported for member access, constructor

Christian Klauser (Jun 29, 2019, 10:58 AM +0200) cd1821fb b1c26520

+1929 -1854
+1
.gitignore
··· 103 103 104 104 *.iml 105 105 .idea 106 + .vs
+1
Prexonite.sln.DotSettings
··· 40 40 <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean> 41 41 <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean> 42 42 <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpRenamePlacementToArrangementMigration/@EntryIndexedValue">True</s:Boolean> 43 + <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean> 43 44 <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean> 44 45 <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean> 45 46 <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
+14 -1
Prexonite/Compiler/AST/AstIndirectCall.cs
··· 30 30 using JetBrains.Annotations; 31 31 using Prexonite.Commands.Core.PartialApplication; 32 32 using Prexonite.Modular; 33 + using Prexonite.Properties; 33 34 using Prexonite.Types; 34 35 35 36 namespace Prexonite.Compiler.Ast ··· 312 313 { 313 314 if (CheckNodeApplicationState().HasArgumentSplices) 314 315 { 315 - ((IAstPartiallyApplicable) _toSliceForm(target)).DoEmitPartialApplicationCode(target); 316 + var sliceForm = _toSliceForm(target); 317 + if (sliceForm is IAstPartiallyApplicable partialSliceForm) 318 + { 319 + partialSliceForm.DoEmitPartialApplicationCode(target); 320 + } 321 + else if(sliceForm is AstExpand macroSliceForm) 322 + { 323 + macroSliceForm.EmitCode(target, StackSemantics.Value); 324 + } 325 + else 326 + { 327 + target.Loader.ReportMessage(Message.Error(Resources.AstIndirectCall_DoEmitPartialApplicationCode_Cannot_translate_slice, this.Position, MessageClasses.ArgumentSpliceNotSupported)); 328 + } 316 329 } 317 330 else 318 331 {
+2 -2
Prexonite/Compiler/Lexer.cs
··· 1 - /* The following code was generated by CSFlex 1.4 on 16.04.2018 */ 1 + /* The following code was generated by CSFlex 1.4 on 29.06.2019 */ 2 2 3 3 #line 1 "Prexonite.lex" 4 4 /* ··· 41 41 /** 42 42 * This class is a scanner generated by <a href="http://www.sourceforge.net/projects/csflex/">C# Flex</a>, based on 43 43 * <a href="http://www.jflex.de/">JFlex</a>, version 1.4 44 - * on 16.04.2018 from the specification file 44 + * on 29.06.2019 from the specification file 45 45 * <tt>Prexonite.lex</tt> 46 46 */ 47 47 class Lexer: Prexonite.Internal.IScanner {
+690 -687
Prexonite/Compiler/Macro/MacroSession.cs
··· 1 - // Prexonite 2 - // 3 - // Copyright (c) 2014, Christian Klauser 4 - // All rights reserved. 5 - // 6 - // Redistribution and use in source and binary forms, with or without modification, 7 - // are permitted provided that the following conditions are met: 8 - // 9 - // Redistributions of source code must retain the above copyright notice, 10 - // this list of conditions and the following disclaimer. 11 - // Redistributions in binary form must reproduce the above copyright notice, 12 - // this list of conditions and the following disclaimer in the 13 - // documentation and/or other materials provided with the distribution. 14 - // The names of the contributors may be used to endorse or 15 - // promote products derived from this software without specific prior written permission. 16 - // 17 - // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 - // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 - // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 - // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 21 - // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 - // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 - // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 - // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 25 - // IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 - using System; 27 - using System.Collections.Generic; 28 - using System.Diagnostics; 29 - using System.Linq; 30 - using JetBrains.Annotations; 31 - using Prexonite.Compiler.Ast; 32 - using Prexonite.Compiler.Symbolic; 33 - using Prexonite.Modular; 34 - using Prexonite.Properties; 35 - using Prexonite.Types; 36 - 37 - namespace Prexonite.Compiler.Macro 38 - { 39 - /// <summary> 40 - /// Provides information associated with a macro expansion session. 41 - /// </summary> 42 - public class MacroSession : IDisposable 43 - { 44 - [NotNull] 45 - private readonly CompilerTarget _target; 46 - 47 - [CanBeNull] 48 - private LoaderOptions _options; 49 - [NotNull] 50 - private readonly SymbolStore _globalSymbols; 51 - [NotNull] 52 - private readonly ReadOnlyCollectionView<string> _outerVariables; 53 - [NotNull] 54 - private readonly SymbolCollection _releaseList = new SymbolCollection(); 55 - [NotNull] 56 - private readonly SymbolCollection _allocationList = new SymbolCollection(); 57 - 58 - [NotNull] 59 - private readonly HashSet<AstGetSet> _invocations = 60 - new HashSet<AstGetSet>(); 61 - 62 - [NotNull] 63 - private readonly object _buildCommandToken; 64 - 65 - [NotNull] 66 - private readonly List<PValue> _transportStore = new List<PValue>(); 67 - 68 - [NotNull] 69 - private readonly IAstFactory _astFactory; 70 - 71 - /// <summary> 72 - /// Creates a new macro expansion session for the specified compiler target. 73 - /// </summary> 74 - /// <param name = "target">The target to expand macros in.</param> 75 - public MacroSession([NotNull] CompilerTarget target) 76 - { 77 - if(target == null) 78 - throw new ArgumentNullException(nameof(target)); 79 - 80 - _target = target; 81 - _astFactory = _target.Factory; 82 - 83 - _globalSymbols = SymbolStore.Create(_target.Loader.TopLevelSymbols); 84 - _outerVariables = new ReadOnlyCollectionView<string>(_target.OuterVariables); 85 - 86 - _buildCommandToken = target.Loader.RequestBuildCommands(); 87 - } 88 - 89 - /// <summary> 90 - /// Provides read-only access to the global symbol table. 91 - /// </summary> 92 - public SymbolStore GlobalSymbols 93 - { 94 - get { return _globalSymbols; } 95 - } 96 - 97 - /// <summary> 98 - /// The target that this macro expansion session covers. 99 - /// </summary> 100 - public CompilerTarget Target 101 - { 102 - [DebuggerStepThrough] 103 - get { return _target; } 104 - } 105 - 106 - public ReadOnlyCollectionView<string> OuterVariables 107 - { 108 - get { return _outerVariables; } 109 - } 110 - 111 - /// <summary> 112 - /// A copy of the loader options in effect during this macro expansion. 113 - /// </summary> 114 - public LoaderOptions LoaderOptions 115 - { 116 - get 117 - { 118 - if (_options == null) 119 - { 120 - _options = new LoaderOptions(_target.Loader.ParentEngine, 121 - _target.Loader.ParentApplication); 122 - _options.InheritFrom(_target.Loader.Options); 123 - } 124 - return _target.Loader.Options; 125 - } 126 - } 127 - 128 - public ILoopBlock CurrentLoopBlock 129 - { 130 - get { return _target.CurrentLoopBlock; } 131 - } 132 - 133 - public AstBlock CurrentBlock 134 - { 135 - get { return _target.CurrentBlock; } 136 - } 137 - 138 - public IAstFactory Factory 139 - { 140 - get { return _astFactory; } 141 - } 142 - 143 - /// <summary> 144 - /// Allocates a temporary variable for this macro expansion session. 145 - /// </summary> 146 - /// <returns>The (physical) id of a free temporary variable.</returns> 147 - /// <remarks> 148 - /// If a temporary variable is not freed during a macro expansion session, 149 - /// it will no longer be considered a temporary variable and cannot be freed in 150 - /// subsequent expansions 151 - /// </remarks> 152 - public string AllocateTemporaryVariable() 153 - { 154 - var temp = _target.RequestTemporaryVariable(); 155 - Debug.Assert(!_allocationList.Contains(temp)); 156 - Debug.Assert(!_releaseList.Contains(temp)); 157 - _allocationList.Add(temp); 158 - return temp; 159 - } 160 - 161 - /// <summary> 162 - /// Marks the temporary variable for freeing at the end of this expansion session. 163 - /// </summary> 164 - /// <param name = "temporaryVariable">The temporary variable to be freed.</param> 165 - public void FreeTemporaryVariable(string temporaryVariable) 166 - { 167 - if (_releaseList.Contains(temporaryVariable)) 168 - { 169 - throw new PrexoniteException("Cannot release temporary variable " + 170 - temporaryVariable + " twice!"); 171 - } 172 - _releaseList.Add(temporaryVariable); 173 - } 174 - 175 - /// <summary> 176 - /// Releases managed resources bound by the macro expansion session, such as temporary variables. 177 - /// </summary> 178 - public void Dispose() 179 - { 180 - //Free all variables that were marked as free during the session. 181 - try 182 - { 183 - foreach (var temp in _releaseList) 184 - { 185 - _target.FreeTemporaryVariable(temp); 186 - _allocationList.Remove(temp); 187 - } 188 - 189 - //Remove those that weren't freed to persistent variables 190 - foreach (var temp in _allocationList) 191 - { 192 - _target.PromoteTemporaryVariable(temp); 193 - } 194 - } 195 - finally 196 - { 197 - var ldr = Target.Loader; 198 - if (ldr != null) 199 - ldr.ReleaseBuildCommands(_buildCommandToken); 200 - } 201 - } 202 - 203 - private interface IMacroExpander 204 - { 205 - void Initialize(CompilerTarget target, AstGetSet macroNode, bool justEffect); 206 - string HumanId { get; } 207 - void Expand(CompilerTarget target, MacroContext context); 208 - bool TryExpandPartially(CompilerTarget target, MacroContext context); 209 - } 210 - 211 - #region Command Expander 212 - 213 - private abstract class MacroCommandExpanderBase : IMacroExpander 214 - { 215 - protected MacroCommand MacroCommand; 216 - public string HumanId { get; protected set; } 217 - 218 - public abstract void Initialize(CompilerTarget target, AstGetSet macroNode, 219 - bool justEffect); 220 - 221 - public void Expand(CompilerTarget target, MacroContext context) 222 - { 223 - if (MacroCommand == null) 224 - return; 225 - 226 - MacroCommand.Expand(context); 227 - } 228 - 229 - public bool TryExpandPartially(CompilerTarget target, MacroContext context) 230 - { 231 - var pac = MacroCommand as PartialMacroCommand; 232 - return pac != null && pac.ExpandPartialApplication(context); 233 - } 234 - } 235 - 236 - private class MacroCommandExpander : MacroCommandExpanderBase 237 - { 238 - public override void Initialize(CompilerTarget target, AstGetSet macroNode, bool justEffect) 239 - { 240 - var expansion = (AstExpand) macroNode; 241 - 242 - MacroCommand = null; 243 - 244 - EntityRef.MacroCommand mcmdRef; 245 - if(!expansion.Entity.TryGetMacroCommand(out mcmdRef)) 246 - throw new InvalidOperationException(string.Format(Resources.MacroCommandExpander_MacroCommandExpected, expansion.Entity)); 247 - PValue value; 248 - MacroCommand mcmd; 249 - if (mcmdRef.TryGetEntity(target.Loader, out value) && (mcmd = value.Value as MacroCommand) != null) 250 - { 251 - HumanId = mcmdRef.Id; 252 - MacroCommand = mcmd; 253 - } 254 - else 255 - { 256 - target.Loader.ReportMessage(Message.Create(MessageSeverity.Error, 257 - String.Format( 258 - Resources.MacroCommandExpander_CannotFindMacro, 259 - mcmdRef.Id), 260 - macroNode.Position, MessageClasses.NoSuchMacroCommand)); 261 - HumanId = "cannot_find_macro_command"; 262 - } 263 - } 264 - } 265 - 266 - #endregion 267 - 268 - #region Function Expander 269 - 270 - private static string _toFunctionNameString(SymbolEntry si) 271 - { 272 - if (si.Module == null) 273 - return si.InternalId; 274 - else 275 - return string.Format("{0}/{1},{2}", si.InternalId, si.Module.Id, si.Module.Version); 276 - } 277 - 278 - private abstract class MacroFunctionExpanderBase : IMacroExpander 279 - { 280 - protected PFunction MacroFunction; 281 - 282 - [PublicAPI] 283 - public const string PartialMacroKey = @"partial\macro"; 284 - 285 - public string HumanId { get; protected set; } 286 - 287 - public abstract void Initialize(CompilerTarget target, AstGetSet macroNode, 288 - bool justEffect); 289 - 290 - public void Expand(CompilerTarget target, MacroContext context) 291 - { 292 - if (MacroFunction == null) 293 - return; 294 - 295 - var astRaw = _invokeMacroFunction(target, context); 296 - 297 - //Optimize 298 - AstNode ast; 299 - if (astRaw != null) 300 - ast = astRaw.Value as AstNode; 301 - else 302 - ast = null; 303 - 304 - var expr = ast as AstExpr; 305 - 306 - /*Merge with context expression block 307 - * cs = Statements from context 308 - * ce = Expression from context 309 - * fs = Statements from function return value 310 - * fe = Expression from function return value 311 - * Rules 312 - * general: 313 - * {cs;ce;fs} = fe 314 - * no-fe: 315 - * {cs;tmp = ce;fs} = tmp 316 - * no-f: 317 - * {cs} = ce 318 - * no-c: 319 - * {fs} = fe 320 - */ 321 - var contextBlock = context.Block; 322 - var macroBlock = ast as AstBlock; 323 - 324 - // ReSharper disable JoinDeclarationAndInitializer 325 - AstExpr ce, fe; 326 - IEnumerable<AstNode> fs; 327 - // ReSharper restore JoinDeclarationAndInitializer 328 - //determine ce 329 - ce = contextBlock.Expression; 330 - 331 - //determine fe 332 - if (macroBlock != null) 333 - fe = macroBlock.Expression; 334 - else if (expr != null) 335 - { 336 - fe = expr; 337 - 338 - //cannot be statement at the same time, set ast to null. 339 - ast = null; 340 - } 341 - else 342 - fe = null; 343 - 344 - //determine fs 345 - if (macroBlock != null) 346 - fs = macroBlock.Count > 0 ? macroBlock.Statements : null; 347 - else if (ast != null) 348 - fs = new[] {ast}; 349 - else 350 - fs = null; 351 - 352 - _implementMergeRules(context, ce, fs, fe); 353 - } 354 - 355 - public bool TryExpandPartially(CompilerTarget target, MacroContext context) 356 - { 357 - if (!MacroFunction.Meta[PartialMacroKey].Switch) 358 - return false; 359 - 360 - var successRaw = _invokeMacroFunction(target, context); 361 - if (successRaw.Type != PType.Bool) 362 - { 363 - context.ReportMessage(Message.Create(MessageSeverity.Error, 364 - Resources.MacroFunctionExpander_PartialMacroMustIndicateSuccessWithBoolean, 365 - context.Invocation.Position, 366 - MessageClasses.PartialMacroMustReturnBoolean)); 367 - _setupDefaultExpression(context); 368 - return false; 369 - } 370 - 371 - return (bool) successRaw.Value; 372 - } 373 - 374 - private void _implementMergeRules(MacroContext context, AstExpr ce, 375 - IEnumerable<AstNode> fs, AstExpr fe) 376 - { 377 - var contextBlock = context.Block; 378 - //cs is already stored in contextBlock, 379 - // the rules position cs always at the beginning, thus no need to handle cs. 380 - 381 - //At this point 382 - // { ce } iff (ce ∧ fs ∧ fe) 383 - // {tmp = ce} iff (ce ∧ fs ∧ ¬fe) 384 - // { } otherwise 385 - if (ce != null && fs != null) 386 - { 387 - if (fe != null) 388 - { 389 - contextBlock.Add(ce); 390 - } 391 - else 392 - { 393 - //Might at a later point become a warning 394 - var invocationPosition = context.Invocation.Position; 395 - context.ReportMessage(Message.Create(MessageSeverity.Info, 396 - String.Format( 397 - Resources.MacroFunctionExpander__UsedTemporaryVariable, 398 - HumanId), 399 - invocationPosition, MessageClasses.BlockMergingUsesVariable)); 400 - 401 - var tmpV = context.AllocateTemporaryVariable(); 402 - 403 - //Generate assignment to temporary variable 404 - var tmpVRef = context.Factory.Reference(invocationPosition, EntityRef.Variable.Local.Create(tmpV)); 405 - var assignTmpV = context.Factory.IndirectCall(invocationPosition,tmpVRef,PCall.Set); 406 - assignTmpV.Arguments.Add(ce); 407 - contextBlock.Add(assignTmpV); 408 - 409 - //Generate lookup of computed value 410 - ce = context.Factory.IndirectCall(invocationPosition,tmpVRef); 411 - } 412 - } 413 - 414 - //At this point 415 - // {fs} iff (fs) 416 - // { } otherwise 417 - 418 - if (fs != null) 419 - { 420 - foreach (var stmt in fs) 421 - contextBlock.Add(stmt); 422 - } 423 - 424 - //Finally determine expression 425 - // = fe iff (ce ∧ fe) 426 - // = ce iff (ce ∧ ¬fe ∧ ¬fs) 427 - // = tmp iff (ce ∧ ¬fe ∧ fs) 428 - // = ⊥ otherwise 429 - if (fe != null) 430 - contextBlock.Expression = fe; 431 - else if (ce != null) 432 - contextBlock.Expression = ce; //if tmp is involved, it has replaced ce 433 - else 434 - contextBlock.Expression = null; //macro session will cover this case 435 - } 436 - 437 - private PValue _invokeMacroFunction(CompilerTarget target, MacroContext context) 438 - { 439 - var macro = PrepareMacroImplementation(target.Loader, MacroFunction, context); 440 - 441 - //Execute macro (argument nodes of the invocation node are passed as arguments to the macro) 442 - var macroInvocation = context.Invocation; 443 - var arguments = 444 - macroInvocation.Arguments.Select(target.Loader.CreateNativePValue).ToArray(); 445 - var parentApplication = MacroFunction.ParentApplication; 446 - PValue astRaw; 447 - try 448 - { 449 - parentApplication._SuppressInitialization = true; 450 - astRaw = macro.IndirectCall(target.Loader, arguments); 451 - } 452 - finally 453 - { 454 - parentApplication._SuppressInitialization = false; 455 - } 456 - return astRaw; 457 - } 458 - } 459 - 460 - private class MacroFunctionExpander : MacroFunctionExpanderBase 461 - { 462 - public override void Initialize(CompilerTarget target, AstGetSet macroNode, bool justEffect) 463 - { 464 - var expansion = (AstExpand)macroNode; 465 - 466 - MacroFunction = null; 467 - 468 - EntityRef.Function functionRef; 469 - if (!expansion.Entity.TryGetFunction(out functionRef)) 470 - throw new InvalidOperationException(string.Format(Resources.MacroFunctionExpander_ExpectedFunctionReference, expansion.Entity)); 471 - PValue value; 472 - PFunction func; 473 - if (functionRef.TryGetEntity(target.Loader, out value) && (func = value.Value as PFunction) != null) 474 - { 475 - HumanId = functionRef.Id; 476 - MacroFunction = func; 477 - } 478 - else 479 - { 480 - target.Loader.ReportMessage( 481 - Message.Create( 482 - MessageSeverity.Error, 483 - String.Format( 484 - Resources.MacroFunctionExpander_MacroFunctionNotAvailable, 485 - functionRef, 486 - target.Function.Id, target.Loader.ParentApplication.Module.Name), 487 - macroNode.Position, MessageClasses.NoSuchMacroFunction)); 488 - HumanId = "could_not_resolve_macro_function"; 489 - } 490 - } 491 - } 492 - 493 - #endregion 494 - 495 - public AstNode ExpandMacro(AstGetSet invocation, bool justEffect) 496 - { 497 - var target = Target; 498 - var context = new MacroContext(this, invocation, justEffect); 499 - 500 - //Delegate actual expansion to approriate expander 501 - var expander = _getExpander(invocation, target); 502 - 503 - if (expander != null) 504 - { 505 - expander.Initialize(target, invocation, justEffect); 506 - 507 - //Macro invocations need to be unique within a session 508 - if (_invocations.Contains(invocation)) 509 - { 510 - target.Loader.ReportMessage( 511 - Message.Create(MessageSeverity.Error, 512 - String.Format( 513 - Resources.MacroSession_MacroNotReentrant, 514 - expander.HumanId), 515 - invocation.Position, MessageClasses.MacroNotReentrant)); 516 - return CreateNeutralExpression(invocation); 517 - } 518 - _invocations.Add(invocation); 519 - 520 - //check if this macro is a partial application (illegal) 521 - if (invocation.Arguments.Any(AstPartiallyApplicable.IsPlaceholder)) 522 - { 523 - //Attempt to expand partial macro 524 - try 525 - { 526 - if (!expander.TryExpandPartially(target, context)) 527 - { 528 - target.Loader.ReportMessage( 529 - Message.Create( 530 - MessageSeverity.Error, 531 - string.Format( 532 - Resources.MacroSession_MacroCannotBeAppliedPartially, 533 - expander.HumanId), invocation.Position, 534 - MessageClasses.PartialApplicationNotSupported)); 535 - return CreateNeutralExpression(invocation); 536 - } 537 - } 538 - catch (Exception e) 539 - { 540 - _setupDefaultExpression(context); 541 - _reportException(context, expander, e); 542 - } 543 - } 544 - else 545 - { 546 - //Actual macro expansion takes place here 547 - try 548 - { 549 - var cub = target.CurrentBlock; 550 - expander.Expand(target, context); 551 - if(!ReferenceEquals(cub,target.CurrentBlock)) 552 - throw new PrexoniteException("Macro must restore previous lexical scope."); 553 - } 554 - catch (Exception e) 555 - { 556 - _setupDefaultExpression(context); 557 - _reportException(context, expander, e); 558 - } 559 - } 560 - } 561 - 562 - //Sanitize output 563 - var ast = context.Block; 564 - 565 - //ensure that there is at least null being pushed onto the stack)) 566 - if (!justEffect && ast.Expression == null && !context.SuppressDefaultExpression) 567 - ast.Expression = CreateNeutralExpression(invocation); 568 - 569 - var node = AstNode._GetOptimizedNode(Target, ast); 570 - 571 - return node; 572 - } 573 - 574 - private static void _reportException(MacroContext context, IMacroExpander expander, 575 - Exception e) 576 - { 577 - context.ReportMessage(Message.Create(MessageSeverity.Error, 578 - String.Format( 579 - Resources.MacroSession_ExceptionDuringExpansionOfMacro, 580 - expander.HumanId, context.Function.LogicalId, 581 - e.Message), context.Invocation.Position, MessageClasses.ExceptionDuringCompilation)); 582 - #if DEBUG 583 - Console.WriteLine(e); 584 - #endif 585 - } 586 - 587 - private static void _setupDefaultExpression(MacroContext context) 588 - { 589 - context.Block.Clear(); 590 - context.Block.Expression = CreateNeutralExpression(context.Invocation); 591 - context.SuppressDefaultExpression = false; 592 - } 593 - 594 - public static AstGetSet CreateNeutralExpression(AstGetSet invocation) 595 - { 596 - var nullLiteral = new AstNull(invocation.File, invocation.Line, invocation.Column); 597 - var call = new AstIndirectCall(invocation.File, invocation.Line, invocation.Column, 598 - invocation.Call, nullLiteral); 599 - if (invocation.Call == PCall.Set) 600 - call.Arguments.Add(new AstNull(invocation.File, invocation.Line, invocation.Column)); 601 - 602 - return call; 603 - } 604 - 605 - private IMacroExpander _getExpander(AstGetSet macroNode, CompilerTarget target) 606 - { 607 - IMacroExpander expander = null; 608 - AstExpand expansion; 609 - EntityRef.MacroCommand mcmd; 610 - EntityRef.Function func; 611 - if ((expansion = macroNode as AstExpand) != null) 612 - { 613 - if (expansion.Entity.TryGetMacroCommand(out mcmd)) 614 - expander = new MacroCommandExpander(); 615 - else if (expansion.Entity.TryGetFunction(out func)) 616 - expander = new MacroFunctionExpander(); 617 - else 618 - _reportMacroNodeNotMacro(target, expansion.Entity.GetType().Name, macroNode); 619 - } 620 - else 621 - { 622 - _reportMacroNodeNotMacro(target, macroNode.GetType().Name, macroNode); 623 - } 624 - return expander; 625 - } 626 - 627 - private static void _reportMacroNodeNotMacro(CompilerTarget target, string implName, AstGetSet invocation) 628 - { 629 - target.Loader.ReportMessage( 630 - Message.Create(MessageSeverity.Error, 631 - String.Format( 632 - Resources.MacroSession_NotAMacro, 633 - implName), 634 - invocation.Position, MessageClasses.NotAMacro)); 635 - } 636 - 637 - /// <summary> 638 - /// Provides macro environment to its implementing function. The resulting closure 639 - /// implements the expansion of the macro. 640 - /// </summary> 641 - /// <param name = "sctx">The stack context to use for wrapping the context.</param> 642 - /// <param name = "func">The implementation of the macro.</param> 643 - /// <param name = "context">The macro context for this expansion.</param> 644 - /// <returns>A closure that implements the expansion of this macro.</returns> 645 - public static Closure PrepareMacroImplementation(StackContext sctx, PFunction func, 646 - MacroContext context) 647 - { 648 - var contextVar = 649 - CompilerTarget.CreateReadonlyVariable(sctx.CreateNativePValue(context)); 650 - 651 - var env = new SymbolTable<PVariable>(1) {{MacroAliases.ContextAlias, contextVar}}; 652 - 653 - var sharedVariables = 654 - func.Meta[PFunction.SharedNamesKey].List.Select(entry => env[entry.Text]). 655 - ToArray(); 656 - return new Closure(func, sharedVariables); 657 - } 658 - 659 - /// <summary> 660 - /// Stores an object in the macro session. It can later be retrieved via <see cref = "RetrieveFromTransport" />. 661 - /// </summary> 662 - /// <param name = "obj">The object to be stored.</param> 663 - /// <returns>The id with which to retrieve the object later.</returns> 664 - public int StoreForTransport(PValue obj) 665 - { 666 - if (obj == null) 667 - throw new ArgumentNullException(nameof(obj)); 668 - var transportId = _transportStore.Count; 669 - _transportStore.Add(obj); 670 - return transportId; 671 - } 672 - 673 - /// <summary> 674 - /// Returns an object previously stored via <see cref = "StoreForTransport" />. 675 - /// </summary> 676 - /// <param name = "id">The id as returned by <see cref = "StoreForTransport" /></param> 677 - /// <returns>The obejct stored before.</returns> 678 - public PValue RetrieveFromTransport(int id) 679 - { 680 - if (0 <= id && id < _transportStore.Count) 681 - return _transportStore[id]; 682 - else 683 - throw new PrexoniteException( 684 - string.Format("No object with id {0} in transport through this macro session.", 685 - id)); 686 - } 687 - } 1 + // Prexonite 2 + // 3 + // Copyright (c) 2014, Christian Klauser 4 + // All rights reserved. 5 + // 6 + // Redistribution and use in source and binary forms, with or without modification, 7 + // are permitted provided that the following conditions are met: 8 + // 9 + // Redistributions of source code must retain the above copyright notice, 10 + // this list of conditions and the following disclaimer. 11 + // Redistributions in binary form must reproduce the above copyright notice, 12 + // this list of conditions and the following disclaimer in the 13 + // documentation and/or other materials provided with the distribution. 14 + // The names of the contributors may be used to endorse or 15 + // promote products derived from this software without specific prior written permission. 16 + // 17 + // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 + // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 + // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 + // IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 21 + // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 + // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 + // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 + // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 25 + // IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 + using System; 27 + using System.Collections.Generic; 28 + using System.Diagnostics; 29 + using System.Linq; 30 + using JetBrains.Annotations; 31 + using Prexonite.Compiler.Ast; 32 + using Prexonite.Compiler.Symbolic; 33 + using Prexonite.Modular; 34 + using Prexonite.Properties; 35 + using Prexonite.Types; 36 + 37 + namespace Prexonite.Compiler.Macro 38 + { 39 + /// <summary> 40 + /// Provides information associated with a macro expansion session. 41 + /// </summary> 42 + public class MacroSession : IDisposable 43 + { 44 + [NotNull] 45 + private readonly CompilerTarget _target; 46 + 47 + [CanBeNull] 48 + private LoaderOptions _options; 49 + [NotNull] 50 + private readonly SymbolStore _globalSymbols; 51 + [NotNull] 52 + private readonly ReadOnlyCollectionView<string> _outerVariables; 53 + [NotNull] 54 + private readonly SymbolCollection _releaseList = new SymbolCollection(); 55 + [NotNull] 56 + private readonly SymbolCollection _allocationList = new SymbolCollection(); 57 + 58 + [NotNull] 59 + private readonly HashSet<AstGetSet> _invocations = 60 + new HashSet<AstGetSet>(); 61 + 62 + [NotNull] 63 + private readonly object _buildCommandToken; 64 + 65 + [NotNull] 66 + private readonly List<PValue> _transportStore = new List<PValue>(); 67 + 68 + [NotNull] 69 + private readonly IAstFactory _astFactory; 70 + 71 + /// <summary> 72 + /// Creates a new macro expansion session for the specified compiler target. 73 + /// </summary> 74 + /// <param name = "target">The target to expand macros in.</param> 75 + public MacroSession([NotNull] CompilerTarget target) 76 + { 77 + if(target == null) 78 + throw new ArgumentNullException(nameof(target)); 79 + 80 + _target = target; 81 + _astFactory = _target.Factory; 82 + 83 + _globalSymbols = SymbolStore.Create(_target.Loader.TopLevelSymbols); 84 + _outerVariables = new ReadOnlyCollectionView<string>(_target.OuterVariables); 85 + 86 + _buildCommandToken = target.Loader.RequestBuildCommands(); 87 + } 88 + 89 + /// <summary> 90 + /// Provides read-only access to the global symbol table. 91 + /// </summary> 92 + public SymbolStore GlobalSymbols 93 + { 94 + get { return _globalSymbols; } 95 + } 96 + 97 + /// <summary> 98 + /// The target that this macro expansion session covers. 99 + /// </summary> 100 + public CompilerTarget Target 101 + { 102 + [DebuggerStepThrough] 103 + get { return _target; } 104 + } 105 + 106 + public ReadOnlyCollectionView<string> OuterVariables 107 + { 108 + get { return _outerVariables; } 109 + } 110 + 111 + /// <summary> 112 + /// A copy of the loader options in effect during this macro expansion. 113 + /// </summary> 114 + public LoaderOptions LoaderOptions 115 + { 116 + get 117 + { 118 + if (_options == null) 119 + { 120 + _options = new LoaderOptions(_target.Loader.ParentEngine, 121 + _target.Loader.ParentApplication); 122 + _options.InheritFrom(_target.Loader.Options); 123 + } 124 + return _target.Loader.Options; 125 + } 126 + } 127 + 128 + public ILoopBlock CurrentLoopBlock 129 + { 130 + get { return _target.CurrentLoopBlock; } 131 + } 132 + 133 + public AstBlock CurrentBlock 134 + { 135 + get { return _target.CurrentBlock; } 136 + } 137 + 138 + public IAstFactory Factory 139 + { 140 + get { return _astFactory; } 141 + } 142 + 143 + /// <summary> 144 + /// Allocates a temporary variable for this macro expansion session. 145 + /// </summary> 146 + /// <returns>The (physical) id of a free temporary variable.</returns> 147 + /// <remarks> 148 + /// If a temporary variable is not freed during a macro expansion session, 149 + /// it will no longer be considered a temporary variable and cannot be freed in 150 + /// subsequent expansions 151 + /// </remarks> 152 + public string AllocateTemporaryVariable() 153 + { 154 + var temp = _target.RequestTemporaryVariable(); 155 + Debug.Assert(!_allocationList.Contains(temp)); 156 + Debug.Assert(!_releaseList.Contains(temp)); 157 + _allocationList.Add(temp); 158 + return temp; 159 + } 160 + 161 + /// <summary> 162 + /// Marks the temporary variable for freeing at the end of this expansion session. 163 + /// </summary> 164 + /// <param name = "temporaryVariable">The temporary variable to be freed.</param> 165 + public void FreeTemporaryVariable(string temporaryVariable) 166 + { 167 + if (_releaseList.Contains(temporaryVariable)) 168 + { 169 + throw new PrexoniteException("Cannot release temporary variable " + 170 + temporaryVariable + " twice!"); 171 + } 172 + _releaseList.Add(temporaryVariable); 173 + } 174 + 175 + /// <summary> 176 + /// Releases managed resources bound by the macro expansion session, such as temporary variables. 177 + /// </summary> 178 + public void Dispose() 179 + { 180 + //Free all variables that were marked as free during the session. 181 + try 182 + { 183 + foreach (var temp in _releaseList) 184 + { 185 + _target.FreeTemporaryVariable(temp); 186 + _allocationList.Remove(temp); 187 + } 188 + 189 + //Remove those that weren't freed to persistent variables 190 + foreach (var temp in _allocationList) 191 + { 192 + _target.PromoteTemporaryVariable(temp); 193 + } 194 + } 195 + finally 196 + { 197 + var ldr = Target.Loader; 198 + if (ldr != null) 199 + ldr.ReleaseBuildCommands(_buildCommandToken); 200 + } 201 + } 202 + 203 + private interface IMacroExpander 204 + { 205 + void Initialize(CompilerTarget target, AstGetSet macroNode, bool justEffect); 206 + string HumanId { get; } 207 + void Expand(CompilerTarget target, MacroContext context); 208 + bool TryExpandPartially(CompilerTarget target, MacroContext context); 209 + } 210 + 211 + #region Command Expander 212 + 213 + private abstract class MacroCommandExpanderBase : IMacroExpander 214 + { 215 + protected MacroCommand MacroCommand; 216 + public string HumanId { get; protected set; } 217 + 218 + public abstract void Initialize(CompilerTarget target, AstGetSet macroNode, 219 + bool justEffect); 220 + 221 + public void Expand(CompilerTarget target, MacroContext context) 222 + { 223 + if (MacroCommand == null) 224 + return; 225 + 226 + MacroCommand.Expand(context); 227 + } 228 + 229 + public bool TryExpandPartially(CompilerTarget target, MacroContext context) 230 + { 231 + var pac = MacroCommand as PartialMacroCommand; 232 + return pac != null && pac.ExpandPartialApplication(context); 233 + } 234 + } 235 + 236 + private class MacroCommandExpander : MacroCommandExpanderBase 237 + { 238 + public override void Initialize(CompilerTarget target, AstGetSet macroNode, bool justEffect) 239 + { 240 + var expansion = (AstExpand) macroNode; 241 + 242 + MacroCommand = null; 243 + 244 + EntityRef.MacroCommand mcmdRef; 245 + if(!expansion.Entity.TryGetMacroCommand(out mcmdRef)) 246 + throw new InvalidOperationException(string.Format(Resources.MacroCommandExpander_MacroCommandExpected, expansion.Entity)); 247 + PValue value; 248 + MacroCommand mcmd; 249 + if (mcmdRef.TryGetEntity(target.Loader, out value) && (mcmd = value.Value as MacroCommand) != null) 250 + { 251 + HumanId = mcmdRef.Id; 252 + MacroCommand = mcmd; 253 + } 254 + else 255 + { 256 + target.Loader.ReportMessage(Message.Create(MessageSeverity.Error, 257 + String.Format( 258 + Resources.MacroCommandExpander_CannotFindMacro, 259 + mcmdRef.Id), 260 + macroNode.Position, MessageClasses.NoSuchMacroCommand)); 261 + HumanId = "cannot_find_macro_command"; 262 + } 263 + } 264 + } 265 + 266 + #endregion 267 + 268 + #region Function Expander 269 + 270 + private abstract class MacroFunctionExpanderBase : IMacroExpander 271 + { 272 + protected PFunction MacroFunction; 273 + 274 + [PublicAPI] 275 + public const string PartialMacroKey = @"partial\macro"; 276 + 277 + public string HumanId { get; protected set; } 278 + 279 + public abstract void Initialize(CompilerTarget target, AstGetSet macroNode, 280 + bool justEffect); 281 + 282 + public void Expand(CompilerTarget target, MacroContext context) 283 + { 284 + if (MacroFunction == null) 285 + return; 286 + 287 + var astRaw = _invokeMacroFunction(target, context); 288 + 289 + //Optimize 290 + AstNode ast; 291 + if (astRaw != null) 292 + ast = astRaw.Value as AstNode; 293 + else 294 + ast = null; 295 + 296 + var expr = ast as AstExpr; 297 + 298 + /*Merge with context expression block 299 + * cs = Statements from context 300 + * ce = Expression from context 301 + * fs = Statements from function return value 302 + * fe = Expression from function return value 303 + * Rules 304 + * general: 305 + * {cs;ce;fs} = fe 306 + * no-fe: 307 + * {cs;tmp = ce;fs} = tmp 308 + * no-f: 309 + * {cs} = ce 310 + * no-c: 311 + * {fs} = fe 312 + */ 313 + var contextBlock = context.Block; 314 + var macroBlock = ast as AstBlock; 315 + 316 + // ReSharper disable JoinDeclarationAndInitializer 317 + AstExpr ce, fe; 318 + IEnumerable<AstNode> fs; 319 + // ReSharper restore JoinDeclarationAndInitializer 320 + //determine ce 321 + ce = contextBlock.Expression; 322 + 323 + //determine fe 324 + if (macroBlock != null) 325 + fe = macroBlock.Expression; 326 + else if (expr != null) 327 + { 328 + fe = expr; 329 + 330 + //cannot be statement at the same time, set ast to null. 331 + ast = null; 332 + } 333 + else 334 + fe = null; 335 + 336 + //determine fs 337 + if (macroBlock != null) 338 + fs = macroBlock.Count > 0 ? macroBlock.Statements : null; 339 + else if (ast != null) 340 + fs = new[] {ast}; 341 + else 342 + fs = null; 343 + 344 + _implementMergeRules(context, ce, fs, fe); 345 + } 346 + 347 + public bool TryExpandPartially(CompilerTarget target, MacroContext context) 348 + { 349 + if (!MacroFunction.Meta[PartialMacroKey].Switch) 350 + return false; 351 + 352 + var successRaw = _invokeMacroFunction(target, context); 353 + if (successRaw.Type != PType.Bool) 354 + { 355 + context.ReportMessage(Message.Create(MessageSeverity.Error, 356 + Resources.MacroFunctionExpander_PartialMacroMustIndicateSuccessWithBoolean, 357 + context.Invocation.Position, 358 + MessageClasses.PartialMacroMustReturnBoolean)); 359 + _setupDefaultExpression(context); 360 + return false; 361 + } 362 + 363 + return (bool) successRaw.Value; 364 + } 365 + 366 + private void _implementMergeRules(MacroContext context, AstExpr ce, 367 + IEnumerable<AstNode> fs, AstExpr fe) 368 + { 369 + var contextBlock = context.Block; 370 + //cs is already stored in contextBlock, 371 + // the rules position cs always at the beginning, thus no need to handle cs. 372 + 373 + //At this point 374 + // { ce } iff (ce ∧ fs ∧ fe) 375 + // {tmp = ce} iff (ce ∧ fs ∧ ¬fe) 376 + // { } otherwise 377 + if (ce != null && fs != null) 378 + { 379 + if (fe != null) 380 + { 381 + contextBlock.Add(ce); 382 + } 383 + else 384 + { 385 + //Might at a later point become a warning 386 + var invocationPosition = context.Invocation.Position; 387 + context.ReportMessage(Message.Create(MessageSeverity.Info, 388 + String.Format( 389 + Resources.MacroFunctionExpander__UsedTemporaryVariable, 390 + HumanId), 391 + invocationPosition, MessageClasses.BlockMergingUsesVariable)); 392 + 393 + var tmpV = context.AllocateTemporaryVariable(); 394 + 395 + //Generate assignment to temporary variable 396 + var tmpVRef = context.Factory.Reference(invocationPosition, EntityRef.Variable.Local.Create(tmpV)); 397 + var assignTmpV = context.Factory.IndirectCall(invocationPosition,tmpVRef,PCall.Set); 398 + assignTmpV.Arguments.Add(ce); 399 + contextBlock.Add(assignTmpV); 400 + 401 + //Generate lookup of computed value 402 + ce = context.Factory.IndirectCall(invocationPosition,tmpVRef); 403 + } 404 + } 405 + 406 + //At this point 407 + // {fs} iff (fs) 408 + // { } otherwise 409 + 410 + if (fs != null) 411 + { 412 + foreach (var stmt in fs) 413 + contextBlock.Add(stmt); 414 + } 415 + 416 + //Finally determine expression 417 + // = fe iff (ce ∧ fe) 418 + // = ce iff (ce ∧ ¬fe ∧ ¬fs) 419 + // = tmp iff (ce ∧ ¬fe ∧ fs) 420 + // = ⊥ otherwise 421 + if (fe != null) 422 + contextBlock.Expression = fe; 423 + else if (ce != null) 424 + contextBlock.Expression = ce; //if tmp is involved, it has replaced ce 425 + else 426 + contextBlock.Expression = null; //macro session will cover this case 427 + } 428 + 429 + private PValue _invokeMacroFunction(CompilerTarget target, MacroContext context) 430 + { 431 + var macro = PrepareMacroImplementation(target.Loader, MacroFunction, context); 432 + 433 + //Execute macro (argument nodes of the invocation node are passed as arguments to the macro) 434 + var macroInvocation = context.Invocation; 435 + var arguments = 436 + macroInvocation.Arguments.Select(target.Loader.CreateNativePValue).ToArray(); 437 + var parentApplication = MacroFunction.ParentApplication; 438 + PValue astRaw; 439 + try 440 + { 441 + parentApplication._SuppressInitialization = true; 442 + astRaw = macro.IndirectCall(target.Loader, arguments); 443 + } 444 + finally 445 + { 446 + parentApplication._SuppressInitialization = false; 447 + } 448 + return astRaw; 449 + } 450 + } 451 + 452 + private class MacroFunctionExpander : MacroFunctionExpanderBase 453 + { 454 + public override void Initialize(CompilerTarget target, AstGetSet macroNode, bool justEffect) 455 + { 456 + var expansion = (AstExpand)macroNode; 457 + 458 + MacroFunction = null; 459 + 460 + EntityRef.Function functionRef; 461 + if (!expansion.Entity.TryGetFunction(out functionRef)) 462 + throw new InvalidOperationException(string.Format(Resources.MacroFunctionExpander_ExpectedFunctionReference, expansion.Entity)); 463 + PValue value; 464 + PFunction func; 465 + if (functionRef.TryGetEntity(target.Loader, out value) && (func = value.Value as PFunction) != null) 466 + { 467 + HumanId = functionRef.Id; 468 + MacroFunction = func; 469 + } 470 + else 471 + { 472 + target.Loader.ReportMessage( 473 + Message.Create( 474 + MessageSeverity.Error, 475 + String.Format( 476 + Resources.MacroFunctionExpander_MacroFunctionNotAvailable, 477 + functionRef, 478 + target.Function.Id, target.Loader.ParentApplication.Module.Name), 479 + macroNode.Position, MessageClasses.NoSuchMacroFunction)); 480 + HumanId = "could_not_resolve_macro_function"; 481 + } 482 + } 483 + } 484 + 485 + #endregion 486 + 487 + public AstNode ExpandMacro(AstGetSet invocation, bool justEffect) 488 + { 489 + var target = Target; 490 + var context = new MacroContext(this, invocation, justEffect); 491 + 492 + //Delegate actual expansion to appropriate expander 493 + var expander = _getExpander(invocation, target); 494 + 495 + if (expander != null) 496 + { 497 + expander.Initialize(target, invocation, justEffect); 498 + 499 + //Macro invocations need to be unique within a session 500 + if (_invocations.Contains(invocation)) 501 + { 502 + target.Loader.ReportMessage( 503 + Message.Create(MessageSeverity.Error, 504 + String.Format( 505 + Resources.MacroSession_MacroNotReentrant, 506 + expander.HumanId), 507 + invocation.Position, MessageClasses.MacroNotReentrant)); 508 + return CreateNeutralExpression(invocation); 509 + } 510 + _invocations.Add(invocation); 511 + 512 + T lockDownLexicalScope<T>(Func<T> action) 513 + { 514 + var cub = target.CurrentBlock; 515 + var r = action(); 516 + if(!ReferenceEquals(cub,target.CurrentBlock)) 517 + throw new PrexoniteException("Macro must restore previous lexical scope."); 518 + return r; 519 + } 520 + void lockDownLexicalScopeA(Action action) 521 + { 522 + lockDownLexicalScope<object>(() => 523 + { 524 + action(); 525 + return null; 526 + }); 527 + } 528 + 529 + //check if this macro is a partial application 530 + if (invocation.CheckNodeApplicationState().HasPlaceholders) 531 + { 532 + //Attempt to expand partial macro 533 + try 534 + { 535 + if (!lockDownLexicalScope(() => expander.TryExpandPartially(target, context))) 536 + { 537 + target.Loader.ReportMessage( 538 + Message.Create( 539 + MessageSeverity.Error, 540 + string.Format( 541 + Resources.MacroSession_MacroCannotBeAppliedPartially, 542 + expander.HumanId), invocation.Position, 543 + MessageClasses.PartialApplicationNotSupported)); 544 + return CreateNeutralExpression(invocation); 545 + } 546 + } 547 + catch (Exception e) 548 + { 549 + _setupDefaultExpression(context); 550 + _reportException(context, expander, e); 551 + } 552 + } 553 + else 554 + { 555 + //Actual macro expansion takes place here 556 + try 557 + { 558 + lockDownLexicalScopeA(() => expander.Expand(target, context)); 559 + } 560 + catch (Exception e) 561 + { 562 + _setupDefaultExpression(context); 563 + _reportException(context, expander, e); 564 + } 565 + } 566 + } 567 + 568 + //Sanitize output 569 + var ast = context.Block; 570 + 571 + //ensure that there is at least null being pushed onto the stack)) 572 + if (!justEffect && ast.Expression == null && !context.SuppressDefaultExpression) 573 + ast.Expression = CreateNeutralExpression(invocation); 574 + 575 + var node = AstNode._GetOptimizedNode(Target, ast); 576 + 577 + return node; 578 + } 579 + 580 + private static void _reportException(MacroContext context, IMacroExpander expander, 581 + Exception e) 582 + { 583 + context.ReportMessage(Message.Create(MessageSeverity.Error, 584 + String.Format( 585 + Resources.MacroSession_ExceptionDuringExpansionOfMacro, 586 + expander.HumanId, context.Function.LogicalId, 587 + e.Message), context.Invocation.Position, MessageClasses.ExceptionDuringCompilation)); 588 + #if DEBUG 589 + Console.WriteLine(e); 590 + #endif 591 + } 592 + 593 + private static void _setupDefaultExpression(MacroContext context) 594 + { 595 + context.Block.Clear(); 596 + context.Block.Expression = CreateNeutralExpression(context.Invocation); 597 + context.SuppressDefaultExpression = false; 598 + } 599 + 600 + public static AstGetSet CreateNeutralExpression(AstGetSet invocation) 601 + { 602 + var nullLiteral = new AstNull(invocation.File, invocation.Line, invocation.Column); 603 + var call = new AstIndirectCall(invocation.File, invocation.Line, invocation.Column, 604 + invocation.Call, nullLiteral); 605 + if (invocation.Call == PCall.Set) 606 + call.Arguments.Add(new AstNull(invocation.File, invocation.Line, invocation.Column)); 607 + 608 + return call; 609 + } 610 + 611 + private IMacroExpander _getExpander(AstGetSet macroNode, CompilerTarget target) 612 + { 613 + IMacroExpander expander = null; 614 + if (macroNode is AstExpand expansion) 615 + { 616 + if (expansion.Entity.TryGetMacroCommand(out _)) 617 + expander = new MacroCommandExpander(); 618 + else if (expansion.Entity.TryGetFunction(out _)) 619 + expander = new MacroFunctionExpander(); 620 + else 621 + _reportMacroNodeNotMacro(target, expansion.Entity.GetType().Name, macroNode); 622 + } 623 + else 624 + { 625 + _reportMacroNodeNotMacro(target, macroNode.GetType().Name, macroNode); 626 + } 627 + return expander; 628 + } 629 + 630 + private static void _reportMacroNodeNotMacro(CompilerTarget target, string implName, AstGetSet invocation) 631 + { 632 + target.Loader.ReportMessage( 633 + Message.Create(MessageSeverity.Error, 634 + String.Format( 635 + Resources.MacroSession_NotAMacro, 636 + implName), 637 + invocation.Position, MessageClasses.NotAMacro)); 638 + } 639 + 640 + /// <summary> 641 + /// Provides macro environment to its implementing function. The resulting closure 642 + /// implements the expansion of the macro. 643 + /// </summary> 644 + /// <param name = "sctx">The stack context to use for wrapping the context.</param> 645 + /// <param name = "func">The implementation of the macro.</param> 646 + /// <param name = "context">The macro context for this expansion.</param> 647 + /// <returns>A closure that implements the expansion of this macro.</returns> 648 + public static Closure PrepareMacroImplementation(StackContext sctx, PFunction func, 649 + MacroContext context) 650 + { 651 + var contextVar = 652 + CompilerTarget.CreateReadonlyVariable(sctx.CreateNativePValue(context)); 653 + 654 + var env = new SymbolTable<PVariable>(1) {{MacroAliases.ContextAlias, contextVar}}; 655 + 656 + var sharedVariables = 657 + func.Meta[PFunction.SharedNamesKey].List.Select(entry => env[entry.Text]). 658 + ToArray(); 659 + return new Closure(func, sharedVariables); 660 + } 661 + 662 + /// <summary> 663 + /// Stores an object in the macro session. It can later be retrieved via <see cref = "RetrieveFromTransport" />. 664 + /// </summary> 665 + /// <param name = "obj">The object to be stored.</param> 666 + /// <returns>The id with which to retrieve the object later.</returns> 667 + public int StoreForTransport(PValue obj) 668 + { 669 + if (obj == null) 670 + throw new ArgumentNullException(nameof(obj)); 671 + var transportId = _transportStore.Count; 672 + _transportStore.Add(obj); 673 + return transportId; 674 + } 675 + 676 + /// <summary> 677 + /// Returns an object previously stored via <see cref = "StoreForTransport" />. 678 + /// </summary> 679 + /// <param name = "id">The id as returned by <see cref = "StoreForTransport" /></param> 680 + /// <returns>The object stored before.</returns> 681 + public PValue RetrieveFromTransport(int id) 682 + { 683 + if (0 <= id && id < _transportStore.Count) 684 + return _transportStore[id]; 685 + else 686 + throw new PrexoniteException( 687 + string.Format("No object with id {0} in transport through this macro session.", 688 + id)); 689 + } 690 + } 688 691 }
+9 -9
Prexonite/Compiler/Parser.cs
··· 13 13 using Prexonite.Properties;//END SOURCE ARRAY 14 14 15 15 16 - #line 27 "C:\Users\chris\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 16 + #line 27 "F:\Users\Christian\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 17 17 18 18 // ReSharper disable RedundantUsingDirective 19 19 // ReSharper disable InconsistentNaming ··· 37 37 namespace Prexonite.Compiler { 38 38 39 39 40 - #line 44 "C:\Users\chris\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 40 + #line 44 "F:\Users\Christian\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 41 41 42 42 43 43 [System.Runtime.CompilerServices.CompilerGenerated] ··· 260 260 } 261 261 const int maxT = 105; 262 262 263 - #line 48 "C:\Users\chris\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 263 + #line 48 "F:\Users\Christian\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 264 264 265 265 const bool T = true; 266 266 const bool x = false; ··· 279 279 //SOURCE ARRAY 280 280 //END SOURCE ARRAY 281 281 282 - #line 60 "C:\Users\chris\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 282 + #line 60 "F:\Users\Christian\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 283 283 284 284 285 285 [DebuggerNonUserCode] ··· 318 318 #line default //END FRAME -->pragmas 319 319 320 320 321 - #line 94 "C:\Users\chris\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 321 + #line 94 "F:\Users\Christian\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 322 322 323 323 la = t; 324 324 } ··· 4125 4125 } 4126 4126 4127 4127 4128 - #line 133 "C:\Users\chris\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 4128 + #line 133 "F:\Users\Christian\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 4129 4129 4130 4130 4131 4131 public void Parse() { ··· 4137 4137 4138 4138 Prexonite(); 4139 4139 4140 - #line 139 "C:\Users\chris\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 4140 + #line 139 "F:\Users\Christian\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 4141 4141 4142 4142 Expect(0); 4143 4143 } ··· 4199 4199 {x,T,T,x, T,x,T,T, T,T,x,T, x,T,x,x, x,x,x,T, T,T,T,x, x,T,x,x, T,x,x,x, x,T,T,x, x,x,T,x, T,T,x,x, x,x,T,T, T,T,T,T, x,x,x,x, T,T,T,x, x,T,x,T, x,x,x,T, x,x,x,x, x,x,x,x, T,T,T,T, x,T,T,x, T,x,T,T, T,T,x,x, x,T,x,x, x,T,x,x, T,x,x,x, T,x,x}, 4200 4200 {x,x,x,x, x,x,x,x, x,x,T,T, x,x,T,x, x,x,x,x, x,x,x,x, x,T,x,T, T,x,x,x, x,x,T,x, x,x,x,T, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x} 4201 4201 4202 - #line 144 "C:\Users\chris\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 4202 + #line 144 "F:\Users\Christian\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 4203 4203 4204 4204 }; 4205 4205 } // end Parser ··· 4420 4420 case 187: s = "invalid Assignment"; break; 4421 4421 case 188: s = "invalid VariableDeclaration"; break; 4422 4422 4423 - #line 171 "C:\Users\chris\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 4423 + #line 171 "F:\Users\Christian\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 4424 4424 4425 4425 default: s = "error " + n; break; 4426 4426 }
+9 -9
Prexonite/Internal/Parser.cs
··· 7 7 using MessageSeverity = Prexonite.Compiler.MessageSeverity;//END SOURCE ARRAY 8 8 9 9 10 - #line 27 "C:\Users\chris\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 10 + #line 27 "F:\Users\Christian\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 11 11 12 12 // ReSharper disable RedundantUsingDirective 13 13 // ReSharper disable InconsistentNaming ··· 31 31 namespace Prexonite.Internal { 32 32 33 33 34 - #line 44 "C:\Users\chris\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 34 + #line 44 "F:\Users\Christian\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 35 35 36 36 37 37 [System.Runtime.CompilerServices.CompilerGenerated] ··· 60 60 } 61 61 const int maxT = 11; 62 62 63 - #line 48 "C:\Users\chris\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 63 + #line 48 "F:\Users\Christian\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 64 64 65 65 const bool T = true; 66 66 const bool x = false; ··· 79 79 //SOURCE ARRAY 80 80 //END SOURCE ARRAY 81 81 82 - #line 60 "C:\Users\chris\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 82 + #line 60 "F:\Users\Christian\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 83 83 84 84 85 85 [DebuggerNonUserCode] ··· 118 118 #line default //END FRAME -->pragmas 119 119 120 120 121 - #line 94 "C:\Users\chris\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 121 + #line 94 "F:\Users\Christian\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 122 122 123 123 la = t; 124 124 } ··· 255 255 } 256 256 257 257 258 - #line 133 "C:\Users\chris\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 258 + #line 133 "F:\Users\Christian\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 259 259 260 260 261 261 public void Parse() { ··· 267 267 268 268 PTypeExpression(); 269 269 270 - #line 139 "C:\Users\chris\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 270 + #line 139 "F:\Users\Christian\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 271 271 272 272 Expect(0); 273 273 } ··· 280 280 {x,T,T,T, T,T,T,T, x,x,x,x, x}, 281 281 {x,x,x,x, x,x,x,x, x,x,T,x, x} 282 282 283 - #line 144 "C:\Users\chris\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 283 + #line 144 "F:\Users\Christian\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 284 284 285 285 }; 286 286 } // end Parser ··· 326 326 case 12: s = "invalid Expr"; break; 327 327 case 13: s = "invalid Boolean"; break; 328 328 329 - #line 171 "C:\Users\chris\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 329 + #line 171 "F:\Users\Christian\Documents\GitHub\prx\Tools\Parser.frame" //FRAME 330 330 331 331 default: s = "error " + n; break; 332 332 }
+8 -8
Prexonite/Prexonite__gen.atg
··· 1 1 //-- GENERATED BY PxCoco -merge --// 2 2 //-- make sure to modify the source files instead of this one! --// 3 3 4 - #file:C:\Users\chris\Documents\GitHub\prx\Prexonite\Compiler\Grammar\Header.atg# 4 + #file:F:\Users\Christian\Documents\GitHub\prx\Prexonite\Compiler\Grammar\Header.atg# 5 5 /* 6 6 * Prexonite, a scripting engine (Scripting Language -> Bytecode -> Virtual Machine) 7 7 * Copyright (C) 2007 Christian "SealedSun" Klauser ··· 45 45 46 46 47 47 48 - #file:C:\Users\chris\Documents\GitHub\prx\Prexonite\Compiler\Grammar\Scanner.atg# 48 + #file:F:\Users\Christian\Documents\GitHub\prx\Prexonite\Compiler\Grammar\Scanner.atg# 49 49 /* 50 50 * Prexonite, a scripting engine (Scripting Language -> Bytecode -> Virtual Machine) 51 51 * Copyright (C) 2007 Christian "SealedSun" Klauser ··· 198 198 /*------------------------------*/ 199 199 /*---- Parser ------------------*/ 200 200 PRODUCTIONS 201 - #file:C:\Users\chris\Documents\GitHub\prx\Prexonite\Compiler\Grammar\Parser.Assembler.atg# 201 + #file:F:\Users\Christian\Documents\GitHub\prx\Prexonite\Compiler\Grammar\Parser.Assembler.atg# 202 202 /* 203 203 * Prexonite, a scripting engine (Scripting Language -> Bytecode -> Virtual Machine) 204 204 * Copyright (C) 2007 Christian "SealedSun" Klauser ··· 449 449 = 450 450 AsmId<out qualid> 451 451 . 452 - #file:C:\Users\chris\Documents\GitHub\prx\Prexonite\Compiler\Grammar\Parser.Expression.atg# 452 + #file:F:\Users\Christian\Documents\GitHub\prx\Prexonite\Compiler\Grammar\Parser.Expression.atg# 453 453 /* 454 454 * Prexonite, a scripting engine (Scripting Language -> Bytecode -> Virtual Machine) 455 455 * Copyright (C) 2007 Christian "SealedSun" Klauser ··· 1008 1008 | ExplicitTypeExpr<out type> (. args.Add(type); .) 1009 1009 | lpar Expr<out expr> rpar (. args.Add(expr); .) 1010 1010 . 1011 - #file:C:\Users\chris\Documents\GitHub\prx\Prexonite\Compiler\Grammar\Parser.GlobalScope.atg# 1011 + #file:F:\Users\Christian\Documents\GitHub\prx\Prexonite\Compiler\Grammar\Parser.GlobalScope.atg# 1012 1012 /* 1013 1013 * Prexonite, a scripting engine (Scripting Language -> Bytecode -> Virtual Machine) 1014 1014 * Copyright (C) 2007 Christian "SealedSun" Klauser ··· 2132 2132 .) 2133 2133 ) (. _updateNamespace(scope, exportBuilder); .) 2134 2134 . 2135 - #file:C:\Users\chris\Documents\GitHub\prx\Prexonite\Compiler\Grammar\Parser.Helper.atg# 2135 + #file:F:\Users\Christian\Documents\GitHub\prx\Prexonite\Compiler\Grammar\Parser.Helper.atg# 2136 2136 /* 2137 2137 * Prexonite, a scripting engine (Scripting Language -> Bytecode -> Virtual Machine) 2138 2138 * Copyright (C) 2007 Christian "SealedSun" Klauser ··· 2323 2323 | 2324 2324 Null (. expr = new MExpr.MAtom(GetPosition(), null); .) 2325 2325 . 2326 - #file:C:\Users\chris\Documents\GitHub\prx\Prexonite\Compiler\Grammar\Parser.Statement.atg# 2326 + #file:F:\Users\Christian\Documents\GitHub\prx\Prexonite\Compiler\Grammar\Parser.Statement.atg# 2327 2327 /* 2328 2328 * Prexonite, a scripting engine (Scripting Language -> Bytecode -> Virtual Machine) 2329 2329 * Copyright (C) 2007 Christian "SealedSun" Klauser ··· 3026 3026 ) 3027 3027 ] 3028 3028 . 3029 - #file:C:\Users\chris\Documents\GitHub\prx\Prexonite\Compiler\Grammar\Footer.atg# 3029 + #file:F:\Users\Christian\Documents\GitHub\prx\Prexonite\Compiler\Grammar\Footer.atg# 3030 3030 /* 3031 3031 * Prexonite, a scripting engine (Scripting Language -> Bytecode -> Virtual Machine) 3032 3032 * Copyright (C) 2007 Christian "SealedSun" Klauser
+1176 -1138
Prexonite/Properties/Resources.Designer.cs
··· 1 - //------------------------------------------------------------------------------ 2 - // <auto-generated> 3 - // This code was generated by a tool. 4 - // Runtime Version:4.0.30319.42000 5 - // 6 - // Changes to this file may cause incorrect behavior and will be lost if 7 - // the code is regenerated. 8 - // </auto-generated> 9 - //------------------------------------------------------------------------------ 10 - 11 - namespace Prexonite.Properties { 12 - using System; 13 - 14 - 15 - /// <summary> 16 - /// A strongly-typed resource class, for looking up localized strings, etc. 17 - /// </summary> 18 - // This class was auto-generated by the StronglyTypedResourceBuilder 19 - // class via a tool like ResGen or Visual Studio. 20 - // To add or remove a member, edit your .ResX file then rerun ResGen 21 - // with the /str option, or rebuild your VS project. 22 - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 - public class Resources { 26 - 27 - private static global::System.Resources.ResourceManager resourceMan; 28 - 29 - private static global::System.Globalization.CultureInfo resourceCulture; 30 - 31 - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 - internal Resources() { 33 - } 34 - 35 - /// <summary> 36 - /// Returns the cached ResourceManager instance used by this class. 37 - /// </summary> 38 - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 - public static global::System.Resources.ResourceManager ResourceManager { 40 - get { 41 - if (object.ReferenceEquals(resourceMan, null)) { 42 - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Prexonite.Properties.Resources", typeof(Resources).Assembly); 43 - resourceMan = temp; 44 - } 45 - return resourceMan; 46 - } 47 - } 48 - 49 - /// <summary> 50 - /// Overrides the current thread's CurrentUICulture property for all 51 - /// resource lookups using this strongly typed resource class. 52 - /// </summary> 53 - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 - public static global::System.Globalization.CultureInfo Culture { 55 - get { 56 - return resourceCulture; 57 - } 58 - set { 59 - resourceCulture = value; 60 - } 61 - } 62 - 63 - /// <summary> 64 - /// Looks up a localized string similar to In partial applications of lazy coalescence expressions, only one placeholder at the end of a sequence is allowed. Consider using a lambda expression instead.. 65 - /// </summary> 66 - public static string AstCoalescence__reportInvalidPlaceholders { 67 - get { 68 - return ResourceManager.GetString("AstCoalescence__reportInvalidPlaceholders", resourceCulture); 69 - } 70 - } 71 - 72 - /// <summary> 73 - /// Looks up a localized string similar to Entity must be a macro to be expanded.. 74 - /// </summary> 75 - public static string AstExpand_EntityMustBeMacro { 76 - get { 77 - return ResourceManager.GetString("AstExpand_EntityMustBeMacro", resourceCulture); 78 - } 79 - } 80 - 81 - /// <summary> 82 - /// Looks up a localized string similar to Expected {0} to be implemented as an LValue.. 83 - /// </summary> 84 - public static string AstFactoryBase__resolveImplementation_LValueExpected { 85 - get { 86 - return ResourceManager.GetString("AstFactoryBase__resolveImplementation_LValueExpected", resourceCulture); 87 - } 88 - } 89 - 90 - /// <summary> 91 - /// Looks up a localized string similar to Type expression expected on the right-hand side of a type cast.. 92 - /// </summary> 93 - public static string AstFactoryBase_BinaryOperation_TypeExprExpected { 94 - get { 95 - return ResourceManager.GetString("AstFactoryBase_BinaryOperation_TypeExprExpected", resourceCulture); 96 - } 97 - } 98 - 99 - /// <summary> 100 - /// Looks up a localized string similar to Right hand side of a cast operation must be a type expression.. 101 - /// </summary> 102 - public static string AstFactoryBase_ModifyingAssignment_TypeExpressionExpected { 103 - get { 104 - return ResourceManager.GetString("AstFactoryBase_ModifyingAssignment_TypeExpressionExpected", resourceCulture); 105 - } 106 - } 107 - 108 - /// <summary> 109 - /// Looks up a localized string similar to The not operator must produce an LValue to be used in a negative typecheck.. 110 - /// </summary> 111 - public static string AstFactoryBase_UnaryOperation_NotOperatorForTypecheckRequiresLValue { 112 - get { 113 - return ResourceManager.GetString("AstFactoryBase_UnaryOperation_NotOperatorForTypecheckRequiresLValue", resourceCulture); 114 - } 115 - } 116 - 117 - /// <summary> 118 - /// Looks up a localized string similar to Target of an increment or decrement operations must be an LValue and a get-call.. 119 - /// </summary> 120 - public static string AstFactoryBase_UnaryOperation_Target_must_be_LValue { 121 - get { 122 - return ResourceManager.GetString("AstFactoryBase_UnaryOperation_Target_must_be_LValue", resourceCulture); 123 - } 124 - } 125 - 126 - /// <summary> 127 - /// Looks up a localized string similar to Optimization of the element expression in the foreach head resulted in a non-GetSet expression. Try to use a simpler expression.. 128 - /// </summary> 129 - public static string AstForeachLoop_DoEmitCode_ElementTooComplicated { 130 - get { 131 - return ResourceManager.GetString("AstForeachLoop_DoEmitCode_ElementTooComplicated", resourceCulture); 132 - } 133 - } 134 - 135 - /// <summary> 136 - /// Looks up a localized string similar to Cannot assign to a reference to a {0}.. 137 - /// </summary> 138 - public static string AstGetSetReference_CannotAssignReference { 139 - get { 140 - return ResourceManager.GetString("AstGetSetReference_CannotAssignReference", resourceCulture); 141 - } 142 - } 143 - 144 - /// <summary> 145 - /// Looks up a localized string similar to Cannot create a reference to {0} {1}.. 146 - /// </summary> 147 - public static string AstGetSetReference_CannotCreateReference { 148 - get { 149 - return ResourceManager.GetString("AstGetSetReference_CannotCreateReference", resourceCulture); 150 - } 151 - } 152 - 153 - /// <summary> 154 - /// Looks up a localized string similar to Reference to macro command {0} detected. Prexonite version {1} treats this as a partial application. This behavior might change in the future. Use partial application syntax explicitly {0}(?) or use the {2} command to obtain a reference to the macro.. 155 - /// </summary> 156 - public static string AstGetSetReference_ReferenceToMacroTreatedAsPartialApplication { 157 - get { 158 - return ResourceManager.GetString("AstGetSetReference_ReferenceToMacroTreatedAsPartialApplication", resourceCulture); 159 - } 160 - } 161 - 162 - /// <summary> 163 - /// Looks up a localized string similar to Condition must not be null.. 164 - /// </summary> 165 - public static string AstLazyLogical__Condition_must_not_be_null { 166 - get { 167 - return ResourceManager.GetString("AstLazyLogical__Condition_must_not_be_null", resourceCulture); 168 - } 169 - } 170 - 171 - /// <summary> 172 - /// Looks up a localized string similar to targetLabel must neither be null nor empty.. 173 - /// </summary> 174 - public static string AstLazyLogical__targetLabel_must_neither_be_null_nor_empty { 175 - get { 176 - return ResourceManager.GetString("AstLazyLogical__targetLabel_must_neither_be_null_nor_empty", resourceCulture); 177 - } 178 - } 179 - 180 - /// <summary> 181 - /// Looks up a localized string similar to alternativeLabel may neither be null nor empty.. 182 - /// </summary> 183 - public static string AstLazyLogical_alternativeLabel_may_neither_be_null_nor_empty { 184 - get { 185 - return ResourceManager.GetString("AstLazyLogical_alternativeLabel_may_neither_be_null_nor_empty", resourceCulture); 186 - } 187 - } 188 - 189 - /// <summary> 190 - /// Looks up a localized string similar to The lazy logical expression {0} must implement this method/property to support partial application.. 191 - /// </summary> 192 - public static string AstLazyLogical_CreatePrefixMustBeImplementedForPartialApplication { 193 - get { 194 - return ResourceManager.GetString("AstLazyLogical_CreatePrefixMustBeImplementedForPartialApplication", resourceCulture); 195 - } 196 - } 197 - 198 - /// <summary> 199 - /// Looks up a localized string similar to Partial applications of logical statements must be either pure and-chains or pure or-chains.. 200 - /// </summary> 201 - public static string AstLazyLogical_EmitCode_PureChainsExpected { 202 - get { 203 - return ResourceManager.GetString("AstLazyLogical_EmitCode_PureChainsExpected", resourceCulture); 204 - } 205 - } 206 - 207 - /// <summary> 208 - /// Looks up a localized string similar to In partial applications of lazy expressions, only one placeholder at the end of a sequence is allowed. Consider using a lambda expression instead.. 209 - /// </summary> 210 - public static string AstLazyLogical_placeholderOnlyAtTheEnd { 211 - get { 212 - return ResourceManager.GetString("AstLazyLogical_placeholderOnlyAtTheEnd", resourceCulture); 213 - } 214 - } 215 - 216 - /// <summary> 217 - /// Looks up a localized string similar to The assignment modifier {0} is not supported.. 218 - /// </summary> 219 - public static string AstModifyingAssignment_AssignmentModifierNotSupported { 220 - get { 221 - return ResourceManager.GetString("AstModifyingAssignment_AssignmentModifierNotSupported", resourceCulture); 222 - } 223 - } 224 - 225 - /// <summary> 226 - /// Looks up a localized string similar to Invalid modifying assignment: No RHS.. 227 - /// </summary> 228 - public static string AstModifyingAssignment_No_RHS { 229 - get { 230 - return ResourceManager.GetString("AstModifyingAssignment_No_RHS", resourceCulture); 231 - } 232 - } 233 - 234 - /// <summary> 235 - /// Looks up a localized string similar to Compiler target cannot be null.. 236 - /// </summary> 237 - public static string AstNode__GetOptimizedNode_CompilerTarget_null { 238 - get { 239 - return ResourceManager.GetString("AstNode__GetOptimizedNode_CompilerTarget_null", resourceCulture); 240 - } 241 - } 242 - 243 - /// <summary> 244 - /// Looks up a localized string similar to Expression to be optimized can not be null.. 245 - /// </summary> 246 - public static string AstNode__GetOptimizedNode_Expression_null { 247 - get { 248 - return ResourceManager.GetString("AstNode__GetOptimizedNode_Expression_null", resourceCulture); 249 - } 250 - } 251 - 252 - /// <summary> 253 - /// Looks up a localized string similar to Compiler target must not be null.. 254 - /// </summary> 255 - public static string AstNode_Compiler_target_must_not_be_null { 256 - get { 257 - return ResourceManager.GetString("AstNode_Compiler_target_must_not_be_null", resourceCulture); 258 - } 259 - } 260 - 261 - /// <summary> 262 - /// Looks up a localized string similar to No implementation defined for operator `{0}`. 263 - /// </summary> 264 - public static string AstNode_NoImplementationForOperator { 265 - get { 266 - return ResourceManager.GetString("AstNode_NoImplementationForOperator", resourceCulture); 267 - } 268 - } 269 - 270 - /// <summary> 271 - /// Looks up a localized string similar to A placeholder index cannot be negtive. 272 - /// </summary> 273 - public static string AstPlaceholder_PlaceholdeIndexNegative { 274 - get { 275 - return ResourceManager.GetString("AstPlaceholder_PlaceholdeIndexNegative", resourceCulture); 276 - } 277 - } 278 - 279 - /// <summary> 280 - /// Looks up a localized string similar to Cannot load a reference to a macro command. Partial application might be possible, depending on the macro command in question.. 281 - /// </summary> 282 - public static string AstReference_MacroCommandReferenceNotPossible { 283 - get { 284 - return ResourceManager.GetString("AstReference_MacroCommandReferenceNotPossible", resourceCulture); 285 - } 286 - } 287 - 288 - /// <summary> 289 - /// Looks up a localized string similar to Detected possible return (yield) from within a protected block (try-catch-finally, using, foreach). This Prexonite implementation cannot guarantee that cleanup code is executed. . 290 - /// </summary> 291 - public static string AstReturn_Warn_YieldInProtectedBlock { 292 - get { 293 - return ResourceManager.GetString("AstReturn_Warn_YieldInProtectedBlock", resourceCulture); 294 - } 295 - } 296 - 297 - /// <summary> 298 - /// Looks up a localized string similar to Unary operator nodes for non-increment/decrement should not exist. This error indicates an error in the compiler.. 299 - /// </summary> 300 - public static string AstUnaryOperator__NonIncrementDecrement { 301 - get { 302 - return ResourceManager.GetString("AstUnaryOperator__NonIncrementDecrement", resourceCulture); 303 - } 304 - } 305 - 306 - /// <summary> 307 - /// Looks up a localized string similar to The symbol {0} has not been resolved.. 308 - /// </summary> 309 - public static string AstUnresolved_The_symbol__0__has_not_been_resolved_ { 310 - get { 311 - return ResourceManager.GetString("AstUnresolved_The_symbol__0__has_not_been_resolved_", resourceCulture); 312 - } 313 - } 314 - 315 - /// <summary> 316 - /// Looks up a localized string similar to call\macro must be supplied a macro reference.. 317 - /// </summary> 318 - public static string CallMacro_call_macro_must_be_supplied_a_macro_reference { 319 - get { 320 - return ResourceManager.GetString("CallMacro_call_macro_must_be_supplied_a_macro_reference", resourceCulture); 321 - } 322 - } 323 - 324 - /// <summary> 325 - /// Looks up a localized string similar to call\macro called from {0}. call\macro can only be called from a macro context, i.e., from a macro function or an inner function of a macro.. 326 - /// </summary> 327 - public static string CallMacro_CalledFromNonMacro { 328 - get { 329 - return ResourceManager.GetString("CallMacro_CalledFromNonMacro", resourceCulture); 330 - } 331 - } 332 - 333 - /// <summary> 334 - /// Looks up a localized string similar to Used in this way, {0} has the form {0}([],macroRef,[justEffect?,call?],...).. 335 - /// </summary> 336 - public static string CallMacro_errorUsageFullRef { 337 - get { 338 - return ResourceManager.GetString("CallMacro_errorUsageFullRef", resourceCulture); 339 - } 340 - } 341 - 342 - /// <summary> 343 - /// Looks up a localized string similar to Used in this way, {0} has the form {0}([macroPrototype(...),justEffect?,call?],...).. 344 - /// </summary> 345 - public static string CallMacro_errorUsagePrototype { 346 - get { 347 - return ResourceManager.GetString("CallMacro_errorUsagePrototype", resourceCulture); 348 - } 349 - } 350 - 351 - /// <summary> 352 - /// Looks up a localized string similar to The macro prototype must be known at compile-time, it must not be a placeholder.. 353 - /// </summary> 354 - public static string CallMacro_notOnPlaceholder { 355 - get { 356 - return ResourceManager.GetString("CallMacro_notOnPlaceholder", resourceCulture); 357 - } 358 - } 359 - 360 - /// <summary> 361 - /// Looks up a localized string similar to Due to an internal limitation, the index of a placeholder in the macro prototype&apos;s argument list inside {0} cannot be inferred. Specify the placeholders index explicitly (e.g., ?0, ?1, etc.).. 362 - /// </summary> 363 - public static string CallMacro_SpecifyPlaceholderIndexExplicitly { 364 - get { 365 - return ResourceManager.GetString("CallMacro_SpecifyPlaceholderIndexExplicitly", resourceCulture); 366 - } 367 - } 368 - 369 - /// <summary> 370 - /// Looks up a localized string similar to call\star must at least pass through one argument (the call target). It has been instructed to pass through {0} arguments.. 371 - /// </summary> 372 - public static string CallStar__invalid_PassThrough { 373 - get { 374 - return ResourceManager.GetString("CallStar__invalid_PassThrough", resourceCulture); 375 - } 376 - } 377 - 378 - /// <summary> 379 - /// Looks up a localized string similar to {0} requires at least one argument, the call\* command/function to invoke.. 380 - /// </summary> 381 - public static string CallStar_usage { 382 - get { 383 - return ResourceManager.GetString("CallStar_usage", resourceCulture); 384 - } 385 - } 386 - 387 - /// <summary> 388 - /// Looks up a localized string similar to Due to an internal limitation, {0} and {1} cannot be used in an expression inside a loop, only as a statement.. 389 - /// </summary> 390 - public static string CallSubInterpret_asExpressionInLoop { 391 - get { 392 - return ResourceManager.GetString("CallSubInterpret_asExpressionInLoop", resourceCulture); 393 - } 394 - } 395 - 396 - /// <summary> 397 - /// Looks up a localized string similar to {0} requires one argument.. 398 - /// </summary> 399 - public static string CallSubInterpret_OneArgument { 400 - get { 401 - return ResourceManager.GetString("CallSubInterpret_OneArgument", resourceCulture); 402 - } 403 - } 404 - 405 - /// <summary> 406 - /// Looks up a localized string similar to Legacy part of parser cannot deal with symbol {0}. A call symbol was expected.. 407 - /// </summary> 408 - public static string CompilerTarget__CreateIncompatibleSymbolError_IncompatibleSymbol { 409 - get { 410 - return ResourceManager.GetString("CompilerTarget__CreateIncompatibleSymbolError_IncompatibleSymbol", resourceCulture); 411 - } 412 - } 413 - 414 - /// <summary> 415 - /// Looks up a localized string similar to When creating a compiler target, the supplied function must match the application targetted by the loader.. 416 - /// </summary> 417 - public static string CompilerTarget_Cannot_create_for_foreign_function { 418 - get { 419 - return ResourceManager.GetString("CompilerTarget_Cannot_create_for_foreign_function", resourceCulture); 420 - } 421 - } 422 - 423 - /// <summary> 424 - /// Looks up a localized string similar to Parameter list of function {0} contains {1} at position {2}. The name {1} is reserved for the local variable holding the argument list.. 425 - /// </summary> 426 - public static string CompilerTarget_ParameterNameReserved { 427 - get { 428 - return ResourceManager.GetString("CompilerTarget_ParameterNameReserved", resourceCulture); 429 - } 430 - } 431 - 432 - /// <summary> 433 - /// Looks up a localized string similar to Invalid key in source for symbol store.. 434 - /// </summary> 435 - public static string ConflictUnionFallbackStore__unifySymbols_Invalid_key_in_source_for_symbol_store_ { 436 - get { 437 - return ResourceManager.GetString("ConflictUnionFallbackStore__unifySymbols_Invalid_key_in_source_for_symbol_store_", resourceCulture); 438 - } 439 - } 440 - 441 - /// <summary> 442 - /// Looks up a localized string similar to A stream that is not readable cannot be used as a source.. 443 - /// </summary> 444 - public static string Exception_StreamSource_CannotUseWriteOnlyStream { 445 - get { 446 - return ResourceManager.GetString("Exception_StreamSource_CannotUseWriteOnlyStream", resourceCulture); 447 - } 448 - } 449 - 450 - /// <summary> 451 - /// Looks up a localized string similar to Capacity must be strictly positive.. 452 - /// </summary> 453 - public static string LastAccessCache_CapacityMustBePositive { 454 - get { 455 - return ResourceManager.GetString("LastAccessCache_CapacityMustBePositive", resourceCulture); 456 - } 457 - } 458 - 459 - /// <summary> 460 - /// Looks up a localized string similar to //PRX 461 - /// 462 - ///Name prx::v1; 463 - /// 464 - ///declare { 465 - /// command: 466 - /// print,println, 467 - /// meta, 468 - /// boxed, 469 - /// string_concat, 470 - /// concat, 471 - /// map, 472 - /// select, 473 - /// foldl, 474 - /// foldr, 475 - /// dispose, 476 - /// call\perform, 477 - /// thunk, 478 - /// asthunk, 479 - /// force, 480 - /// toseq, 481 - /// call\member\perform, 482 - /// caller, 483 - /// pair, 484 - /// unbind, 485 - /// sort, 486 - /// orderby, 487 - /// LoadAssembly, 488 - /// debug, 489 - /// setcenter, 490 - /// setleft, 491 - /// setright, 492 - /// all, 493 - /// where, 494 - /// skip, 495 - /// limit, 496 - /// take, 497 - /// abs, 498 - /// ceiling, 499 - /// exp, 500 - /// floor, 501 - /// log, 502 - /// max, 503 - /// min, 504 - /// pi, 505 - /// round, 506 - /// sin, 507 - /// cos, 508 - /// sqrt, 509 - /// tan, 510 - /// char, 511 - /// count, 512 - /// distinct, 513 - /// u [rest of string was truncated]&quot;;. 514 - /// </summary> 515 - public static string legacy_symbols { 516 - get { 517 - return ResourceManager.GetString("legacy_symbols", resourceCulture); 518 - } 519 - } 520 - 521 - /// <summary> 522 - /// Looks up a localized string similar to {1}begin compiling {0} [Path: {2} ]. 523 - /// </summary> 524 - public static string Loader__begin_compiling { 525 - get { 526 - return ResourceManager.GetString("Loader__begin_compiling", resourceCulture); 527 - } 528 - } 529 - 530 - /// <summary> 531 - /// Looks up a localized string similar to {1}end compiling {0}. 532 - /// </summary> 533 - public static string Loader__end_compiling { 534 - get { 535 - return ResourceManager.GetString("Loader__end_compiling", resourceCulture); 536 - } 537 - } 538 - 539 - /// <summary> 540 - /// Looks up a localized string similar to Cannot find macro command named `{0}`. 541 - /// </summary> 542 - public static string MacroCommandExpander_CannotFindMacro { 543 - get { 544 - return ResourceManager.GetString("MacroCommandExpander_CannotFindMacro", resourceCulture); 545 - } 546 - } 547 - 548 - /// <summary> 549 - /// Looks up a localized string similar to MacroCommandExpander expected macro command entity. Got {0} instead.. 550 - /// </summary> 551 - public static string MacroCommandExpander_MacroCommandExpected { 552 - get { 553 - return ResourceManager.GetString("MacroCommandExpander_MacroCommandExpected", resourceCulture); 554 - } 555 - } 556 - 557 - /// <summary> 558 - /// Looks up a localized string similar to Cannot establish macro context outside of macro.. 559 - /// </summary> 560 - public static string MacroContextExtensions_EstablishMacroContext_OutsideOfMacro { 561 - get { 562 - return ResourceManager.GetString("MacroContextExtensions_EstablishMacroContext_OutsideOfMacro", resourceCulture); 563 - } 564 - } 565 - 566 - /// <summary> 567 - /// Looks up a localized string similar to Macro {0} uses temporary variable to ensure that expression from `context.Block` is evaluated before statements from macro return value.. 568 - /// </summary> 569 - public static string MacroFunctionExpander__UsedTemporaryVariable { 570 - get { 571 - return ResourceManager.GetString("MacroFunctionExpander__UsedTemporaryVariable", resourceCulture); 572 - } 573 - } 574 - 575 - /// <summary> 576 - /// Looks up a localized string similar to MacroFunctionExpander expected reference to function, got {0} instead.. 577 - /// </summary> 578 - public static string MacroFunctionExpander_ExpectedFunctionReference { 579 - get { 580 - return ResourceManager.GetString("MacroFunctionExpander_ExpectedFunctionReference", resourceCulture); 581 - } 582 - } 583 - 584 - /// <summary> 585 - /// Looks up a localized string similar to The macro function {0} was called from function {1} but is not available at compile time (from module {2}).. 586 - /// </summary> 587 - public static string MacroFunctionExpander_MacroFunctionNotAvailable { 588 - get { 589 - return ResourceManager.GetString("MacroFunctionExpander_MacroFunctionNotAvailable", resourceCulture); 590 - } 591 - } 592 - 593 - /// <summary> 594 - /// Looks up a localized string similar to Partial macro must return a boolean value, indicating whether it can handle the partial application. Assuming it cannot.. 595 - /// </summary> 596 - public static string MacroFunctionExpander_PartialMacroMustIndicateSuccessWithBoolean { 597 - get { 598 - return ResourceManager.GetString("MacroFunctionExpander_PartialMacroMustIndicateSuccessWithBoolean", resourceCulture); 599 - } 600 - } 601 - 602 - /// <summary> 603 - /// Looks up a localized string similar to Exception during expansion of macro {0} in function {1}: {2}. 604 - /// </summary> 605 - public static string MacroSession_ExceptionDuringExpansionOfMacro { 606 - get { 607 - return ResourceManager.GetString("MacroSession_ExceptionDuringExpansionOfMacro", resourceCulture); 608 - } 609 - } 610 - 611 - /// <summary> 612 - /// Looks up a localized string similar to The macro {0} cannot be applied partially.. 613 - /// </summary> 614 - public static string MacroSession_MacroCannotBeAppliedPartially { 615 - get { 616 - return ResourceManager.GetString("MacroSession_MacroCannotBeAppliedPartially", resourceCulture); 617 - } 618 - } 619 - 620 - /// <summary> 621 - /// Looks up a localized string similar to AstMacroInvocation.EmitCode is not reentrant. The invocation node for the macro {0} has been expanded already. Use GetCopy() to operate on a copy of this macro invocation.. 622 - /// </summary> 623 - public static string MacroSession_MacroNotReentrant { 624 - get { 625 - return ResourceManager.GetString("MacroSession_MacroNotReentrant", resourceCulture); 626 - } 627 - } 628 - 629 - /// <summary> 630 - /// Looks up a localized string similar to Cannot apply {0} as a macro at compile time.. 631 - /// </summary> 632 - public static string MacroSession_NotAMacro { 633 - get { 634 - return ResourceManager.GetString("MacroSession_NotAMacro", resourceCulture); 635 - } 636 - } 637 - 638 - /// <summary> 639 - /// Looks up a localized string similar to A MetaEntry list must not contain null references.. 640 - /// </summary> 641 - public static string MetaEntry_NullReferenceInList { 642 - get { 643 - return ResourceManager.GetString("MetaEntry_NullReferenceInList", resourceCulture); 644 - } 645 - } 646 - 647 - /// <summary> 648 - /// Looks up a localized string similar to Module id cannot be null or empty.. 649 - /// </summary> 650 - public static string ModuleName_Module_id_cannot_be_null_or_empty_ { 651 - get { 652 - return ResourceManager.GetString("ModuleName_Module_id_cannot_be_null_or_empty_", resourceCulture); 653 - } 654 - } 655 - 656 - /// <summary> 657 - /// Looks up a localized string similar to Must supply an object to be transported to {0}.. 658 - /// </summary> 659 - public static string Pack_Usage_obj_missing { 660 - get { 661 - return ResourceManager.GetString("Pack_Usage_obj_missing", resourceCulture); 662 - } 663 - } 664 - 665 - /// <summary> 666 - /// Looks up a localized string similar to Cannot create a reference to a {0}.. 667 - /// </summary> 668 - public static string Parser__assembleReference_CannotCreateReferenceToSymbol { 669 - get { 670 - return ResourceManager.GetString("Parser__assembleReference_CannotCreateReferenceToSymbol", resourceCulture); 671 - } 672 - } 673 - 674 - /// <summary> 675 - /// Looks up a localized string similar to Macro definition is not an LValue (necessary for it to be converted to a partial application). 676 - /// </summary> 677 - public static string Parser__assembleReference_MacroDefinitionNotLValue { 678 - get { 679 - return ResourceManager.GetString("Parser__assembleReference_MacroDefinitionNotLValue", resourceCulture); 680 - } 681 - } 682 - 683 - /// <summary> 684 - /// Looks up a localized string similar to The symbol {0} is not defined.. 685 - /// </summary> 686 - public static string Parser__assembleReference_SymbolNotDefined { 687 - get { 688 - return ResourceManager.GetString("Parser__assembleReference_SymbolNotDefined", resourceCulture); 689 - } 690 - } 691 - 692 - /// <summary> 693 - /// Looks up a localized string similar to Cannot use {0} like a constructor.. 694 - /// </summary> 695 - public static string Parser__CannotUseExpressionAsAConstructor { 696 - get { 697 - return ResourceManager.GetString("Parser__CannotUseExpressionAsAConstructor", resourceCulture); 698 - } 699 - } 700 - 701 - /// <summary> 702 - /// Looks up a localized string similar to Failed to transform object creation expression.. 703 - /// </summary> 704 - public static string Parser__fallbackObjectCreation_Failed { 705 - get { 706 - return ResourceManager.GetString("Parser__fallbackObjectCreation_Failed", resourceCulture); 707 - } 708 - } 709 - 710 - /// <summary> 711 - /// Looks up a localized string similar to Unknown operator alias in assembler code: {0}.{1}. 712 - /// </summary> 713 - public static string Parser_addOpAlias_Unknown { 714 - get { 715 - return ResourceManager.GetString("Parser_addOpAlias_Unknown", resourceCulture); 716 - } 717 - } 718 - 719 - /// <summary> 720 - /// Looks up a localized string similar to Cannot parse message symbol from {0}.. 721 - /// </summary> 722 - public static string Parser_Cannot_parse_message_symbol { 723 - get { 724 - return ResourceManager.GetString("Parser_Cannot_parse_message_symbol", resourceCulture); 725 - } 726 - } 727 - 728 - /// <summary> 729 - /// Looks up a localized string similar to Cannot parse source position from {0}.. 730 - /// </summary> 731 - public static string Parser_Cannot_parse_source_position { 732 - get { 733 - return ResourceManager.GetString("Parser_Cannot_parse_source_position", resourceCulture); 734 - } 735 - } 736 - 737 - /// <summary> 738 - /// Looks up a localized string similar to Cannot parse symbol from {0}.. 739 - /// </summary> 740 - public static string Parser_Cannot_parse_symbol_from { 741 - get { 742 - return ResourceManager.GetString("Parser_Cannot_parse_symbol_from", resourceCulture); 743 - } 744 - } 745 - 746 - /// <summary> 747 - /// Looks up a localized string similar to Cannot expand {0} at compile time.. 748 - /// </summary> 749 - public static string Parser_CannotExpandAtCompileTime { 750 - get { 751 - return ResourceManager.GetString("Parser_CannotExpandAtCompileTime", resourceCulture); 752 - } 753 - } 754 - 755 - /// <summary> 756 - /// Looks up a localized string similar to Namespace {0} cannot be extended because it is a merged view of two originally distinct namespaces.. 757 - /// </summary> 758 - public static string Parser_CannotExtendMergedNamespace { 759 - get { 760 - return ResourceManager.GetString("Parser_CannotExtendMergedNamespace", resourceCulture); 761 - } 762 - } 763 - 764 - /// <summary> 765 - /// Looks up a localized string similar to Could not find previous declaration for symbol {0}.. 766 - /// </summary> 767 - public static string Parser_Could_not_find_previous_declaration { 768 - get { 769 - return ResourceManager.GetString("Parser_Could_not_find_previous_declaration", resourceCulture); 770 - } 771 - } 772 - 773 - /// <summary> 774 - /// Looks up a localized string similar to The declaration type should be followed by a colon (e.g., `declare ref var: x;`). 775 - /// </summary> 776 - public static string Parser_DeclarationTypeShouldBeFollowedByColon { 777 - get { 778 - return ResourceManager.GetString("Parser_DeclarationTypeShouldBeFollowedByColon", resourceCulture); 779 - } 780 - } 781 - 782 - /// <summary> 783 - /// Looks up a localized string similar to Cannot execute build block. Errors detected. 784 - /// </summary> 785 - public static string Parser_ErrorsInBuildBlock { 786 - get { 787 - return ResourceManager.GetString("Parser_ErrorsInBuildBlock", resourceCulture); 788 - } 789 - } 790 - 791 - /// <summary> 792 - /// Looks up a localized string similar to Exception during compilation and execution of build block. 793 - ///{0}. 794 - /// </summary> 795 - public static string Parser_exception_in_build_block { 796 - get { 797 - return ResourceManager.GetString("Parser_exception_in_build_block", resourceCulture); 798 - } 799 - } 800 - 801 - /// <summary> 802 - /// Looks up a localized string similar to Found namespace, expected actual entity.. 803 - /// </summary> 804 - public static string Parser_ExpectedEntityFoundNamespace { 805 - get { 806 - return ResourceManager.GetString("Parser_ExpectedEntityFoundNamespace", resourceCulture); 807 - } 808 - } 809 - 810 - /// <summary> 811 - /// Looks up a localized string similar to Expected {0} to be a namespace. Was {1}.. 812 - /// </summary> 813 - public static string Parser_NamespaceExpected { 814 - get { 815 - return ResourceManager.GetString("Parser_NamespaceExpected", resourceCulture); 816 - } 817 - } 818 - 819 - /// <summary> 820 - /// Looks up a localized string similar to relativeNsId cannot be empty. 821 - /// </summary> 822 - public static string Parser_relativeNsId_empty { 823 - get { 824 - return ResourceManager.GetString("Parser_relativeNsId_empty", resourceCulture); 825 - } 826 - } 827 - 828 - /// <summary> 829 - /// Looks up a localized string similar to Expected symbolic usage to be represented as an LValue.. 830 - /// </summary> 831 - public static string Parser_SymbolicUsageAsLValue { 832 - get { 833 - return ResourceManager.GetString("Parser_SymbolicUsageAsLValue", resourceCulture); 834 - } 835 - } 836 - 837 - /// <summary> 838 - /// Looks up a localized string similar to Cannot require outer variable to be included outside of a function. This error indicates an internal compiler error.. 839 - /// </summary> 840 - public static string ParserAstFactory_RequireOuterVariable_Outside_function { 841 - get { 842 - return ResourceManager.GetString("ParserAstFactory_RequireOuterVariable_Outside_function", resourceCulture); 843 - } 844 - } 845 - 846 - /// <summary> 847 - /// Looks up a localized string similar to Exiting Prx.Main normally. Press Enter to exit.. 848 - /// </summary> 849 - public static string Program_DebugExit { 850 - get { 851 - return ResourceManager.GetString("Program_DebugExit", resourceCulture); 852 - } 853 - } 854 - 855 - /// <summary> 856 - /// Looks up a localized string similar to //PRX 857 - /// 858 - ///Name prx::core/0.0; 859 - ///References { 860 - /// prx::prim/0.0 861 - ///}; 862 - /// 863 - ///namespace prx.core 864 - ///{ 865 - /// namespace seq 866 - /// { 867 - /// 868 - /// } 869 - /// export(*),prx.prim( 870 - /// map,foldl,foldr,sort,all =&gt; to_list, where =&gt; filter, skip,take, 871 - /// count,distinct,union,unique,frequency,groupby,intersect,each,exists,forall, 872 - /// takewhile,except,range, reverse, headtail, append, sum, contains, 873 - /// create_enumerator,seqconcat); 874 - /// 875 - /// namespace nonstrict 876 - /// { 877 - /// 878 - /// } 879 - /// export(*),prx.prim(thunk,asthunk =&gt; to_thunk,force,toseq =&gt; to_seq); 880 - /// 881 - /// namespace rt 882 - /// { 883 - /// [rest of string was truncated]&quot;;. 884 - /// </summary> 885 - public static string prx_core { 886 - get { 887 - return ResourceManager.GetString("prx_core", resourceCulture); 888 - } 889 - } 890 - 891 - /// <summary> 892 - /// Looks up a localized string similar to // Primitive operations built into the implementation. 893 - ///// Implementation detail. Take dependency at your own risk. 894 - ///Name prx::prim; 895 - /// 896 - ///namespace prx.prim 897 - ///{ 898 - /// declare( 899 - /// print = ref command &quot;print&quot;, 900 - /// println = ref command &quot;println&quot;, 901 - /// meta = ref command &quot;meta&quot;, 902 - /// boxed = ref command &quot;boxed&quot;, 903 - /// string_concat = ref command &quot;string_concat&quot;, 904 - /// map = ref command &quot;map&quot;, 905 - /// select = ref command &quot;select&quot;, 906 - /// foldl = ref command &quot;foldl&quot;, 907 - /// foldr = ref command &quot;foldr&quot;, 908 - /// dispose = ref command &quot;dispose&quot; [rest of string was truncated]&quot;;. 909 - /// </summary> 910 - public static string prx_prim { 911 - get { 912 - return ResourceManager.GetString("prx_prim", resourceCulture); 913 - } 914 - } 915 - 916 - /// <summary> 917 - /// Looks up a localized string similar to {0} can only be used in a macro context.. 918 - /// </summary> 919 - public static string Reference_can_only_be_used_in_a_macro_context { 920 - get { 921 - return ResourceManager.GetString("Reference_can_only_be_used_in_a_macro_context", resourceCulture); 922 - } 923 - } 924 - 925 - /// <summary> 926 - /// Looks up a localized string similar to {0} requires argument to be a prototype of a macro invocation.. 927 - /// </summary> 928 - public static string Reference_requires_argument_to_be_a_prototype_of_a_macro_invocation { 929 - get { 930 - return ResourceManager.GetString("Reference_requires_argument_to_be_a_prototype_of_a_macro_invocation", resourceCulture); 931 - } 932 - } 933 - 934 - /// <summary> 935 - /// Looks up a localized string similar to {0} requires at least one argument.. 936 - /// </summary> 937 - public static string Reference_requires_at_least_one_argument { 938 - get { 939 - return ResourceManager.GetString("Reference_requires_at_least_one_argument", resourceCulture); 940 - } 941 - } 942 - 943 - /// <summary> 944 - /// Looks up a localized string similar to Cannot create reference to a value (references are values too). 945 - /// </summary> 946 - public static string ReferenceTransformer_CannotCreateReferenceToValue { 947 - get { 948 - return ResourceManager.GetString("ReferenceTransformer_CannotCreateReferenceToValue", resourceCulture); 949 - } 950 - } 951 - 952 - /// <summary> 953 - /// Looks up a localized string similar to Cannot create a reference to the definition of a macro or partial application.. 954 - /// </summary> 955 - public static string ReferenceTransformer_HandleExpand_CannotCreateReferenceToDefinitionOfMacroOrPartialApplication { 956 - get { 957 - return ResourceManager.GetString("ReferenceTransformer_HandleExpand_CannotCreateReferenceToDefinitionOfMacroOrParti" + 958 - "alApplication", resourceCulture); 959 - } 960 - } 961 - 962 - /// <summary> 963 - /// Looks up a localized string similar to File path reference not allowed when just registering a module. Consider using ISelfAssemblingPlan.AssembleAsync instead.. 964 - /// </summary> 965 - public static string SelfAssemblingPlan__forbidFileRefSpec_notallowed { 966 - get { 967 - return ResourceManager.GetString("SelfAssemblingPlan__forbidFileRefSpec_notallowed", resourceCulture); 968 - } 969 - } 970 - 971 - /// <summary> 972 - /// Looks up a localized string similar to Must be one of RecurseIntoFileSystem or RegisterOnly.. 973 - /// </summary> 974 - public static string SelfAssemblingPlan_performCreateTargetDescription_mode { 975 - get { 976 - return ResourceManager.GetString("SelfAssemblingPlan_performCreateTargetDescription_mode", resourceCulture); 977 - } 978 - } 979 - 980 - /// <summary> 981 - /// Looks up a localized string similar to A preflight parse request must come with a resolved path.. 982 - /// </summary> 983 - public static string SelfAssemblingPlan_RefSepcMustHaveResolvedPathForPreflightOrder { 984 - get { 985 - return ResourceManager.GetString("SelfAssemblingPlan_RefSepcMustHaveResolvedPathForPreflightOrder", resourceCulture); 986 - } 987 - } 988 - 989 - /// <summary> 990 - /// Looks up a localized string similar to The Source field of the refSpec parameter must not be null.. 991 - /// </summary> 992 - public static string SelfAssemblingPlan_RefSpecMustHaveSource { 993 - get { 994 - return ResourceManager.GetString("SelfAssemblingPlan_RefSpecMustHaveSource", resourceCulture); 995 - } 996 - } 997 - 998 - /// <summary> 999 - /// Looks up a localized string similar to Cannot take a reference to a reference. Too many arrows (&quot;-&gt;&quot;).. 1000 - /// </summary> 1001 - public static string SymbolBuilder_TooManyArrows { 1002 - get { 1003 - return ResourceManager.GetString("SymbolBuilder_TooManyArrows", resourceCulture); 1004 - } 1005 - } 1006 - 1007 - /// <summary> 1008 - /// Looks up a localized string similar to Cannot convert bare reference to symbol entry.. 1009 - /// </summary> 1010 - public static string SymbolEntryConversion_BareReference { 1011 - get { 1012 - return ResourceManager.GetString("SymbolEntryConversion_BareReference", resourceCulture); 1013 - } 1014 - } 1015 - 1016 - /// <summary> 1017 - /// Looks up a localized string similar to Only expansion symbols wrapping simple references can be converted to a SymbolEntry.. 1018 - /// </summary> 1019 - public static string SymbolEntryConversion_ExpansionSymbolTooComplex { 1020 - get { 1021 - return ResourceManager.GetString("SymbolEntryConversion_ExpansionSymbolTooComplex", resourceCulture); 1022 - } 1023 - } 1024 - 1025 - /// <summary> 1026 - /// Looks up a localized string similar to Cannot convert a macro instance symbol to a legacy SymbolEntry.. 1027 - /// </summary> 1028 - public static string SymbolEntryConversion_MacroInstance_not_supported { 1029 - get { 1030 - return ResourceManager.GetString("SymbolEntryConversion_MacroInstance_not_supported", resourceCulture); 1031 - } 1032 - } 1033 - 1034 - /// <summary> 1035 - /// Looks up a localized string similar to Message symbol was not handled before conversion to a legacy SymbolEntry. 1036 - /// </summary> 1037 - public static string SymbolEntryConversion_MessageSymbol_cannot_be_converted_to_SymbolEntry { 1038 - get { 1039 - return ResourceManager.GetString("SymbolEntryConversion_MessageSymbol_cannot_be_converted_to_SymbolEntry", resourceCulture); 1040 - } 1041 - } 1042 - 1043 - /// <summary> 1044 - /// Looks up a localized string similar to Cannot convert namespace to symbol entry.. 1045 - /// </summary> 1046 - public static string SymbolEntryConversion_Namespace { 1047 - get { 1048 - return ResourceManager.GetString("SymbolEntryConversion_Namespace", resourceCulture); 1049 - } 1050 - } 1051 - 1052 - /// <summary> 1053 - /// Looks up a localized string similar to Cannot convert nil symbol to symbol entry.. 1054 - /// </summary> 1055 - public static string SymbolEntryConversion_Nil { 1056 - get { 1057 - return ResourceManager.GetString("SymbolEntryConversion_Nil", resourceCulture); 1058 - } 1059 - } 1060 - 1061 - /// <summary> 1062 - /// Looks up a localized string similar to Legacy symbol entry cannot express arbitrary dereference symbol modifiers.. 1063 - /// </summary> 1064 - public static string SymbolEntryConversion_No_arbirtrary_dereference { 1065 - get { 1066 - return ResourceManager.GetString("SymbolEntryConversion_No_arbirtrary_dereference", resourceCulture); 1067 - } 1068 - } 1069 - 1070 - /// <summary> 1071 - /// Looks up a localized string similar to The symbol handler {0} cannot handle symbols of type {1}.. 1072 - /// </summary> 1073 - public static string SymbolHandler_CannotHandleSymbolOfType { 1074 - get { 1075 - return ResourceManager.GetString("SymbolHandler_CannotHandleSymbolOfType", resourceCulture); 1076 - } 1077 - } 1078 - 1079 - /// <summary> 1080 - /// Looks up a localized string similar to Symbolic reference must consist of at least one symbol name.. 1081 - /// </summary> 1082 - public static string SymbolMExprParser_EmptySymbolicReference { 1083 - get { 1084 - return ResourceManager.GetString("SymbolMExprParser_EmptySymbolicReference", resourceCulture); 1085 - } 1086 - } 1087 - 1088 - /// <summary> 1089 - /// //PRX 1090 - /// 1091 - ///Name sys/0.0; 1092 - ///References { 1093 - /// prx::prim/0.0, 1094 - /// prx::core/0.0 1095 - ///}; 1096 - /// 1097 - ///// Re-export prx.prim from sys. We want to keep the existence of the prx.prim module 1098 - ///// a secret. 1099 - ///namespace prx.prim {} 1100 - ///export prx.prim.*; 1101 - /// 1102 - ///// prx.core is the part of the standard library that even other parts of the standard 1103 - ///// library depend on. 1104 - ///// For the moment, prx.core gets dumped directly into sys. 1105 - ///// In case of backwards-incompatible changes in the future, sys would maintain the old. 1106 - ///// behavior while prx.core wo [rest of string was truncated]&quot;;. 1107 - /// </summary> 1108 - public static string sys { 1109 - get { 1110 - return ResourceManager.GetString("sys", resourceCulture); 1111 - } 1112 - } 1113 - 1114 - /// <summary>Source for the runtime components of the Prexonite shell scripting extensions.</summary> 1115 - public static string sh 1116 - { 1117 - get { return ResourceManager.GetString("sh", resourceCulture); } 1118 - } 1119 - 1120 - /// <summary> 1121 - /// Looks up a localized string similar to Cannot resolve symbol in unscoped AST factory. This error message indicates a misuse of the Prexonite compile-time API.. 1122 - /// </summary> 1123 - public static string UnscopedFactory_API_Misuse_symbol_resolve { 1124 - get { 1125 - return ResourceManager.GetString("UnscopedFactory_API_Misuse_symbol_resolve", resourceCulture); 1126 - } 1127 - } 1128 - 1129 - /// <summary> 1130 - /// Looks up a localized string similar to Variable id must not be empty.. 1131 - /// </summary> 1132 - public static string VariableDeclaration_Variable_id_must_not_be_empty { 1133 - get { 1134 - return ResourceManager.GetString("VariableDeclaration_Variable_id_must_not_be_empty", resourceCulture); 1135 - } 1136 - } 1137 - } 1138 - } 1 + //------------------------------------------------------------------------------ 2 + // <auto-generated> 3 + // This code was generated by a tool. 4 + // Runtime Version:4.0.30319.42000 5 + // 6 + // Changes to this file may cause incorrect behavior and will be lost if 7 + // the code is regenerated. 8 + // </auto-generated> 9 + //------------------------------------------------------------------------------ 10 + 11 + namespace Prexonite.Properties { 12 + using System; 13 + 14 + 15 + /// <summary> 16 + /// A strongly-typed resource class, for looking up localized strings, etc. 17 + /// </summary> 18 + // This class was auto-generated by the StronglyTypedResourceBuilder 19 + // class via a tool like ResGen or Visual Studio. 20 + // To add or remove a member, edit your .ResX file then rerun ResGen 21 + // with the /str option, or rebuild your VS project. 22 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] 23 + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 + public class Resources { 26 + 27 + private static global::System.Resources.ResourceManager resourceMan; 28 + 29 + private static global::System.Globalization.CultureInfo resourceCulture; 30 + 31 + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 + internal Resources() { 33 + } 34 + 35 + /// <summary> 36 + /// Returns the cached ResourceManager instance used by this class. 37 + /// </summary> 38 + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 + public static global::System.Resources.ResourceManager ResourceManager { 40 + get { 41 + if (object.ReferenceEquals(resourceMan, null)) { 42 + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Prexonite.Properties.Resources", typeof(Resources).Assembly); 43 + resourceMan = temp; 44 + } 45 + return resourceMan; 46 + } 47 + } 48 + 49 + /// <summary> 50 + /// Overrides the current thread's CurrentUICulture property for all 51 + /// resource lookups using this strongly typed resource class. 52 + /// </summary> 53 + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 + public static global::System.Globalization.CultureInfo Culture { 55 + get { 56 + return resourceCulture; 57 + } 58 + set { 59 + resourceCulture = value; 60 + } 61 + } 62 + 63 + /// <summary> 64 + /// Looks up a localized string similar to In partial applications of lazy coalescence expressions, only one placeholder at the end of a sequence is allowed. Consider using a lambda expression instead.. 65 + /// </summary> 66 + public static string AstCoalescence__reportInvalidPlaceholders { 67 + get { 68 + return ResourceManager.GetString("AstCoalescence__reportInvalidPlaceholders", resourceCulture); 69 + } 70 + } 71 + 72 + /// <summary> 73 + /// Looks up a localized string similar to Entity must be a macro to be expanded.. 74 + /// </summary> 75 + public static string AstExpand_EntityMustBeMacro { 76 + get { 77 + return ResourceManager.GetString("AstExpand_EntityMustBeMacro", resourceCulture); 78 + } 79 + } 80 + 81 + /// <summary> 82 + /// Looks up a localized string similar to Expected {0} to be implemented as an LValue.. 83 + /// </summary> 84 + public static string AstFactoryBase__resolveImplementation_LValueExpected { 85 + get { 86 + return ResourceManager.GetString("AstFactoryBase__resolveImplementation_LValueExpected", resourceCulture); 87 + } 88 + } 89 + 90 + /// <summary> 91 + /// Looks up a localized string similar to Type expression expected on the right-hand side of a type cast.. 92 + /// </summary> 93 + public static string AstFactoryBase_BinaryOperation_TypeExprExpected { 94 + get { 95 + return ResourceManager.GetString("AstFactoryBase_BinaryOperation_TypeExprExpected", resourceCulture); 96 + } 97 + } 98 + 99 + /// <summary> 100 + /// Looks up a localized string similar to Right hand side of a cast operation must be a type expression.. 101 + /// </summary> 102 + public static string AstFactoryBase_ModifyingAssignment_TypeExpressionExpected { 103 + get { 104 + return ResourceManager.GetString("AstFactoryBase_ModifyingAssignment_TypeExpressionExpected", resourceCulture); 105 + } 106 + } 107 + 108 + /// <summary> 109 + /// Looks up a localized string similar to The not operator must produce an LValue to be used in a negative typecheck.. 110 + /// </summary> 111 + public static string AstFactoryBase_UnaryOperation_NotOperatorForTypecheckRequiresLValue { 112 + get { 113 + return ResourceManager.GetString("AstFactoryBase_UnaryOperation_NotOperatorForTypecheckRequiresLValue", resourceCulture); 114 + } 115 + } 116 + 117 + /// <summary> 118 + /// Looks up a localized string similar to Target of an increment or decrement operations must be an LValue and a get-call.. 119 + /// </summary> 120 + public static string AstFactoryBase_UnaryOperation_Target_must_be_LValue { 121 + get { 122 + return ResourceManager.GetString("AstFactoryBase_UnaryOperation_Target_must_be_LValue", resourceCulture); 123 + } 124 + } 125 + 126 + /// <summary> 127 + /// Looks up a localized string similar to Optimization of the element expression in the foreach head resulted in a non-GetSet expression. Try to use a simpler expression.. 128 + /// </summary> 129 + public static string AstForeachLoop_DoEmitCode_ElementTooComplicated { 130 + get { 131 + return ResourceManager.GetString("AstForeachLoop_DoEmitCode_ElementTooComplicated", resourceCulture); 132 + } 133 + } 134 + 135 + /// <summary> 136 + /// Looks up a localized string similar to Cannot assign to a reference to a {0}.. 137 + /// </summary> 138 + public static string AstGetSetReference_CannotAssignReference { 139 + get { 140 + return ResourceManager.GetString("AstGetSetReference_CannotAssignReference", resourceCulture); 141 + } 142 + } 143 + 144 + /// <summary> 145 + /// Looks up a localized string similar to Cannot create a reference to {0} {1}.. 146 + /// </summary> 147 + public static string AstGetSetReference_CannotCreateReference { 148 + get { 149 + return ResourceManager.GetString("AstGetSetReference_CannotCreateReference", resourceCulture); 150 + } 151 + } 152 + 153 + /// <summary> 154 + /// Looks up a localized string similar to Reference to macro command {0} detected. Prexonite version {1} treats this as a partial application. This behavior might change in the future. Use partial application syntax explicitly {0}(?) or use the {2} command to obtain a reference to the macro.. 155 + /// </summary> 156 + public static string AstGetSetReference_ReferenceToMacroTreatedAsPartialApplication { 157 + get { 158 + return ResourceManager.GetString("AstGetSetReference_ReferenceToMacroTreatedAsPartialApplication", resourceCulture); 159 + } 160 + } 161 + 162 + /// <summary> 163 + /// Looks up a localized string similar to Cannot translate slice.. 164 + /// </summary> 165 + public static string AstIndirectCall_DoEmitPartialApplicationCode_Cannot_translate_slice { 166 + get { 167 + return ResourceManager.GetString("AstIndirectCall_DoEmitPartialApplicationCode_Cannot_translate_slice", resourceCulture); 168 + } 169 + } 170 + 171 + /// <summary> 172 + /// Looks up a localized string similar to Condition must not be null.. 173 + /// </summary> 174 + public static string AstLazyLogical__Condition_must_not_be_null { 175 + get { 176 + return ResourceManager.GetString("AstLazyLogical__Condition_must_not_be_null", resourceCulture); 177 + } 178 + } 179 + 180 + /// <summary> 181 + /// Looks up a localized string similar to targetLabel must neither be null nor empty.. 182 + /// </summary> 183 + public static string AstLazyLogical__targetLabel_must_neither_be_null_nor_empty { 184 + get { 185 + return ResourceManager.GetString("AstLazyLogical__targetLabel_must_neither_be_null_nor_empty", resourceCulture); 186 + } 187 + } 188 + 189 + /// <summary> 190 + /// Looks up a localized string similar to alternativeLabel may neither be null nor empty.. 191 + /// </summary> 192 + public static string AstLazyLogical_alternativeLabel_may_neither_be_null_nor_empty { 193 + get { 194 + return ResourceManager.GetString("AstLazyLogical_alternativeLabel_may_neither_be_null_nor_empty", resourceCulture); 195 + } 196 + } 197 + 198 + /// <summary> 199 + /// Looks up a localized string similar to The lazy logical expression {0} must implement this method/property to support partial application.. 200 + /// </summary> 201 + public static string AstLazyLogical_CreatePrefixMustBeImplementedForPartialApplication { 202 + get { 203 + return ResourceManager.GetString("AstLazyLogical_CreatePrefixMustBeImplementedForPartialApplication", resourceCulture); 204 + } 205 + } 206 + 207 + /// <summary> 208 + /// Looks up a localized string similar to Partial applications of logical statements must be either pure and-chains or pure or-chains.. 209 + /// </summary> 210 + public static string AstLazyLogical_EmitCode_PureChainsExpected { 211 + get { 212 + return ResourceManager.GetString("AstLazyLogical_EmitCode_PureChainsExpected", resourceCulture); 213 + } 214 + } 215 + 216 + /// <summary> 217 + /// Looks up a localized string similar to In partial applications of lazy expressions, only one placeholder at the end of a sequence is allowed. Consider using a lambda expression instead.. 218 + /// </summary> 219 + public static string AstLazyLogical_placeholderOnlyAtTheEnd { 220 + get { 221 + return ResourceManager.GetString("AstLazyLogical_placeholderOnlyAtTheEnd", resourceCulture); 222 + } 223 + } 224 + 225 + /// <summary> 226 + /// Looks up a localized string similar to The assignment modifier {0} is not supported.. 227 + /// </summary> 228 + public static string AstModifyingAssignment_AssignmentModifierNotSupported { 229 + get { 230 + return ResourceManager.GetString("AstModifyingAssignment_AssignmentModifierNotSupported", resourceCulture); 231 + } 232 + } 233 + 234 + /// <summary> 235 + /// Looks up a localized string similar to Invalid modifying assignment: No RHS.. 236 + /// </summary> 237 + public static string AstModifyingAssignment_No_RHS { 238 + get { 239 + return ResourceManager.GetString("AstModifyingAssignment_No_RHS", resourceCulture); 240 + } 241 + } 242 + 243 + /// <summary> 244 + /// Looks up a localized string similar to Argument splice not supported in this position.. 245 + /// </summary> 246 + public static string AstNode__argumentSpliceNotSupportedInThisPosition { 247 + get { 248 + return ResourceManager.GetString("AstNode__argumentSpliceNotSupportedInThisPosition", resourceCulture); 249 + } 250 + } 251 + 252 + /// <summary> 253 + /// Looks up a localized string similar to Compiler target cannot be null.. 254 + /// </summary> 255 + public static string AstNode__GetOptimizedNode_CompilerTarget_null { 256 + get { 257 + return ResourceManager.GetString("AstNode__GetOptimizedNode_CompilerTarget_null", resourceCulture); 258 + } 259 + } 260 + 261 + /// <summary> 262 + /// Looks up a localized string similar to Expression to be optimized can not be null.. 263 + /// </summary> 264 + public static string AstNode__GetOptimizedNode_Expression_null { 265 + get { 266 + return ResourceManager.GetString("AstNode__GetOptimizedNode_Expression_null", resourceCulture); 267 + } 268 + } 269 + 270 + /// <summary> 271 + /// Looks up a localized string similar to Compiler target must not be null.. 272 + /// </summary> 273 + public static string AstNode_Compiler_target_must_not_be_null { 274 + get { 275 + return ResourceManager.GetString("AstNode_Compiler_target_must_not_be_null", resourceCulture); 276 + } 277 + } 278 + 279 + /// <summary> 280 + /// Looks up a localized string similar to No implementation defined for operator `{0}`. 281 + /// </summary> 282 + public static string AstNode_NoImplementationForOperator { 283 + get { 284 + return ResourceManager.GetString("AstNode_NoImplementationForOperator", resourceCulture); 285 + } 286 + } 287 + 288 + /// <summary> 289 + /// Looks up a localized string similar to A placeholder index cannot be negtive. 290 + /// </summary> 291 + public static string AstPlaceholder_PlaceholdeIndexNegative { 292 + get { 293 + return ResourceManager.GetString("AstPlaceholder_PlaceholdeIndexNegative", resourceCulture); 294 + } 295 + } 296 + 297 + /// <summary> 298 + /// Looks up a localized string similar to Cannot load a reference to a macro command. Partial application might be possible, depending on the macro command in question.. 299 + /// </summary> 300 + public static string AstReference_MacroCommandReferenceNotPossible { 301 + get { 302 + return ResourceManager.GetString("AstReference_MacroCommandReferenceNotPossible", resourceCulture); 303 + } 304 + } 305 + 306 + /// <summary> 307 + /// Looks up a localized string similar to Detected possible return (yield) from within a protected block (try-catch-finally, using, foreach). This Prexonite implementation cannot guarantee that cleanup code is executed. . 308 + /// </summary> 309 + public static string AstReturn_Warn_YieldInProtectedBlock { 310 + get { 311 + return ResourceManager.GetString("AstReturn_Warn_YieldInProtectedBlock", resourceCulture); 312 + } 313 + } 314 + 315 + /// <summary> 316 + /// Looks up a localized string similar to Unary operator nodes for non-increment/decrement should not exist. This error indicates an error in the compiler.. 317 + /// </summary> 318 + public static string AstUnaryOperator__NonIncrementDecrement { 319 + get { 320 + return ResourceManager.GetString("AstUnaryOperator__NonIncrementDecrement", resourceCulture); 321 + } 322 + } 323 + 324 + /// <summary> 325 + /// Looks up a localized string similar to The symbol {0} has not been resolved.. 326 + /// </summary> 327 + public static string AstUnresolved_The_symbol__0__has_not_been_resolved_ { 328 + get { 329 + return ResourceManager.GetString("AstUnresolved_The_symbol__0__has_not_been_resolved_", resourceCulture); 330 + } 331 + } 332 + 333 + /// <summary> 334 + /// Looks up a localized string similar to call\macro must be supplied a macro reference.. 335 + /// </summary> 336 + public static string CallMacro_call_macro_must_be_supplied_a_macro_reference { 337 + get { 338 + return ResourceManager.GetString("CallMacro_call_macro_must_be_supplied_a_macro_reference", resourceCulture); 339 + } 340 + } 341 + 342 + /// <summary> 343 + /// Looks up a localized string similar to call\macro called from {0}. call\macro can only be called from a macro context, i.e., from a macro function or an inner function of a macro.. 344 + /// </summary> 345 + public static string CallMacro_CalledFromNonMacro { 346 + get { 347 + return ResourceManager.GetString("CallMacro_CalledFromNonMacro", resourceCulture); 348 + } 349 + } 350 + 351 + /// <summary> 352 + /// Looks up a localized string similar to Used in this way, {0} has the form {0}([],macroRef,[justEffect?,call?],...).. 353 + /// </summary> 354 + public static string CallMacro_errorUsageFullRef { 355 + get { 356 + return ResourceManager.GetString("CallMacro_errorUsageFullRef", resourceCulture); 357 + } 358 + } 359 + 360 + /// <summary> 361 + /// Looks up a localized string similar to Used in this way, {0} has the form {0}([macroPrototype(...),justEffect?,call?],...).. 362 + /// </summary> 363 + public static string CallMacro_errorUsagePrototype { 364 + get { 365 + return ResourceManager.GetString("CallMacro_errorUsagePrototype", resourceCulture); 366 + } 367 + } 368 + 369 + /// <summary> 370 + /// Looks up a localized string similar to The macro prototype must be known at compile-time, it must not be a placeholder.. 371 + /// </summary> 372 + public static string CallMacro_notOnPlaceholder { 373 + get { 374 + return ResourceManager.GetString("CallMacro_notOnPlaceholder", resourceCulture); 375 + } 376 + } 377 + 378 + /// <summary> 379 + /// Looks up a localized string similar to Due to an internal limitation, the index of a placeholder in the macro prototype&apos;s argument list inside {0} cannot be inferred. Specify the placeholders index explicitly (e.g., ?0, ?1, etc.).. 380 + /// </summary> 381 + public static string CallMacro_SpecifyPlaceholderIndexExplicitly { 382 + get { 383 + return ResourceManager.GetString("CallMacro_SpecifyPlaceholderIndexExplicitly", resourceCulture); 384 + } 385 + } 386 + 387 + /// <summary> 388 + /// Looks up a localized string similar to call\star must at least pass through one argument (the call target). It has been instructed to pass through {0} arguments.. 389 + /// </summary> 390 + public static string CallStar__invalid_PassThrough { 391 + get { 392 + return ResourceManager.GetString("CallStar__invalid_PassThrough", resourceCulture); 393 + } 394 + } 395 + 396 + /// <summary> 397 + /// Looks up a localized string similar to {0} requires at least one argument, the call\* command/function to invoke.. 398 + /// </summary> 399 + public static string CallStar_usage { 400 + get { 401 + return ResourceManager.GetString("CallStar_usage", resourceCulture); 402 + } 403 + } 404 + 405 + /// <summary> 406 + /// Looks up a localized string similar to Due to an internal limitation, {0} and {1} cannot be used in an expression inside a loop, only as a statement.. 407 + /// </summary> 408 + public static string CallSubInterpret_asExpressionInLoop { 409 + get { 410 + return ResourceManager.GetString("CallSubInterpret_asExpressionInLoop", resourceCulture); 411 + } 412 + } 413 + 414 + /// <summary> 415 + /// Looks up a localized string similar to {0} requires one argument.. 416 + /// </summary> 417 + public static string CallSubInterpret_OneArgument { 418 + get { 419 + return ResourceManager.GetString("CallSubInterpret_OneArgument", resourceCulture); 420 + } 421 + } 422 + 423 + /// <summary> 424 + /// Looks up a localized string similar to Legacy part of parser cannot deal with symbol {0}. A call symbol was expected.. 425 + /// </summary> 426 + public static string CompilerTarget__CreateIncompatibleSymbolError_IncompatibleSymbol { 427 + get { 428 + return ResourceManager.GetString("CompilerTarget__CreateIncompatibleSymbolError_IncompatibleSymbol", resourceCulture); 429 + } 430 + } 431 + 432 + /// <summary> 433 + /// Looks up a localized string similar to When creating a compiler target, the supplied function must match the application targetted by the loader.. 434 + /// </summary> 435 + public static string CompilerTarget_Cannot_create_for_foreign_function { 436 + get { 437 + return ResourceManager.GetString("CompilerTarget_Cannot_create_for_foreign_function", resourceCulture); 438 + } 439 + } 440 + 441 + /// <summary> 442 + /// Looks up a localized string similar to Parameter list of function {0} contains {1} at position {2}. The name {1} is reserved for the local variable holding the argument list.. 443 + /// </summary> 444 + public static string CompilerTarget_ParameterNameReserved { 445 + get { 446 + return ResourceManager.GetString("CompilerTarget_ParameterNameReserved", resourceCulture); 447 + } 448 + } 449 + 450 + /// <summary> 451 + /// Looks up a localized string similar to Invalid key in source for symbol store.. 452 + /// </summary> 453 + public static string ConflictUnionFallbackStore__unifySymbols_Invalid_key_in_source_for_symbol_store_ { 454 + get { 455 + return ResourceManager.GetString("ConflictUnionFallbackStore__unifySymbols_Invalid_key_in_source_for_symbol_store_", resourceCulture); 456 + } 457 + } 458 + 459 + /// <summary> 460 + /// Looks up a localized string similar to A stream that is not readable cannot be used as a source.. 461 + /// </summary> 462 + public static string Exception_StreamSource_CannotUseWriteOnlyStream { 463 + get { 464 + return ResourceManager.GetString("Exception_StreamSource_CannotUseWriteOnlyStream", resourceCulture); 465 + } 466 + } 467 + 468 + /// <summary> 469 + /// Looks up a localized string similar to Capacity must be strictly positive.. 470 + /// </summary> 471 + public static string LastAccessCache_CapacityMustBePositive { 472 + get { 473 + return ResourceManager.GetString("LastAccessCache_CapacityMustBePositive", resourceCulture); 474 + } 475 + } 476 + 477 + /// <summary> 478 + /// Looks up a localized string similar to //PRX 479 + /// 480 + ///Name prx::v1; 481 + /// 482 + ///declare { 483 + /// command: 484 + /// print,println, 485 + /// meta, 486 + /// boxed, 487 + /// string_concat, 488 + /// concat, 489 + /// map, 490 + /// select, 491 + /// foldl, 492 + /// foldr, 493 + /// dispose, 494 + /// call\perform, 495 + /// thunk, 496 + /// asthunk, 497 + /// force, 498 + /// toseq, 499 + /// call\member\perform, 500 + /// caller, 501 + /// pair, 502 + /// unbind, 503 + /// sort, 504 + /// orderby, 505 + /// LoadAssembly, 506 + /// debug, 507 + /// setcenter, 508 + /// setleft, 509 + /// setright, 510 + /// all, 511 + /// where, 512 + /// skip, 513 + /// limit, 514 + /// take, 515 + /// abs, 516 + /// ceiling, 517 + /// exp, 518 + /// floor, 519 + /// log, 520 + /// max, 521 + /// min, 522 + /// pi, 523 + /// round, 524 + /// sin, 525 + /// cos, 526 + /// sqrt, 527 + /// tan, 528 + /// char, 529 + /// count, 530 + /// distinct, 531 + /// u [rest of string was truncated]&quot;;. 532 + /// </summary> 533 + public static string legacy_symbols { 534 + get { 535 + return ResourceManager.GetString("legacy_symbols", resourceCulture); 536 + } 537 + } 538 + 539 + /// <summary> 540 + /// Looks up a localized string similar to {1}begin compiling {0} [Path: {2} ]. 541 + /// </summary> 542 + public static string Loader__begin_compiling { 543 + get { 544 + return ResourceManager.GetString("Loader__begin_compiling", resourceCulture); 545 + } 546 + } 547 + 548 + /// <summary> 549 + /// Looks up a localized string similar to {1}end compiling {0}. 550 + /// </summary> 551 + public static string Loader__end_compiling { 552 + get { 553 + return ResourceManager.GetString("Loader__end_compiling", resourceCulture); 554 + } 555 + } 556 + 557 + /// <summary> 558 + /// Looks up a localized string similar to Cannot find macro command named `{0}`. 559 + /// </summary> 560 + public static string MacroCommandExpander_CannotFindMacro { 561 + get { 562 + return ResourceManager.GetString("MacroCommandExpander_CannotFindMacro", resourceCulture); 563 + } 564 + } 565 + 566 + /// <summary> 567 + /// Looks up a localized string similar to MacroCommandExpander expected macro command entity. Got {0} instead.. 568 + /// </summary> 569 + public static string MacroCommandExpander_MacroCommandExpected { 570 + get { 571 + return ResourceManager.GetString("MacroCommandExpander_MacroCommandExpected", resourceCulture); 572 + } 573 + } 574 + 575 + /// <summary> 576 + /// Looks up a localized string similar to Cannot establish macro context outside of macro.. 577 + /// </summary> 578 + public static string MacroContextExtensions_EstablishMacroContext_OutsideOfMacro { 579 + get { 580 + return ResourceManager.GetString("MacroContextExtensions_EstablishMacroContext_OutsideOfMacro", resourceCulture); 581 + } 582 + } 583 + 584 + /// <summary> 585 + /// Looks up a localized string similar to Macro {0} uses temporary variable to ensure that expression from `context.Block` is evaluated before statements from macro return value.. 586 + /// </summary> 587 + public static string MacroFunctionExpander__UsedTemporaryVariable { 588 + get { 589 + return ResourceManager.GetString("MacroFunctionExpander__UsedTemporaryVariable", resourceCulture); 590 + } 591 + } 592 + 593 + /// <summary> 594 + /// Looks up a localized string similar to MacroFunctionExpander expected reference to function, got {0} instead.. 595 + /// </summary> 596 + public static string MacroFunctionExpander_ExpectedFunctionReference { 597 + get { 598 + return ResourceManager.GetString("MacroFunctionExpander_ExpectedFunctionReference", resourceCulture); 599 + } 600 + } 601 + 602 + /// <summary> 603 + /// Looks up a localized string similar to The macro function {0} was called from function {1} but is not available at compile time (from module {2}).. 604 + /// </summary> 605 + public static string MacroFunctionExpander_MacroFunctionNotAvailable { 606 + get { 607 + return ResourceManager.GetString("MacroFunctionExpander_MacroFunctionNotAvailable", resourceCulture); 608 + } 609 + } 610 + 611 + /// <summary> 612 + /// Looks up a localized string similar to Partial macro must return a boolean value, indicating whether it can handle the partial application. Assuming it cannot.. 613 + /// </summary> 614 + public static string MacroFunctionExpander_PartialMacroMustIndicateSuccessWithBoolean { 615 + get { 616 + return ResourceManager.GetString("MacroFunctionExpander_PartialMacroMustIndicateSuccessWithBoolean", resourceCulture); 617 + } 618 + } 619 + 620 + /// <summary> 621 + /// Looks up a localized string similar to Exception during expansion of macro {0} in function {1}: {2}. 622 + /// </summary> 623 + public static string MacroSession_ExceptionDuringExpansionOfMacro { 624 + get { 625 + return ResourceManager.GetString("MacroSession_ExceptionDuringExpansionOfMacro", resourceCulture); 626 + } 627 + } 628 + 629 + /// <summary> 630 + /// Looks up a localized string similar to The macro {0} cannot be applied partially.. 631 + /// </summary> 632 + public static string MacroSession_MacroCannotBeAppliedPartially { 633 + get { 634 + return ResourceManager.GetString("MacroSession_MacroCannotBeAppliedPartially", resourceCulture); 635 + } 636 + } 637 + 638 + /// <summary> 639 + /// Looks up a localized string similar to AstMacroInvocation.EmitCode is not reentrant. The invocation node for the macro {0} has been expanded already. Use GetCopy() to operate on a copy of this macro invocation.. 640 + /// </summary> 641 + public static string MacroSession_MacroNotReentrant { 642 + get { 643 + return ResourceManager.GetString("MacroSession_MacroNotReentrant", resourceCulture); 644 + } 645 + } 646 + 647 + /// <summary> 648 + /// Looks up a localized string similar to Cannot apply {0} as a macro at compile time.. 649 + /// </summary> 650 + public static string MacroSession_NotAMacro { 651 + get { 652 + return ResourceManager.GetString("MacroSession_NotAMacro", resourceCulture); 653 + } 654 + } 655 + 656 + /// <summary> 657 + /// Looks up a localized string similar to A MetaEntry list must not contain null references.. 658 + /// </summary> 659 + public static string MetaEntry_NullReferenceInList { 660 + get { 661 + return ResourceManager.GetString("MetaEntry_NullReferenceInList", resourceCulture); 662 + } 663 + } 664 + 665 + /// <summary> 666 + /// Looks up a localized string similar to Module id cannot be null or empty.. 667 + /// </summary> 668 + public static string ModuleName_Module_id_cannot_be_null_or_empty_ { 669 + get { 670 + return ResourceManager.GetString("ModuleName_Module_id_cannot_be_null_or_empty_", resourceCulture); 671 + } 672 + } 673 + 674 + /// <summary> 675 + /// Looks up a localized string similar to Must supply an object to be transported to {0}.. 676 + /// </summary> 677 + public static string Pack_Usage_obj_missing { 678 + get { 679 + return ResourceManager.GetString("Pack_Usage_obj_missing", resourceCulture); 680 + } 681 + } 682 + 683 + /// <summary> 684 + /// Looks up a localized string similar to Cannot create a reference to a {0}.. 685 + /// </summary> 686 + public static string Parser__assembleReference_CannotCreateReferenceToSymbol { 687 + get { 688 + return ResourceManager.GetString("Parser__assembleReference_CannotCreateReferenceToSymbol", resourceCulture); 689 + } 690 + } 691 + 692 + /// <summary> 693 + /// Looks up a localized string similar to Macro definition is not an LValue (necessary for it to be converted to a partial application). 694 + /// </summary> 695 + public static string Parser__assembleReference_MacroDefinitionNotLValue { 696 + get { 697 + return ResourceManager.GetString("Parser__assembleReference_MacroDefinitionNotLValue", resourceCulture); 698 + } 699 + } 700 + 701 + /// <summary> 702 + /// Looks up a localized string similar to The symbol {0} is not defined.. 703 + /// </summary> 704 + public static string Parser__assembleReference_SymbolNotDefined { 705 + get { 706 + return ResourceManager.GetString("Parser__assembleReference_SymbolNotDefined", resourceCulture); 707 + } 708 + } 709 + 710 + /// <summary> 711 + /// Looks up a localized string similar to Cannot use {0} like a constructor.. 712 + /// </summary> 713 + public static string Parser__CannotUseExpressionAsAConstructor { 714 + get { 715 + return ResourceManager.GetString("Parser__CannotUseExpressionAsAConstructor", resourceCulture); 716 + } 717 + } 718 + 719 + /// <summary> 720 + /// Looks up a localized string similar to Failed to transform object creation expression.. 721 + /// </summary> 722 + public static string Parser__fallbackObjectCreation_Failed { 723 + get { 724 + return ResourceManager.GetString("Parser__fallbackObjectCreation_Failed", resourceCulture); 725 + } 726 + } 727 + 728 + /// <summary> 729 + /// Looks up a localized string similar to Unknown operator alias in assembler code: {0}.{1}. 730 + /// </summary> 731 + public static string Parser_addOpAlias_Unknown { 732 + get { 733 + return ResourceManager.GetString("Parser_addOpAlias_Unknown", resourceCulture); 734 + } 735 + } 736 + 737 + /// <summary> 738 + /// Looks up a localized string similar to Cannot parse message symbol from {0}.. 739 + /// </summary> 740 + public static string Parser_Cannot_parse_message_symbol { 741 + get { 742 + return ResourceManager.GetString("Parser_Cannot_parse_message_symbol", resourceCulture); 743 + } 744 + } 745 + 746 + /// <summary> 747 + /// Looks up a localized string similar to Cannot parse source position from {0}.. 748 + /// </summary> 749 + public static string Parser_Cannot_parse_source_position { 750 + get { 751 + return ResourceManager.GetString("Parser_Cannot_parse_source_position", resourceCulture); 752 + } 753 + } 754 + 755 + /// <summary> 756 + /// Looks up a localized string similar to Cannot parse symbol from {0}.. 757 + /// </summary> 758 + public static string Parser_Cannot_parse_symbol_from { 759 + get { 760 + return ResourceManager.GetString("Parser_Cannot_parse_symbol_from", resourceCulture); 761 + } 762 + } 763 + 764 + /// <summary> 765 + /// Looks up a localized string similar to Cannot expand {0} at compile time.. 766 + /// </summary> 767 + public static string Parser_CannotExpandAtCompileTime { 768 + get { 769 + return ResourceManager.GetString("Parser_CannotExpandAtCompileTime", resourceCulture); 770 + } 771 + } 772 + 773 + /// <summary> 774 + /// Looks up a localized string similar to Namespace {0} cannot be extended because it is a merged view of two originally distinct namespaces.. 775 + /// </summary> 776 + public static string Parser_CannotExtendMergedNamespace { 777 + get { 778 + return ResourceManager.GetString("Parser_CannotExtendMergedNamespace", resourceCulture); 779 + } 780 + } 781 + 782 + /// <summary> 783 + /// Looks up a localized string similar to Could not find previous declaration for symbol {0}.. 784 + /// </summary> 785 + public static string Parser_Could_not_find_previous_declaration { 786 + get { 787 + return ResourceManager.GetString("Parser_Could_not_find_previous_declaration", resourceCulture); 788 + } 789 + } 790 + 791 + /// <summary> 792 + /// Looks up a localized string similar to The declaration type should be followed by a colon (e.g., `declare ref var: x;`). 793 + /// </summary> 794 + public static string Parser_DeclarationTypeShouldBeFollowedByColon { 795 + get { 796 + return ResourceManager.GetString("Parser_DeclarationTypeShouldBeFollowedByColon", resourceCulture); 797 + } 798 + } 799 + 800 + /// <summary> 801 + /// Looks up a localized string similar to Cannot execute build block. Errors detected. 802 + /// </summary> 803 + public static string Parser_ErrorsInBuildBlock { 804 + get { 805 + return ResourceManager.GetString("Parser_ErrorsInBuildBlock", resourceCulture); 806 + } 807 + } 808 + 809 + /// <summary> 810 + /// Looks up a localized string similar to Exception during compilation and execution of build block. 811 + ///{0}. 812 + /// </summary> 813 + public static string Parser_exception_in_build_block { 814 + get { 815 + return ResourceManager.GetString("Parser_exception_in_build_block", resourceCulture); 816 + } 817 + } 818 + 819 + /// <summary> 820 + /// Looks up a localized string similar to Found namespace, expected actual entity.. 821 + /// </summary> 822 + public static string Parser_ExpectedEntityFoundNamespace { 823 + get { 824 + return ResourceManager.GetString("Parser_ExpectedEntityFoundNamespace", resourceCulture); 825 + } 826 + } 827 + 828 + /// <summary> 829 + /// Looks up a localized string similar to Expected {0} to be a namespace. Was {1}.. 830 + /// </summary> 831 + public static string Parser_NamespaceExpected { 832 + get { 833 + return ResourceManager.GetString("Parser_NamespaceExpected", resourceCulture); 834 + } 835 + } 836 + 837 + /// <summary> 838 + /// Looks up a localized string similar to relativeNsId cannot be empty. 839 + /// </summary> 840 + public static string Parser_relativeNsId_empty { 841 + get { 842 + return ResourceManager.GetString("Parser_relativeNsId_empty", resourceCulture); 843 + } 844 + } 845 + 846 + /// <summary> 847 + /// Looks up a localized string similar to Expected symbolic usage to be represented as an LValue.. 848 + /// </summary> 849 + public static string Parser_SymbolicUsageAsLValue { 850 + get { 851 + return ResourceManager.GetString("Parser_SymbolicUsageAsLValue", resourceCulture); 852 + } 853 + } 854 + 855 + /// <summary> 856 + /// Looks up a localized string similar to Cannot require outer variable to be included outside of a function. This error indicates an internal compiler error.. 857 + /// </summary> 858 + public static string ParserAstFactory_RequireOuterVariable_Outside_function { 859 + get { 860 + return ResourceManager.GetString("ParserAstFactory_RequireOuterVariable_Outside_function", resourceCulture); 861 + } 862 + } 863 + 864 + /// <summary> 865 + /// Looks up a localized string similar to Exiting Prx.Main normally. Press Enter to exit.. 866 + /// </summary> 867 + public static string Program_DebugExit { 868 + get { 869 + return ResourceManager.GetString("Program_DebugExit", resourceCulture); 870 + } 871 + } 872 + 873 + /// <summary> 874 + /// Looks up a localized string similar to //PRX 875 + /// 876 + ///Name prx::core/0.0; 877 + ///References { 878 + /// prx::prim/0.0 879 + ///}; 880 + /// 881 + ///namespace prx.core 882 + ///{ 883 + /// namespace seq 884 + /// { 885 + /// 886 + /// } 887 + /// export(*),prx.prim( 888 + /// map,foldl,foldr,sort,all =&gt; to_list, where =&gt; filter, skip,take, 889 + /// count,distinct,union,unique,frequency,groupby,intersect,each,exists,forall, 890 + /// takewhile,except,range, reverse, headtail, append, sum, contains, 891 + /// create_enumerator,seqconcat); 892 + /// 893 + /// namespace nonstrict 894 + /// { 895 + /// 896 + /// } 897 + /// export(*),prx.prim(thunk,asthunk =&gt; to_thunk,force,toseq =&gt; to_seq); 898 + /// 899 + /// namespace rt 900 + /// { 901 + /// [rest of string was truncated]&quot;;. 902 + /// </summary> 903 + public static string prx_core { 904 + get { 905 + return ResourceManager.GetString("prx_core", resourceCulture); 906 + } 907 + } 908 + 909 + /// <summary> 910 + /// Looks up a localized string similar to // Primitive operations built into the implementation. 911 + ///// Implementation detail. Take dependency at your own risk. 912 + ///Name prx::prim; 913 + /// 914 + ///namespace prx.prim 915 + ///{ 916 + /// declare( 917 + /// print = ref command &quot;print&quot;, 918 + /// println = ref command &quot;println&quot;, 919 + /// meta = ref command &quot;meta&quot;, 920 + /// boxed = ref command &quot;boxed&quot;, 921 + /// string_concat = ref command &quot;string_concat&quot;, 922 + /// map = ref command &quot;map&quot;, 923 + /// select = ref command &quot;select&quot;, 924 + /// foldl = ref command &quot;foldl&quot;, 925 + /// foldr = ref command &quot;foldr&quot;, 926 + /// dispose = ref command &quot;dispose&quot; [rest of string was truncated]&quot;;. 927 + /// </summary> 928 + public static string prx_prim { 929 + get { 930 + return ResourceManager.GetString("prx_prim", resourceCulture); 931 + } 932 + } 933 + 934 + /// <summary> 935 + /// Looks up a localized string similar to {0} can only be used in a macro context.. 936 + /// </summary> 937 + public static string Reference_can_only_be_used_in_a_macro_context { 938 + get { 939 + return ResourceManager.GetString("Reference_can_only_be_used_in_a_macro_context", resourceCulture); 940 + } 941 + } 942 + 943 + /// <summary> 944 + /// Looks up a localized string similar to {0} requires argument to be a prototype of a macro invocation.. 945 + /// </summary> 946 + public static string Reference_requires_argument_to_be_a_prototype_of_a_macro_invocation { 947 + get { 948 + return ResourceManager.GetString("Reference_requires_argument_to_be_a_prototype_of_a_macro_invocation", resourceCulture); 949 + } 950 + } 951 + 952 + /// <summary> 953 + /// Looks up a localized string similar to {0} requires at least one argument.. 954 + /// </summary> 955 + public static string Reference_requires_at_least_one_argument { 956 + get { 957 + return ResourceManager.GetString("Reference_requires_at_least_one_argument", resourceCulture); 958 + } 959 + } 960 + 961 + /// <summary> 962 + /// Looks up a localized string similar to Cannot create reference to a value (references are values too). 963 + /// </summary> 964 + public static string ReferenceTransformer_CannotCreateReferenceToValue { 965 + get { 966 + return ResourceManager.GetString("ReferenceTransformer_CannotCreateReferenceToValue", resourceCulture); 967 + } 968 + } 969 + 970 + /// <summary> 971 + /// Looks up a localized string similar to Cannot create a reference to the definition of a macro or partial application.. 972 + /// </summary> 973 + public static string ReferenceTransformer_HandleExpand_CannotCreateReferenceToDefinitionOfMacroOrPartialApplication { 974 + get { 975 + return ResourceManager.GetString("ReferenceTransformer_HandleExpand_CannotCreateReferenceToDefinitionOfMacroOrParti" + 976 + "alApplication", resourceCulture); 977 + } 978 + } 979 + 980 + /// <summary> 981 + /// Looks up a localized string similar to File path reference not allowed when just registering a module. Consider using ISelfAssemblingPlan.AssembleAsync instead.. 982 + /// </summary> 983 + public static string SelfAssemblingPlan__forbidFileRefSpec_notallowed { 984 + get { 985 + return ResourceManager.GetString("SelfAssemblingPlan__forbidFileRefSpec_notallowed", resourceCulture); 986 + } 987 + } 988 + 989 + /// <summary> 990 + /// Looks up a localized string similar to Must be one of RecurseIntoFileSystem or RegisterOnly.. 991 + /// </summary> 992 + public static string SelfAssemblingPlan_performCreateTargetDescription_mode { 993 + get { 994 + return ResourceManager.GetString("SelfAssemblingPlan_performCreateTargetDescription_mode", resourceCulture); 995 + } 996 + } 997 + 998 + /// <summary> 999 + /// Looks up a localized string similar to A preflight parse request must come with a resolved path.. 1000 + /// </summary> 1001 + public static string SelfAssemblingPlan_RefSepcMustHaveResolvedPathForPreflightOrder { 1002 + get { 1003 + return ResourceManager.GetString("SelfAssemblingPlan_RefSepcMustHaveResolvedPathForPreflightOrder", resourceCulture); 1004 + } 1005 + } 1006 + 1007 + /// <summary> 1008 + /// Looks up a localized string similar to The Source field of the refSpec parameter must not be null.. 1009 + /// </summary> 1010 + public static string SelfAssemblingPlan_RefSpecMustHaveSource { 1011 + get { 1012 + return ResourceManager.GetString("SelfAssemblingPlan_RefSpecMustHaveSource", resourceCulture); 1013 + } 1014 + } 1015 + 1016 + /// <summary> 1017 + /// Looks up a localized string similar to // Runtime component of the Prexonite shell scripting extensions 1018 + ///Name sh/0.0; 1019 + ///References { 1020 + /// sys/0.0 1021 + ///}; 1022 + /// 1023 + ///namespace sh { 1024 + /// 1025 + /// function stdout = &quot;sh.stdout&quot;; 1026 + /// function stdin = &quot;sh.stdin&quot;; 1027 + /// function stderr = &quot;sh.stderr&quot;; 1028 + ///} export(stdout, stdin, stderr, stream, lines, words, which, create_command, call\sh, (|&gt;), (&lt;|.), (|&gt;.)); 1029 + /// 1030 + ///{ 1031 + /// var time = new command(which(&quot;time&quot;)); 1032 + /// var grep = new command(which(&quot;grep&quot;)); 1033 + /// var tr = new command(which(&quot;tr&quot;)); 1034 + /// var cut = new command(which(&quot;cu [rest of string was truncated]&quot;;. 1035 + /// </summary> 1036 + public static string sh { 1037 + get { 1038 + return ResourceManager.GetString("sh", resourceCulture); 1039 + } 1040 + } 1041 + 1042 + /// <summary> 1043 + /// Looks up a localized string similar to Cannot take a reference to a reference. Too many arrows (&quot;-&gt;&quot;).. 1044 + /// </summary> 1045 + public static string SymbolBuilder_TooManyArrows { 1046 + get { 1047 + return ResourceManager.GetString("SymbolBuilder_TooManyArrows", resourceCulture); 1048 + } 1049 + } 1050 + 1051 + /// <summary> 1052 + /// Looks up a localized string similar to Cannot convert bare reference to symbol entry.. 1053 + /// </summary> 1054 + public static string SymbolEntryConversion_BareReference { 1055 + get { 1056 + return ResourceManager.GetString("SymbolEntryConversion_BareReference", resourceCulture); 1057 + } 1058 + } 1059 + 1060 + /// <summary> 1061 + /// Looks up a localized string similar to Only expansion symbols wrapping simple references can be converted to a SymbolEntry.. 1062 + /// </summary> 1063 + public static string SymbolEntryConversion_ExpansionSymbolTooComplex { 1064 + get { 1065 + return ResourceManager.GetString("SymbolEntryConversion_ExpansionSymbolTooComplex", resourceCulture); 1066 + } 1067 + } 1068 + 1069 + /// <summary> 1070 + /// Looks up a localized string similar to Cannot convert a macro instance symbol to a legacy SymbolEntry.. 1071 + /// </summary> 1072 + public static string SymbolEntryConversion_MacroInstance_not_supported { 1073 + get { 1074 + return ResourceManager.GetString("SymbolEntryConversion_MacroInstance_not_supported", resourceCulture); 1075 + } 1076 + } 1077 + 1078 + /// <summary> 1079 + /// Looks up a localized string similar to Message symbol was not handled before conversion to a legacy SymbolEntry. 1080 + /// </summary> 1081 + public static string SymbolEntryConversion_MessageSymbol_cannot_be_converted_to_SymbolEntry { 1082 + get { 1083 + return ResourceManager.GetString("SymbolEntryConversion_MessageSymbol_cannot_be_converted_to_SymbolEntry", resourceCulture); 1084 + } 1085 + } 1086 + 1087 + /// <summary> 1088 + /// Looks up a localized string similar to Cannot convert namespace to symbol entry.. 1089 + /// </summary> 1090 + public static string SymbolEntryConversion_Namespace { 1091 + get { 1092 + return ResourceManager.GetString("SymbolEntryConversion_Namespace", resourceCulture); 1093 + } 1094 + } 1095 + 1096 + /// <summary> 1097 + /// Looks up a localized string similar to Cannot convert nil symbol to symbol entry.. 1098 + /// </summary> 1099 + public static string SymbolEntryConversion_Nil { 1100 + get { 1101 + return ResourceManager.GetString("SymbolEntryConversion_Nil", resourceCulture); 1102 + } 1103 + } 1104 + 1105 + /// <summary> 1106 + /// Looks up a localized string similar to Legacy symbol entry cannot express arbitrary dereference symbol modifiers.. 1107 + /// </summary> 1108 + public static string SymbolEntryConversion_No_arbirtrary_dereference { 1109 + get { 1110 + return ResourceManager.GetString("SymbolEntryConversion_No_arbirtrary_dereference", resourceCulture); 1111 + } 1112 + } 1113 + 1114 + /// <summary> 1115 + /// Looks up a localized string similar to The symbol handler {0} cannot handle symbols of type {1}.. 1116 + /// </summary> 1117 + public static string SymbolHandler_CannotHandleSymbolOfType { 1118 + get { 1119 + return ResourceManager.GetString("SymbolHandler_CannotHandleSymbolOfType", resourceCulture); 1120 + } 1121 + } 1122 + 1123 + /// <summary> 1124 + /// Looks up a localized string similar to Symbolic reference must consist of at least one symbol name.. 1125 + /// </summary> 1126 + public static string SymbolMExprParser_EmptySymbolicReference { 1127 + get { 1128 + return ResourceManager.GetString("SymbolMExprParser_EmptySymbolicReference", resourceCulture); 1129 + } 1130 + } 1131 + 1132 + /// <summary> 1133 + /// Looks up a localized string similar to //PRX 1134 + /// 1135 + ///Name sys/0.0; 1136 + ///References { 1137 + /// prx::prim/0.0, 1138 + /// prx::core/0.0 1139 + ///}; 1140 + /// 1141 + ///// Re-export prx.prim from sys. We want to keep the existence of the prx.prim module 1142 + ///// a secret. 1143 + ///namespace prx.prim {} 1144 + ///export prx.prim.*; 1145 + /// 1146 + ///// prx.core is the part of the standard library that even other parts of the standard 1147 + ///// library depend on. 1148 + ///// For the moment, prx.core gets dumped directly into sys. 1149 + ///// In case of backwards-incompatible changes in the future, sys would maintain the old. 1150 + ///// behavior while prx.core wo [rest of string was truncated]&quot;;. 1151 + /// </summary> 1152 + public static string sys { 1153 + get { 1154 + return ResourceManager.GetString("sys", resourceCulture); 1155 + } 1156 + } 1157 + 1158 + /// <summary> 1159 + /// Looks up a localized string similar to Cannot resolve symbol in unscoped AST factory. This error message indicates a misuse of the Prexonite compile-time API.. 1160 + /// </summary> 1161 + public static string UnscopedFactory_API_Misuse_symbol_resolve { 1162 + get { 1163 + return ResourceManager.GetString("UnscopedFactory_API_Misuse_symbol_resolve", resourceCulture); 1164 + } 1165 + } 1166 + 1167 + /// <summary> 1168 + /// Looks up a localized string similar to Variable id must not be empty.. 1169 + /// </summary> 1170 + public static string VariableDeclaration_Variable_id_must_not_be_empty { 1171 + get { 1172 + return ResourceManager.GetString("VariableDeclaration_Variable_id_must_not_be_empty", resourceCulture); 1173 + } 1174 + } 1175 + } 1176 + }
+3
Prexonite/Properties/Resources.resx
··· 446 446 <data name="prx_core" type="System.Resources.ResXFileRef, System.Windows.Forms"> 447 447 <value>..\prxlib\prx.core.pxs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 448 448 </data> 449 + <data name="AstIndirectCall_DoEmitPartialApplicationCode_Cannot_translate_slice" xml:space="preserve"> 450 + <value>Cannot translate slice.</value> 451 + </data> 449 452 </root>
+16
PrexoniteTests/Tests/ShellExtensions.cs
··· 454 454 lst.AddRange(elements.Select(element => engine.CreateNativePValue(element))); 455 455 return engine.CreateNativePValue(lst); 456 456 } 457 + 458 + [Test] 459 + public void PartialFunctionAtomSplice() 460 + { 461 + Compile(@" 462 + function f = var args >> map(x => ""<$x>"") >> foldl(->(+), "":""); 463 + 464 + function main(){ 465 + var xs = var args; 466 + var f1 = f(?, *xs, ?, 0, ?); 467 + return f1.(10,20,30); 468 + } 469 + "); 470 + 471 + Expect(":<10><1><2><3><20><0><30>",1,2,3); 472 + } 457 473 } 458 474 459 475 }