Class Input

  extended byde.dante.extex.interpreter.type.AbstractCode
      extended byde.dante.extex.interpreter.primitives.file.AbstractFileCode
          extended byde.dante.extex.interpreter.primitives.file.Input
All Implemented Interfaces:
Code, Configurable, Localizable,
Direct Known Subclasses:

public class Input
extends AbstractFileCode

This class provides an implementation for the primitive \input. It uses the standard encoding (see token register \fileencoding and extex.encoding.

The Primitive \input

The primitive \input takes as argument one file name and opens this file for reading. The following tokens are taken from this input stream. Thus the effect is as if the file contents where copied at the place of the primitive.

If the file can not be opened for reading then an error is raised.

The primitive also makes provisions that the information in \inputfilename and \inputlineno are set properly.


The formal description of this primitive is the following:
       → \input ⟨file name⟩ 


The traditional version of the file name parsing allows the following syntax:

If the parsing is not configured to be strict then the following syntax is allowed as well:

$Revision: 1.30 $
Gerd Neugebauer, Michael Niedermair
See Also:
Serialized Form

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
Fields inherited from class de.dante.extex.interpreter.primitives.file.AbstractFileCode
Constructor Summary
Input(java.lang.String name)
          Creates a new object.
Method Summary
 void execute(Flags prefix, Context context, TokenSource source, Typesetter typesetter)
          Scan the file name and put the file onto the stack of tokenizer streams.
Methods inherited from class de.dante.extex.interpreter.primitives.file.AbstractFileCode
configure, getEncoding, scanFileName, scanInFileKey, scanOutFileKey
Methods inherited from class de.dante.extex.interpreter.type.AbstractCode
enableLocalization, getLocalizer, getName, isIf, isOuter, printable, printableControlSequence, readResolve, setName, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail


protected static final long serialVersionUID
The constant serialVersionUID contains the id for serialization.

See Also:
Constant Field Values
Constructor Detail


public Input(java.lang.String name)
Creates a new object.

name - the name for debugging
Method Detail


public void execute(Flags prefix,
                    Context context,
                    TokenSource source,
                    Typesetter typesetter)
             throws InterpreterException
Scan the file name and put the file onto the stack of tokenizer streams.

Specified by:
execute in interface Code
execute in class AbstractCode
See Also:
Code.execute( de.dante.extex.interpreter.Flags, de.dante.extex.interpreter.context.Context, de.dante.extex.interpreter.TokenSource, de.dante.extex.typesetter.Typesetter)