From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: charstod (Was re: [9fans] yacc question) From: Joel Salomon Date: Sun, 4 Feb 2007 16:00:39 -0500 In-Reply-To: <2c676621cf26397009c6517b10b0c610@plan9.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 0ca9e980-ead2-11e9-9d60-3106f5b1d025 As an aside, my yylex code included: if(c == '.' || (isascii(c) && isdigit(c))){ Bungetc(src); yylval = charstod(getc, 0); Bungetc(src); return NUMBER; } where getc was a simple wrapper around Bgetc(2) for compatibility with charstod(2). Is that the right way to handle this, or is there a cast that would allow me to say yylval = charstod(Bgetc, src); more directly? --Joel