Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bash Scanner #119

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Bash Scanner #119

wants to merge 10 commits into from

Conversation

korny
Copy link
Member

@korny korny commented Mar 10, 2013

Work in progress. Lacks tests. Solves #19, might be related to #115.

@ghost ghost assigned korny Jun 10, 2013
@wikimatze
Copy link

When will this be merged? I'm using @kou rabbit plugin for presentations and it would be nice to use backticks for highlightning code.

I think that I'm not the only person waiting for this.

@korny
Copy link
Member Author

korny commented Jan 23, 2014

It cannot be merged because it's broken. It's not my code, it was a contribution. As always, we need test code examples.

Currently, when I run the tests:

$ new=bash.* ruby test/scanners/suite.rb

Loaded suite CodeRay::Scanners
Started

    >> Testing bash script scanner <<

Random test - finished.
Loading examples in test/scanners/bash/*.in.sh...4 examples found.

              erb_bash    138 B   incremental, shuffled, new test, identity, highlighting, too small.
               example  456.5 KiB incremental, shuffled, complete...scanning.../Users/murphy/ruby/coderay/lib/coderay/scanners/bash.rb:246: warning: character class has duplicated range: /[^\)\$RubyWrapper\\]+/
/Users/murphy/ruby/coderay/lib/coderay/scanners/bash.rb:246: warning: character class has duplicated range: /[^\)\$RubyWrapper\\]+/
/Users/murphy/ruby/coderay/lib/coderay/scanners/bash.rb:246: warning: character class has duplicated range: /[^\)\$RubyWrapper\\]+/
/Users/murphy/ruby/coderay/lib/coderay/scanners/bash.rb:246: warning: character class has duplicated range: /[^\)\$RubyWrapper\\]+/
/Users/murphy/ruby/coderay/lib/coderay/scanners/bash.rb:246: warning: character class has duplicated range: /[^\)\$RubyWrapper\\]+/
/Users/murphy/ruby/coderay/lib/coderay/scanners/bash.rb:246: warning: character class has duplicated range: /[^\)\$RubyWrapper\\]+/
/Users/murphy/ruby/coderay/lib/coderay/scanners/bash.rb:246: warning: character class has duplicated range: /[^\)\$RubyWrapper\\]+/
/Users/murphy/ruby/coderay/lib/coderay/scanners/bash.rb:246: warning: character class has duplicated range: /[^\)\$RubyWrapper\\]+/
/Users/murphy/ruby/coderay/lib/coderay/scanners/bash.rb:246: warning: character class has duplicated range: /[^\)\$RubyWrapper\\]+/
/Users/murphy/ruby/coderay/lib/coderay/scanners/bash.rb:246: warning: character class has duplicated range: /[^\)\$RubyWrapper\\]+/
/Users/murphy/ruby/coderay/lib/coderay/scanners/bash.rb:246: warning: character class has duplicated range: /[^\)\$RubyWrapper\\]+/
/Users/murphy/ruby/coderay/lib/coderay/scanners/bash.rb:246: warning: character class has duplicated range: /[^\)\$RubyWrapper\\]+/
/Users/murphy/ruby/coderay/lib/coderay/scanners/bash.rb:246: warning: character class has duplicated range: /[^\)\$RubyWrapper\\]+/
/Users/murphy/ruby/coderay/lib/coderay/scanners/bash.rb:246: warning: character class has duplicated range: /[^\)\$RubyWrapper\\]+/
encoding...Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell, :string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:shell, :string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :string, :shell].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :string, :string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string, :string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :string, :string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string, :string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :string, :string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string, :string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :string, :string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string, :string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :string, :string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string, :string, :string].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string, :string].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string, :string].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:string, :shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string, :string].
Malformed token stream: Trying to close a token group (:string) that is not open. Open are: [:shell].
Malformed token stream: Trying to close a token group (:shell) that is not open. Open are: [:string].
E
Finished in 5.550383 seconds.

  1) Error:
test_ALL(Bash):
CodeRay::Scanners::Scanner::ScanError: 

***ERROR in scanner.rb:333:in `raise_inspect': unknown token kind :bin (text was "&") (after  tokens)

tokens:


current line: 21  column: 36  pos: 502
matched: "&"  state: "Error in CodeRay::Scanners::Bash#scan_tokens, initial state was: :initial"
bol?: false,  eos?: false


surrounding code:
"[[ -n \"${current_bundle}\" ]] &"  ~~  "& builtin command -v bundle >/"


***ERROR***


    /Users/murphy/ruby/coderay/lib/coderay/encoders/debug_lint.rb:22:in `text_token'
    /Users/murphy/ruby/coderay/lib/coderay/scanners/bash.rb:257:in `scan_tokens'
    /Users/murphy/ruby/coderay/lib/coderay/scanner.rb:190:in `tokenize'
    /Users/murphy/ruby/coderay/lib/coderay/encoder.rb:85:in `encode'
    /Users/murphy/ruby/coderay/test/scanners/coderay_suite.rb:379:in `complete_test'
    /Users/murphy/ruby/coderay/test/scanners/coderay_suite.rb:280:in `example_test'
    /Users/murphy/ruby/coderay/test/scanners/coderay_suite.rb:208:in `block (2 levels) in examples_test'
    /Users/murphy/ruby/coderay/test/scanners/coderay_suite.rb:187:in `each'
    /Users/murphy/ruby/coderay/test/scanners/coderay_suite.rb:187:in `block in examples_test'
    /Users/murphy/ruby/coderay/test/scanners/coderay_suite.rb:124:in `block in dir'
    /Users/murphy/ruby/coderay/test/scanners/coderay_suite.rb:123:in `chdir'
    /Users/murphy/ruby/coderay/test/scanners/coderay_suite.rb:123:in `dir'
    /Users/murphy/ruby/coderay/test/scanners/coderay_suite.rb:173:in `examples_test'
    /Users/murphy/ruby/coderay/test/scanners/coderay_suite.rb:161:in `block in test_ALL'
    /Users/murphy/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
    /Users/murphy/ruby/coderay/test/scanners/coderay_suite.rb:158:in `test_ALL'

1 tests, 0 assertions, 0 failures, 1 errors

@wikimatze
Copy link

Hi @korny is there a way that we can pair on a remote session with vim and tmux to fix that problem? When I run the tests of the original repo on my machine with rake test:units or rake test:functional everything is green. But running rake test:scanners gives me the following:

Cloning into 'test/scanners'...
remote: Reusing existing pack: 1037, done.
remote: Total 1037 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (1037/1037), 10.59 MiB | 888.00 KiB/s, done.
Resolving deltas: 100% (483/483), done.
Checking connectivity... done
/home/wikimatze/.rubies/ruby-2.1.0/bin/ruby test/scanners/suite.rb
Loaded suite CodeRay::Scanners
Started

    >> Skipping tests for bash, no scanner found <<
.
    >> Testing C scanner <<

Random test - finished.
Loading examples in test/scanners/c/*.in.c...7 examples found.

                 elvis    370 B   incremental, shuffled, complete, identity, highlighting, too small.
                 empty      0 B   incremental, -skipped- complete, identity, highlighting, too small.
                 error      4 B   incremental, -skipped- complete, identity, highlighting, too small.
                error2      3 B   incremental, -skipped- complete, identity, highlighting, too small.
           open-string      1 B   incremental, -skipped- complete, identity, highlighting, too small.
                  ruby    2.2 MiB incremental, shuffled, complete, identity, highlighting, in kTok/s:  761 scan +  473 encode =  292 both,  364 stream, in kB/s:  2779 /  1330.
               strange    3.7 KiB incremental, shuffled, complete, identity, highlighting, in kTok/s:  559 scan +  252 encode =  174 both,  203 stream, in kB/s:  3049 /  1104.

Average speed for C scanner: 2779 kB/s scanning / 1330 kB/s highlighting to HTML page.
Finished in 8.48s.

So you are trying to implement the bash scanner, right?

Kindly regards

Matthias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants