pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pdf-devel] pdf functions, pdf_stm_t


From: jemarch
Subject: Re: [pdf-devel] pdf functions, pdf_stm_t
Date: Mon, 15 Oct 2007 22:15:41 +0200
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.50 (powerpc-unknown-linux-gnu) MULE/5.0 (SAKAKI)

   I have built a pdf_stm_getc() - Macro around a buffer-filling  
   call to  pdf_stm_read( stm,&buf,bufsize). 
   Is this the correct way? 
   May I use a similar interface for the type4 lexer?
   Is there some code I might reuse?

The (uncommited yet) changes to streams provides an efficient `int
pdf_stm_read_char ()':

   `read_char'

       Read a character from the backend storage and return it in an
       integer (may be PDF_EOF). This function should only be called when
       `read_p' returns true.

Dont worry about this, you can continue using your `pdf_stm_getc'. I
will change it to use the new stm interface when merging your changes
in.

   A full flex/bison parser seems to be overkill. 
   The list of operators is not likely to change, and 
   I can compile the token stream for a type4 function into 
   bytecodes in a single pass:  braces and if/ifelse are turned 
   into jump instructions. 

If you can implement such a simple lexer one-pass parser, please do
it.

Thanks.

-- 
Jose E. Marchesi  <address@hidden>
                  <address@hidden>

GNU Spain         http://es.gnu.org
GNU Project       http://www.gnu.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]