1 /* BEGIN INCLUDE FILE ... pl1_macro_next_token.incl.pl1 */
 2 
 3 get_next_token:
 4      procedure;
 5 
 6 /* In the standard entry, find the next non-white-space or comment token.
 7    Otherwise, return after the next token */
 8 
 9           declare standard_entry         bit (1);
10 
11           standard_entry = TRUE;
12           goto common_code;
13 
14 get_next_token$retain_white_space:
15      entry;
16 
17           standard_entry = FALSE;
18           goto common_code;
19 
20 common_code:
21           do while (TRUE);
22                token_index = token_index + 1;
23                if token_index < lbound (token, 1) | token_index > last_token
24                then do;
25                          token_type = no_token;
26                          pct_type = none;
27                          token_length = 0;
28                          token_start = 0;
29                          token_ptr = null ();
30                     end;
31                else do;
32                          token_type = token (token_index).type;
33                          pct_type = token (token_index).pct_type;
34                          token_length = token (token_index).string_size;
35                          token_ptr = token (token_index).string_ptr;
36                          token_start = char_offset_ (token_ptr);
37                     end;
38 
39                if (standard_entry & (token_type ^= white_space_token & token_type ^= comment_token)) | ^standard_entry
40                then return;
41 
42           end;
43 
44      end get_next_token;
45 
46 /* END INCLUDE FILE ... pl1_macro_next_token.incl.pl1  */