[Ironruby-core] Match operator

Sanghyeon Seo sanxiyn at gmail.com
Sun Oct 14 18:54:58 EDT 2007


2007/10/15, Curt Hagenlocher <curt at hagenlocher.org>:
> I don't see any evidence in
> src\IronRuby\Compiler\Parser\Parser.y that these symbol
> combinations are recognized as distinct tokens.

But the stacktrace shows Ruby.Compiler.Parser.Parse, so I assumed it's
crashing while parsing. Am I wrong?

$ cat t.rb
'' =~ //

$ mono rbx.exe t.rb
System.NullReferenceException: Object reference not set to an instance
of an object
  at Ruby.Compiler.Ast.ExpressionStatement..ctor
(Ruby.Compiler.Ast.Expression expression) [0x00000]
  at Ruby.Compiler.Parser.DoAction (Int32 action) [0x00000]
  at Ruby.Compiler.ShiftReduceParser`2[Ruby.Compiler.TokenValue,Microsoft.Scripting.SourceSpan].Reduce
(Int32 ) [0x00000]
  at Ruby.Compiler.ShiftReduceParser`2[Ruby.Compiler.TokenValue,Microsoft.Scripting.SourceSpan].Parse
() [0x00000]
  at Ruby.Compiler.Parser.Parse (Microsoft.Scripting.CompilerContext
cc) [0x00000]
  at Ruby.Runtime.RubyContext.ParseSourceCode
(Microsoft.Scripting.CompilerContext context) [0x00000]
  at Microsoft.Scripting.LanguageContext.CompileSourceCode
(Microsoft.Scripting.Hosting.SourceUnit sourceUnit,
Microsoft.Scripting.CompilerOptions options,
Microsoft.Scripting.Hosting.ErrorSink errorSink) [0x00000]
  at Microsoft.Scripting.ScriptDomainManager.CompileModule
(System.String name, ScriptModuleKind kind, Microsoft.Scripting.Scope
scope, Microsoft.Scripting.CompilerOptions options,
Microsoft.Scripting.Hosting.ErrorSink errorSink,
Microsoft.Scripting.Hosting.SourceUnit[] sourceUnits) [0x00000]
  at Microsoft.Scripting.ScriptDomainManager.CompileModule
(System.String name, Microsoft.Scripting.Hosting.SourceUnit
sourceUnit) [0x00000]
  at Ruby.Hosting.RubyCommandLine.RunFile (System.String path) [0x00000]

-- 
Seo Sanghyeon


More information about the Ironruby-core mailing list