Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ====================Source:====================
- {}
- {
- my_thing = your_thing;
- {}
- {
- my_thing = your_thing;
- }
- {
- my_method(bob)
- {
- bob = boblin;
- };
- }
- my_thing = your_thing;
- }
- ====================Source no comments:====================
- {}
- {
- my_thing = your_thing;
- {}
- {
- my_thing = your_thing;
- }
- {
- my_method(bob)
- {
- bob = boblin;
- };
- }
- my_thing = your_thing;
- }
- ====================Tokens:====================
- Line: Token: Token Rule:
- 00001 { $open_curly_brace
- 00001 } $close_curly_brace
- 00003 { $open_curly_brace
- 00005 my_thing $identifier
- 00005 = $assignment
- 00005 your_thing $identifier
- 00005 ; $end_of_line
- 00007 { $open_curly_brace
- 00007 } $close_curly_brace
- 00009 { $open_curly_brace
- 00010 my_thing $identifier
- 00010 = $assignment
- 00010 your_thing $identifier
- 00010 ; $end_of_line
- 00011 } $close_curly_brace
- 00013 { $open_curly_brace
- 00015 my_method $identifier
- 00015 ( $open_paren
- 00015 bob $identifier
- 00015 ) $close_paren
- 00016 { $open_curly_brace
- 00017 bob $identifier
- 00017 = $assignment
- 00017 boblin $identifier
- 00017 ; $end_of_line
- 00018 } $close_curly_brace
- 00018 ; $end_of_line
- 00019 } $close_curly_brace
- 00021 my_thing $identifier
- 00021 = $assignment
- 00021 your_thing $identifier
- 00021 ; $end_of_line
- 00023 } $close_curly_brace
- ====================Concrete syntax tree:====================
- root:
- |---->TMP root:
- | |---->TMP nests:
- | | |---->TMP nests:
- | | | |---->CST nest:
- | | | | |---->$open_curly_brace: {
- | | | | |---->$close_curly_brace: }
- | | |---->TMP nests:
- | | | |---->CST nest:
- | | | | |---->$open_curly_brace: {
- | | | | |---->TMP nestable:
- | | | | | |---->TMP nestable:
- | | | | | | |---->CST line:
- | | | | | | | |---->TMP lineable:
- | | | | | | | | |---->TMP lineable:
- | | | | | | | | | |---->$identifier: my_thing
- | | | | | | | | |---->TMP lineable:
- | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | |---->$assignment: =
- | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | |---->$identifier: your_thing
- | | | | | | | |---->$end_of_line: ;
- | | | | | |---->TMP nestable:
- | | | | | | |---->TMP nestable:
- | | | | | | | |---->CST nest:
- | | | | | | | | |---->$open_curly_brace: {
- | | | | | | | | |---->$close_curly_brace: }
- | | | | | | |---->TMP nestable:
- | | | | | | | |---->TMP nestable:
- | | | | | | | | |---->CST nest:
- | | | | | | | | | |---->$open_curly_brace: {
- | | | | | | | | | |---->TMP nestable:
- | | | | | | | | | | |---->CST line:
- | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | | |---->$identifier: my_thing
- | | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | | | |---->$assignment: =
- | | | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | | | |---->$identifier: your_thing
- | | | | | | | | | | | |---->$end_of_line: ;
- | | | | | | | | | |---->$close_curly_brace: }
- | | | | | | | |---->TMP nestable:
- | | | | | | | | |---->TMP nestable:
- | | | | | | | | | |---->CST nest:
- | | | | | | | | | | |---->$open_curly_brace: {
- | | | | | | | | | | |---->TMP nestable:
- | | | | | | | | | | | |---->CST line:
- | | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | | | |---->$identifier: my_method
- | | | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | | | | |---->$open_paren: (
- | | | | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | | | | | |---->$identifier: bob
- | | | | | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | | | | | |---->$close_paren: )
- | | | | | | | | | | | | |---->CST nest:
- | | | | | | | | | | | | | |---->$open_curly_brace: {
- | | | | | | | | | | | | | |---->TMP nestable:
- | | | | | | | | | | | | | | |---->CST line:
- | | | | | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | | | | | | |---->$identifier: bob
- | | | | | | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | | | | | | | |---->$assignment: =
- | | | | | | | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | | | | | | | |---->$identifier: boblin
- | | | | | | | | | | | | | | | |---->$end_of_line: ;
- | | | | | | | | | | | | | |---->$close_curly_brace: }
- | | | | | | | | | | | | |---->$end_of_line: ;
- | | | | | | | | | | |---->$close_curly_brace: }
- | | | | | | | | |---->TMP nestable:
- | | | | | | | | | |---->CST line:
- | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | |---->$identifier: my_thing
- | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | | |---->$assignment: =
- | | | | | | | | | | | | |---->TMP lineable:
- | | | | | | | | | | | | | |---->$identifier: your_thing
- | | | | | | | | | | |---->$end_of_line: ;
- | | | | |---->$close_curly_brace: }
- ====================Abstract syntax tree:====================
- root:
- |---->CST nest:
- | |---->$open_curly_brace: {
- | |---->$close_curly_brace: }
- |---->CST nest:
- | |---->$open_curly_brace: {
- | |---->CST line:
- | | |---->$identifier: my_thing
- | | |---->$assignment: =
- | | |---->$identifier: your_thing
- | | |---->$end_of_line: ;
- | |---->CST nest:
- | | |---->$open_curly_brace: {
- | | |---->$close_curly_brace: }
- | |---->CST nest:
- | | |---->$open_curly_brace: {
- | | |---->CST line:
- | | | |---->$identifier: my_thing
- | | | |---->$assignment: =
- | | | |---->$identifier: your_thing
- | | | |---->$end_of_line: ;
- | | |---->$close_curly_brace: }
- | |---->CST nest:
- | | |---->$open_curly_brace: {
- | | |---->CST line:
- | | | |---->$identifier: my_method
- | | | |---->$open_paren: (
- | | | |---->$identifier: bob
- | | | |---->$close_paren: )
- | | | |---->CST nest:
- | | | | |---->$open_curly_brace: {
- | | | | |---->CST line:
- | | | | | |---->$identifier: bob
- | | | | | |---->$assignment: =
- | | | | | |---->$identifier: boblin
- | | | | | |---->$end_of_line: ;
- | | | | |---->$close_curly_brace: }
- | | | |---->$end_of_line: ;
- | | |---->$close_curly_brace: }
- | |---->CST line:
- | | |---->$identifier: my_thing
- | | |---->$assignment: =
- | | |---->$identifier: your_thing
- | | |---->$end_of_line: ;
- | |---->$close_curly_brace: }
- ====================Reconstructed Source:====================
- { } { my_thing = your_thing ; { } { my_thing = your_thing ; } { my_method ( bob ) { bob = boblin ; } ; } my_thing = your_thing ; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement