Skip to content

Simple Input File Format

sciwhiz12 edited this page Jun 9, 2021 · 2 revisions

The following format is the simple input file format (also known as the simple input format), a simple text-based format for entering mapping data in the form of input files.

Each line is trimmed of leading and trailing whitespace before being parsed.

Any text after a number sign (#) is considered to be a comment, and removed (along with the number sign itself). If a line is empty after being removed of its comment, it is skipped from further processing.

A line which begins with a keyword is a definition line, and is split into space-delimited tokens. The amount of tokens required for a line depends on the keyword:

  • package <package name>
  • class <class name>
  • field <field name> <descriptor>
  • method <method name> <method descriptor>
  • parameter <index> [name]

Package and class names use forward slashes (/) instead of periods (.).

The owning class of field and method definitions will be the previously defined class. The owning method of a method parameter definition will be the previously defined method.

Any lines that are not definition lines are javadoc lines, which will be attributed to the previous definition. There may be 0 or more javadoc lines between any two definitions.

Example:

package com/example/package
# This is a comment, and will not be a javadoc line
class com/example/package/ExampleClass
	Some javadoc for this class
    field thingy I # defines a field
    	Javadoc for the field
    method main ([Ljava/lang/String;)V
        param 0 test
Clone this wiki locally