User Tools

Site Tools


documentation:tiny

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
documentation:tiny [2023/09/16 12:47] – Add WIP note nebelnidasdocumentation:tiny [2023/09/16 21:11] nebelnidas
Line 3: Line 3:
 :!: //This write-up isn't finalized yet and may contain errors!// :!: //This write-up isn't finalized yet and may contain errors!//
  
-Tiny v1 consists of a list of flat (non-hierarchical) mapping entries. Every line in the body corresponds to a new entry. Supported elements are classes, fields and methods; for parameters, variables, comments and a generally more space-efficient format, it's recommended to use its successor, [[documentation:tiny2|Tiny v2]].+Tiny v1 consists of a list of flat (non-hierarchical) mapping entries. Every line in the content section corresponds to a new entry. Supported elements are classes, fields and methods; for parameters, variables, comments and a generally more space-efficient format, it's recommended to use its successor, [[documentation:tiny2|Tiny v2]].
  
 **Example:** **Example:**
 <code> <code>
 v1 official intermediary named v1 official intermediary named
 +# INTERMEDIARY-COUNTER class 289
 +# INTERMEDIARY-COUNTER field 945
 +# INTERMEDIARY-COUNTER method 1204
 +# SORTED-HIERARCHY
 CLASS a class_123 pkg/SomeClass CLASS a class_123 pkg/SomeClass
-FIELD [I a field_789 someField +FIELD a [I a field_789 someField 
-METHOD (III)V a method_456 someMethod +FIELD a Lyj; b field_790 someField2 
-METHOD V b method_479 someMethod2+METHOD a (III)V a method_456 someMethod 
 +METHOD a ()F b method_479 someMethod2
 CLASS b class_234 pkg/xy/AnotherClass CLASS b class_234 pkg/xy/AnotherClass
-METHOD (Ljava/lang/String;)I a method_567 anotherMethod+METHOD b (Ljava/lang/String;)I a method_567 anotherMethod
 </code> </code>
  
Line 19: Line 24:
 ===== Grammar ===== ===== Grammar =====
 <code> <code>
-<file>                  ::= <header> | <header> <entries>+<file>                  ::= <header> | <header> <content>
  
 <header>                ::= 'v1' <tab> <namespace-a> <tab> <namespace-b> <extra-namespaces> <eol> <properties> <header>                ::= 'v1' <tab> <namespace-a> <tab> <namespace-b> <extra-namespaces> <eol> <properties>
Line 27: Line 32:
 <namespace>             ::= <safe-string> <namespace>             ::= <safe-string>
  
-<properties>            ::= '' | '# ' <property> <eol> <properties>+<properties>            ::= '' | '#' <space> <property> <eol> <properties>
 <property>              ::= <property-key> | <property-key> <space> <property-value> <property>              ::= <property-key> | <property-key> <space> <property-value>
 <property-key>          ::= <safe-string> <property-key>          ::= <safe-string>
 <property-value>        ::= <spaceless-safe-string> <property-value>        ::= <spaceless-safe-string>
  
-<entries>               ::= '' | <mapping-entry> <entries> <properties>+<content>               ::= '' | <mapping-entry> <content> <properties>
 <mapping-entry>         ::= <class-entry> | <field-entry> | <method-entry> <mapping-entry>         ::= <class-entry> | <field-entry> | <method-entry>
  
Line 68: Line 73:
   * ''%%<safe-string>%%'' is a non-empty string that must not contain:   * ''%%<safe-string>%%'' is a non-empty string that must not contain:
     * ''\'',     * ''\'',
-    * ''"\n"'', +    * ''\n'', 
-    * ''"\r"'', +    * ''\r'', 
-    * ''"\t"'' or +    * ''\t'' or 
-    * ''"\0"''.+    * ''\0''.
   * ''%%<spaceless-safe-string>%%'' is the same as ''%%<safe-string>%%'', but in addition mustn't contain ''%%<space>%%'' as well.   * ''%%<spaceless-safe-string>%%'' is the same as ''%%<safe-string>%%'', but in addition mustn't contain ''%%<space>%%'' as well.
   * ''%%<properties>%%'' are either in the ''%%<header>%%'' or at the bottom of the file, //not// scattered across both locations.   * ''%%<properties>%%'' are either in the ''%%<header>%%'' or at the bottom of the file, //not// scattered across both locations.
   * ''%%<class-name>%%'' is the binary name of a class as specified in JVMS SE 8 §4.2.1. Nested class identifiers are typically separated with ''$'' (e.g. ''some/package/class$nested$subnested''). Outer names must not be omitted for any namespace.   * ''%%<class-name>%%'' is the binary name of a class as specified in JVMS SE 8 §4.2.1. Nested class identifiers are typically separated with ''$'' (e.g. ''some/package/class$nested$subnested''). Outer names must not be omitted for any namespace.
 +  * ''%%<parent-class-name-a>%%'' is the ''%%<class-name>%%'' of the entry's parent (owning) class.
   * ''%%<field-name>%%''/''%%<method-name>%%'' is the unqualified name of a field/method specified in JVMS SE 8 §4.2.2.   * ''%%<field-name>%%''/''%%<method-name>%%'' is the unqualified name of a field/method specified in JVMS SE 8 §4.2.2.
   * ''%%<field-desc>%%'' is a field descriptor as specified in JVMS SE 8 §4.3.2.   * ''%%<field-desc>%%'' is a field descriptor as specified in JVMS SE 8 §4.3.2.
Line 91: Line 97:
 ===== Standard Properties ===== ===== Standard Properties =====
 These are required to be in the header. These are required to be in the header.
-  * ''SORTED_HIERARCHY'': all member entries are directly beneath their parent class entries+  * ''SORTED-HIERARCHY'': all member entries are directly beneath their parent class entries, and fields are before methods
documentation/tiny.txt · Last modified: 2024/03/25 18:10 by nebelnidas