text: /**
   * Copyright 2019 AbbeyCatUK
   * 
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   * 
   * http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  
  
  // 8 < - - - - - - - - - - 8 < - - - - - - - - - - 8 < - - - - - - - - - - 8 < - - - - - - - - - - 8 < - - - - - - - - - - 8 < - - - - - - - - - - 8 < - - - - - - - - - -
  
  
  
  #include "basic/header/language/input.h"
  #include "basic/header/core/basic.h"
  #include "basic/header/core/lex.h"
  #include "basic/header/core/stack.h"
  #include "basic/header/core/symbols.h"
  #include "basic/header/language/expression.h" // for expect_token
  #include "os/header/keyboard/keyboard.h"
  #include "os/header/video/video.h"
  
  
  
  // 8 < - - - - - - - - - - 8 < - - - - - - - - - - 8 < - - - - - - - - - - 8 < - - - - - - - - - - 8 < - - - - - - - - - - 8 < - - - - - - - - - - 8 < - - - - - - - - - -
  
  
  
  /**
   * 
   * requires			void
   *
   * returns			void
   * 
   * synopsis			INPUT := INPUT <id>
   * 
   */
  void _input( void )
  {
  
  	struct lex_result result;
  	union symbol_table_entry_value st_entry;
  
  	// assignment	
  	next_token(&result,TRUE);
  	if ( result.token != ID )
  		{ set_error_state( ERROR_SYNTAX ); return; }
  
  	video_print( INPUT_PROMPT );
  	keyboard_readline( (char *)st_entry.sval );
  	add_to_symbol_table( result.str , DATATYPE_STRING , st_entry );
  	
  }
  