Class: CodeRay::Scanners::Scheme
- Defined in:
- lib/coderay/scanners/scheme.rb
Overview
Scheme scanner for CodeRay (by closure). Thanks to murphy for putting CodeRay into public.
Constant Summary collapse
- CORE_FORMS =
%w[ lambda let let* letrec syntax-case define-syntax let-syntax letrec-syntax begin define quote if or and cond case do delay quasiquote set! cons force call-with-current-continuation call/cc ]
- IDENT_KIND =
CaseIgnoringWordList.new(:ident). add(CORE_FORMS, :reserved)
- IDENTIFIER =
IDENTIFIER_INITIAL = /[a-z!@$%&*/:<=>?~_^]/i IDENTIFIER_SUBSEQUENT = /#IDENTIFIER_INITIAL|d|.|+|-/ IDENTIFIER = /#IDENTIFIER_INITIAL#IDENTIFIER_SUBSEQUENT*|+|-|.3/
/[a-zA-Z!@$%&*\/:<=>?~_^][\w!@$%&*\/:<=>?~^.+\-]*|[+-]|\.\.\./
- DIGIT =
/\d/
- DIGIT10 =
DIGIT
- DIGIT16 =
/[0-9a-f]/i
- DIGIT8 =
/[0-7]/
- DIGIT2 =
/[01]/
- RADIX16 =
/\#x/i
- RADIX8 =
/\#o/i
- RADIX2 =
/\#b/i
- RADIX10 =
/\#d/i
- EXACTNESS =
/#i|#e/i
- SIGN =
/[\+-]?/
- EXP_MARK =
/[esfdl]/i
- EXP =
/#{EXP_MARK}#{SIGN}#{DIGIT}+/
- SUFFIX =
/#{EXP}?/
- PREFIX10 =
/#{RADIX10}?#{EXACTNESS}?|#{EXACTNESS}?#{RADIX10}?/
- PREFIX16 =
/#{RADIX16}#{EXACTNESS}?|#{EXACTNESS}?#{RADIX16}/
- PREFIX8 =
/#{RADIX8}#{EXACTNESS}?|#{EXACTNESS}?#{RADIX8}/
- PREFIX2 =
/#{RADIX2}#{EXACTNESS}?|#{EXACTNESS}?#{RADIX2}/
- UINT10 =
/#{DIGIT10}+#*/
- UINT16 =
/#{DIGIT16}+#*/
- UINT8 =
/#{DIGIT8}+#*/
- UINT2 =
/#{DIGIT2}+#*/
- DECIMAL =
/#{DIGIT10}+#+\.#*#{SUFFIX}|#{DIGIT10}+\.#{DIGIT10}*#*#{SUFFIX}|\.#{DIGIT10}+#*#{SUFFIX}|#{UINT10}#{EXP}/
- UREAL10 =
/#{UINT10}\/#{UINT10}|#{DECIMAL}|#{UINT10}/
- UREAL16 =
/#{UINT16}\/#{UINT16}|#{UINT16}/
- UREAL8 =
/#{UINT8}\/#{UINT8}|#{UINT8}/
- UREAL2 =
/#{UINT2}\/#{UINT2}|#{UINT2}/
- REAL10 =
/#{SIGN}#{UREAL10}/
- REAL16 =
/#{SIGN}#{UREAL16}/
- REAL8 =
/#{SIGN}#{UREAL8}/
- REAL2 =
/#{SIGN}#{UREAL2}/
- IMAG10 =
/i|#{UREAL10}i/
- IMAG16 =
/i|#{UREAL16}i/
- IMAG8 =
/i|#{UREAL8}i/
- IMAG2 =
/i|#{UREAL2}i/
- COMPLEX10 =
/#{REAL10}@#{REAL10}|#{REAL10}\+#{IMAG10}|#{REAL10}-#{IMAG10}|\+#{IMAG10}|-#{IMAG10}|#{REAL10}/
- COMPLEX16 =
/#{REAL16}@#{REAL16}|#{REAL16}\+#{IMAG16}|#{REAL16}-#{IMAG16}|\+#{IMAG16}|-#{IMAG16}|#{REAL16}/
- COMPLEX8 =
/#{REAL8}@#{REAL8}|#{REAL8}\+#{IMAG8}|#{REAL8}-#{IMAG8}|\+#{IMAG8}|-#{IMAG8}|#{REAL8}/
- COMPLEX2 =
/#{REAL2}@#{REAL2}|#{REAL2}\+#{IMAG2}|#{REAL2}-#{IMAG2}|\+#{IMAG2}|-#{IMAG2}|#{REAL2}/
- NUM10 =
/#{PREFIX10}?#{COMPLEX10}/
- NUM16 =
/#{PREFIX16}#{COMPLEX16}/
- NUM8 =
/#{PREFIX8}#{COMPLEX8}/
- NUM2 =
/#{PREFIX2}#{COMPLEX2}/
- NUM =
/#{NUM10}|#{NUM16}|#{NUM8}|#{NUM2}/
Constants inherited from Scanner
CodeRay::Scanners::Scanner::DEFAULT_OPTIONS, CodeRay::Scanners::Scanner::ScanError
Method Summary
Methods inherited from Scanner
#column, #each, file_extension, #initialize, #line, normify, #reset, streamable?, #streaming?, #string=, #tokenize, #tokens
Methods included from Plugin
#helper, #included, #plugin_host, #plugin_id, #register_for, #title
Constructor Details
This class inherits a constructor from CodeRay::Scanners::Scanner