Changes between Version 24 and Version 25 of PIRCDevelopment

Show
Ignore:
Timestamp:
08/09/09 10:22:22 (12 years ago)
Author:
kjs
Comment:

multi heredoc

Legend:

Unmodified
Added
Removed
Modified
  • PIRCDevelopment

    v24 v25  
    226226==== Scenario 2: multiple heredoc parsing ==== 
    227227 
     228Consider the following input: 
     229 
     230{{{ 
     231 
     232.sub main 
     233   foo(<<'A', 42, <<'B', <<C') 
     234heredoc text a 
     235A 
     236heredoc text b 
     237B 
     238heredoc text c 
     239C 
     240 
     241.end 
     242 
     243}}} 
     244 
     245Now, scanning up to and including the first heredoc marker: 
     246 
     247{{{ 
     248    foo(<<'A' 
     249}}} 
     250 
     251is done exactly the same as described in Scenario 1. Assume that the lexer just found the heredoc delimiter for heredoc string A. The lexer's current state is HEREDOC_STRING, but as can be seen in [source:/trunk/compilers/pirc/src/hdocprep.l#L404 line 404], the lexer will now switch to SCAN_STRING state in order to scan the "rest of the line". The rest of the line buffer contains: 
     252 
     253{{{ 
     254   , 42, <<'B', <<'C') 
     255}}} 
     256    
     257 
    228258==== POD parsing ==== 
    229259