"a-zA-Z_"
:-------------------------------------------------------------------------------
  slowa kluczowe, zmienne i pozostale wyrazy
{
  0=c;
  while +c in ["a-zA-Z0-9_"] do 0+c;
  >_ident>0
}

#1..#32
:-------------------------------------------------------------------------------
  pomiñ bia³e znaki
{ while +c in [#1..#32] do ;}

// pomoc w odczywywaniu liczby zmiennoprzecinkowej z e (patrz dalej)

inline parser_real_e
  if (c = 'E') or (c = 'e') then
    0+c;
    if (+c <> '+') and (not (c in ["0-9"])) then
      >(error)syntax_error_in_real_number!
    }

    0+c;
    while +c in ["0-9"] do 0+c;
    >_real_num>(float)0!
  }
end

"0-9"
:-------------------------------------------------------------------------------
  liczba normalna, zmiennoprzecinkowa, z uzyciem e(E)
{
  0=c;
  while +c in ["0-9"] do 0+c;

  if (c = '.') then
    if (+c = '.') then
      >num>(int)0-!
    }

    0+c;
    while +c in ["0-9"] do 0+c;

    <parser_real_e
    >_real_num>(float)0!
  }
  <parser_real_e
  >_num>(int)0!
}

'$'
:-------------------------------------------------------------------------------
  Liczba w systemie szesnaskowym
{
  0=c;
  while +c in ["0-9A-Fa-f"] do 0+c;
  >_hex_num>(int)0!
}

'{'
:-------------------------------------------------------------------------------
  Dyrektywa lub komentarz 
{
  if +c = '$' then
    >_open_brace_dollar+!
  }

  while c <> '}' do +c;
  +c;
}

'/'
:-------------------------------------------------------------------------------
  Znak dzielenia badz komentarz
{
  if +c = '/' then 
    while (c <> #13) and (c <> #10) do +c;
    ^
  }else{
    >_whack!
  }
}

inline after_char(@char, @push, @sec_char, @sec_push)
@char
:-------------------------------------------------------------------------------
  Wariant polozenia na stos innej wartosci gdy za znakiem wystepuje inny znak
{
  if +c = @sec_char then
    >@sec_push+!
  }
  >@push!
} 
end

<after_char("'*'", '_star', "')'", '_star_close_parenthesis')
<after_char("':'", '_colon', "'='", '_colon_equals')
<after_char("'<'", '_less', "'='", '_less_equals')
<after_char("'>'", '_greater', "'='", '_greater_equals')
<after_char("'.'", '_dot', "'.'", '_double_dot')

// proste znaki
'}':{>_close_brace+!}
'+':{>_plus+!}
'-':{>_minus+!}
'@':{>_at+!}
';':{>_semicolon+!}
',':{>_comma+!}
'[':{>_open_bracket+!}
']':{>_close_bracket+!}
'=':{>_equals+!}
')':{>_close_parenthesis+!}
'^':{>_caret+!}
#0:{>_eof!} // koniec pliku !

// pomoc w odczywywaniu danych za # (dla znaku)
inline parse_sharp
  1nil;
  if +c = '$' then
    1+c;

    if +c in ["0-9a-fA-F"] then
      1+c;
    }else{
      >(error)constant_expression_expected>(char)!
    }

    while +c in ["0-9a-fA-F"] do 1+c;
    if |1 > 3 then
      0+'?';
    }else{
      0+chr(int(1s));
    }
  }else{
    if c in ["0-9"] then
      1+c;
    }else{
      >(error)constant_expression_expected>(char)!
    }

    while +c in ["0-9"] do 1+c;

    if |1 > 4 then
      0+'?';
    }else{
      0i = int(1s);
      if 0i > $FF then
        0+'?';
      }else{
        0+chr(0i);
      }
    }
  }
end

"'#"
:-------------------------------------------------------------------------------
  Ciag znakow (napis string) w nawiasach ' ' z przylaczonymi pojedynczymi 
  znakami w postaci #kod_znaku
{
  0nil;
  repeat
    if c = "'" then
      while (+c <> "'") and (not (c in [#13, #10])) do 0+c;
      if c in [#13, #10] then
        >(error)unterminated_string!
      }
      +c;
    }
    case c of
      '#': <parse_sharp
      "'": {
          0+"'";
          ^
        }
    }
  until (c <> "'") and (c <> '#');
  >(str)0!
}

'('
:-------------------------------------------------------------------------------
  Komentarz (*, Dyrektywa (*$, lub po prostu zwykly nawias (
{
  if +c = '*' then
    if +c = '$' then
      >_open_parenthesis_star_dollar+!
    }
    repeat
      while c <> '*' do +c;
    until +c = ')';
    +c;
  }else{
    >_open_parenthesis!
  }
}

// niespodziewany znak
else
{
  >(error)unknown_char>(char)+!
}