Skip to content

Instantly share code, notes, and snippets.

@FROGGS
Created March 23, 2013 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FROGGS/af161ba996cee5bbef88 to your computer and use it in GitHub Desktop.
Save FROGGS/af161ba996cee5bbef88 to your computer and use it in GitHub Desktop.
/dev/std$ ./viv -e 'say "(ab" ~~ /:dba("foo") "(" ~ ")" \w+/'
VAST::comp_unit, BEG: 0, END: 41
│ └─LEX: !!perl/hash:Stash
│ '!file': &1
│ name: (eval)
│ '!id': &2
│ - MY:file<(eval)>
│ '!line': 0
│ $!: !!perl/hash:NAME
│ dynamic: 1
│ file: *1
│ line: 1
│ name: $!
│ scope: my
│ $/: !!perl/hash:NAME
│ dynamic: 1
│ file: *1
│ line: 1
│ name: $/
│ scope: my
│ $_: !!perl/hash:NAME
│ dynamic: 1
│ file: *1
│ line: 1
│ name: $_
│ scope: my
│ '&say': !!perl/hash:NAME
│ file:
│ name: CORE.setting
│ line: 402
│ mult: only
│ name: OUTER::OUTER::<&say>
│ olex: *2
│ rebind: 1
│ scope: my
│ varbind:
│ truename: OUTER::OUTER::<&say>
│ 'OUTER::':
│ - MY:file<CORE.setting>:line(676):pos(19754)
└─VAST::statementlist, BEG: 0, END: 41
├─VAST::statement, BEG: 0, END: 41
│ └─VAST::term__S_identifier, BEG: 0, END: 41, SYM: identifier, _from: 41,
│ │ _pos: 41, _specific: 1, dba: term, prec: z=
│ ├─VAST::identifier, BEG: 0, END: 3, TEXT: say
│ └─VAST::args, BEG: 3, END: 41, invocant: undef
│ └─VAST::arglist, BEG: 4, END: 41, WS: 1
│ └─VAST::Chaining, ARITY: CHAIN, BEG: 4, END: 40, WS: 1
│ ├─VAST::term__S_value, BEG: 4, END: 9, SYM: value, WS: 1,
│ │ │ _specific: 1
│ │ └─VAST::value__S_quote, BEG: 4, END: 9, SYM: quote, WS: 1,
│ │ │ _specific: 1
│ │ └─VAST::quote__S_Double_Double, BEG: 4, END: 9, SYM: " ",
│ │ │ WS: 1, _specific: 1
│ │ └─VAST::nibbler, BEG: 5, END: 8
│ │ └─VAST::Str, TEXT: (ab, _from: 5, _pos: 8
│ ├─VAST::infixish, BEG: 10, END: 12, SYM: ~~, WS: 1, _from: 12,
│ │ │ _pos: 12, assoc: chain, dba: chaining, diffy: 1, iffy: 1,
│ │ │ prec: m=, pure: 1
│ │ └─VAST::SYM_infix__S_TildeTilde, BEG: 10, END: 12, SYM: ~~,
│ │ TEXT: ~~, WS: 1, _from: 12, _op: VAST::infix__S_TildeTilde,
│ │ _pos: 12, _specific: 1, assoc: chain, dba: chaining,
│ │ diffy: 1, iffy: 1, prec: m=, pure: 1
│ └─VAST::term__S_value, BEG: 13, END: 40, SYM: value, WS: 1,
│ │ _specific: 1
│ └─VAST::value__S_quote, BEG: 13, END: 40, SYM: quote, WS: 1,
│ │ _specific: 1
│ └─VAST::quote__S_Slash_Slash, BEG: 13, END: 40, SYM: / /,
│ │ WS: 1, _specific: 1
│ └─VAST::nibbler, BEG: 14, END: 39
│ └─VAST::quant_atom_list, BEG: 14, END: 39
│ ├─VAST::quantified_atom, BEG: 14, END: 26
│ │ ├─VAST::atom, BEG: 14, END: 25
│ │ │ └─VAST::metachar__S_mod, BEG: 14, END: 25, SYM: :dba,
│ │ │ │ _specific: 1
│ │ │ └─VAST::mod_internal__S_p6adv, BEG: 14, END: 25,
│ │ │ │ SYM: :dba, _specific: 1
│ │ │ └─VAST::quotepair, BEG: 14, END: 25, k: dba
│ │ │ ├─VAST::identifier, BEG: 15, END: 18,
│ │ │ │ TEXT: dba
│ │ │ └─VAST::circumfix__S_Paren_Thesis, BEG: 18,
│ │ │ │ END: 25, SYM: ( ), _from: 25, _pos: 25,
│ │ │ │ _specific: 1, dba: term, prec: z=
│ │ │ └─VAST::semilist, BEG: 19, END: 24
│ │ │ ├─VAST::statement, BEG: 19, END: 24
│ │ │ │ └─VAST::term__S_value, BEG: 19, END: 24,
│ │ │ │ │ SYM: value, _specific: 1
│ │ │ │ └─VAST::value__S_quote, BEG: 19,
│ │ │ │ │ END: 24, SYM: quote,
│ │ │ │ │ _specific: 1
│ │ │ │ └─VAST::quote__S_Double_Double,
│ │ │ │ │ BEG: 19, END: 24, SYM: " ",
│ │ │ │ │ _specific: 1
│ │ │ │ └─VAST::nibbler, BEG: 20, END: 23
│ │ │ │ └─VAST::Str, TEXT: foo,
│ │ │ │ _from: 20, _pos: 23
│ │ │ └─VAST::eat_terminator, BEG: 24, END: 24,
│ │ │ TEXT:
│ │ └─VAST::sigmaybe__S_normspace, BEG: 25, END: 26,
│ │ │ SYM: normspace, _specific: 1
│ │ └─VAST::normspace, BEG: 25, END: 26, TEXT:
│ └─VAST::quantified_atom, BEG: 26, END: 39, WS: 1
│ ├─VAST::atom, BEG: 26, END: 29, WS: 1
│ │ └─VAST::metachar__S_Double_Double, BEG: 26, END: 29,
│ │ │ SYM: " ", WS: 1, _specific: 1
│ │ └─VAST::quote__S_Double_Double, BEG: 26, END: 29,
│ │ │ SYM: " ", WS: 1, _specific: 1
│ │ └─VAST::nibbler, BEG: 27, END: 28
│ │ └─VAST::Str, TEXT: (, _from: 27, _pos: 28
│ ├─VAST::sigmaybe__S_normspace, BEG: 29, END: 30,
│ │ │ SYM: normspace, _specific: 1
│ │ └─VAST::normspace, BEG: 29, END: 30, TEXT:
│ ├─VAST::quantifier__S_Tilde, BEG: 30, END: 39, SYM: ~,
│ │ │ WS: 1, _specific: 1
│ │ ├─VAST::sigmaybe__S_normspace, BEG: 31, END: 32,
│ │ │ │ SYM: normspace, _specific: 1
│ │ │ └─VAST::normspace, BEG: 31, END: 32, TEXT:
│ │ ├─VAST::quantified_atom, BEG: 32, END: 36, WS: 1
│ │ │ ├─VAST::atom, BEG: 32, END: 35, WS: 1
│ │ │ │ └─VAST::metachar__S_Double_Double, BEG: 32,
│ │ │ │ │ END: 35, SYM: " ", WS: 1, _specific: 1
│ │ │ │ └─VAST::quote__S_Double_Double, BEG: 32,
│ │ │ │ │ END: 35, SYM: " ", WS: 1, _specific: 1
│ │ │ │ └─VAST::nibbler, BEG: 33, END: 34
│ │ │ │ └─VAST::Str, TEXT: ), _from: 33, _pos: 34
│ │ │ └─VAST::sigmaybe__S_normspace, BEG: 35, END: 36,
│ │ │ │ SYM: normspace, _specific: 1
│ │ │ └─VAST::normspace, BEG: 35, END: 36, TEXT:
│ │ ├─VAST::sigmaybe__S_nosp, BEG: 36, END: 36,
│ │ │ SYM: nosp, TEXT: , WS: 1, _specific: 1
│ │ └─VAST::quantified_atom, BEG: 36, END: 39, WS: 1
│ │ ├─VAST::atom, BEG: 36, END: 38, WS: 1
│ │ │ └─VAST::metachar__S_Back, BEG: 36, END: 38,
│ │ │ │ SYM: \, WS: 1, _specific: 1
│ │ │ └─VAST::backslash__S_w, BEG: 37, END: 38,
│ │ │ SYM: w, TEXT: w, _specific: 1
│ │ ├─VAST::sigmaybe__S_nosp, BEG: 38, END: 38,
│ │ │ SYM: nosp, TEXT: , _specific: 1
│ │ ├─VAST::quantifier__S_Plus, BEG: 38, END: 39,
│ │ │ │ SYM: +, _specific: 1
│ │ │ └─VAST::quantmod, BEG: 39, END: 39, TEXT:
│ │ └─VAST::sigmaybe__S_nosp, BEG: 39, END: 39,
│ │ SYM: nosp, TEXT: , _specific: 1
│ └─VAST::sigmaybe__S_nosp, BEG: 39, END: 39, SYM: nosp,
│ TEXT: , _specific: 1
└─VAST::eat_terminator, BEG: 41, END: 41, TEXT: , WS: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment