code: def p_for_sentence_start(p):
      
      gl.LOOPS.append(('FOR', p[2]))
      p[0] = None
  
      if p[4] is None or p[6] is None or p[7] is None:
          return
  
      if is_number(p[4], p[6], p[7]):
          if p[4].value != p[6].value and p[7].value == 0:
              warning(p.lineno(5), 'STEP value is 0 and FOR might loop forever')
  
          if p[4].value > p[6].value and p[7].value > 0:
              warning(p.lineno(5), 'FOR start value is greater than end. This FOR loop is useless')
  
          if p[4].value < p[6].value and p[7].value < 0:
              warning(p.lineno(2), 'FOR start value is lower than end. This FOR loop is useless')
  
      id_type = common_type(common_type(p[4], p[6]), p[7])
      variable = SYMBOL_TABLE.access_var(p[2], p.lineno(2), default_type=id_type)
      if variable is None:
          return
  
      variable.accessed = True
      expr1 = make_typecast(variable.type_, p[4], p.lineno(3))
      expr2 = make_typecast(variable.type_, p[6], p.lineno(5))
      expr3 = make_typecast(variable.type_, p[7], p.lexer.lineno)
  
      p[0] = make_sentence('FOR', variable, expr1, expr2, expr3)
docs: for_start : FOR ID EQ expr TO expr step