



KeyboardPrimitive (lines 802-848)
Back to List
Browsing parserm.h
0802 #Endif; ! TARGET_
0803
0804 ! ============================================================================
0805 ! The InformParser object abstracts the front end of the parser.
0806 !
0807 ! InformParser.parse_input(results)
0808 ! returns only when a sensible request has been made, and puts into the
0809 ! "results" buffer:
0810 !
0811 ! --> 0 = The action number
0812 ! --> 1 = Number of parameters
0813 ! --> 2, 3, ... = The parameters (object numbers), but
0814 ! 0 means "put the multiple object list here"
0815 ! 1 means "put one of the special numbers here"
0816 !
0817 ! ----------------------------------------------------------------------------
0818
0819 Object InformParser "(Inform Parser)"
0820 with parse_input [ results; Parser__parse(results); ],
0821 has proper;
0822
0823 ! ----------------------------------------------------------------------------
0824 ! The Keyboard routine actually receives the player's words,
0825 ! putting the words in "a_buffer" and their dictionary addresses in
0826 ! "a_table". It is assumed that the table is the same one on each
0827 ! (standard) call.
0828 !
0829 ! It can also be used by miscellaneous routines in the game to ask
0830 ! yes-no questions and the like, without invoking the rest of the parser.
0831 !
0832 ! Return the number of words typed
0833 ! ----------------------------------------------------------------------------
0834
0835 #Ifdef TARGET_ZCODE;
0836
0837 [ KeyboardPrimitive a_buffer a_table;
0838 read a_buffer a_table;
0839
0840 #Iftrue (#version_number == 6);
0841 @output_stream -1;
0842 @loadb a_buffer 1 -> sp;
0843 @add a_buffer 2 -> sp;
0844 @print_table sp sp;
0845 new_line;
0846 @output_stream 1;
0847 #Endif;
0848 ];
Last updated 27 February 2004. The librarian in charge of this page is Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight. Please email any comments, suggestions or corrections to cedenqs@inform-fiction.org.