User Tools

Site Tools


documentation:tiny2

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:tiny2 [2023/09/16 08:51] – Order fields before methods nebelnidasdocumentation:tiny2 [2023/09/16 21:09] – Clarify <safe-string> explanation nebelnidas
Line 26: Line 26:
 ===== Grammar ===== ===== Grammar =====
 <code> <code>
-<file>                          ::= <header> | <header> <sections>+<file>                          ::= <header> | <header> <content>
  
 <header>                        ::= 'tiny' <tab> <major-version> <tab> <minor-version> <tab> <namespace-a> <tab> <namespace-b> <extra-namespaces> <eol> <properties> <header>                        ::= 'tiny' <tab> <major-version> <tab> <minor-version> <tab> <namespace-a> <tab> <namespace-b> <extra-namespaces> <eol> <properties>
Line 41: Line 41:
 <property-value>                ::= <escaped-string> <property-value>                ::= <escaped-string>
  
-<sections                     ::= '' | <class-section> <sections>+<content                      ::= '' | <class-section> <content>
  
 <class-section>                 ::= 'c' <tab> <class-name-a> <tab> <class-name-b> <extra-ns-class-names> <eol> <class-sub-sections> <class-section>                 ::= 'c' <tab> <class-name-a> <tab> <class-name-b> <extra-ns-class-names> <eol> <class-sub-sections>
Line 49: Line 49:
 <extra-ns-cls-names>            ::= '' | <tab> <optional-class-name> <extra-ns-class-names> <extra-ns-cls-names>            ::= '' | <tab> <optional-class-name> <extra-ns-class-names>
 <class-name>                    ::= <conf-safe-string> <class-name>                    ::= <conf-safe-string>
-<class-sub-sections>            ::= '' | <field-section> <class-sub-sections> | <method-section> <class-sub-sections> | <class-comment-section> <class-sub-sections>+<class-sub-sections>            ::= '' | <class-comment-section> <class-sub-sections> | <field-section> <class-sub-sections> | <method-section> <class-sub-sections>
  
 <field-section>                 ::= <tab> 'f' <tab> <field-desc-a> <tab> <field-name-a> <tab> <field-name-b> <extra-ns-field-names> <eol> <field-sub-sections> <field-section>                 ::= <tab> 'f' <tab> <field-desc-a> <tab> <field-name-a> <tab> <field-name-b> <extra-ns-field-names> <eol> <field-sub-sections>
Line 69: Line 69:
 <method-desc-a>                 ::= <method-desc> <method-desc-a>                 ::= <method-desc>
 <method-desc>                   ::= <conf-safe-string> <method-desc>                   ::= <conf-safe-string>
-<method-sub-sections>           ::= '' | <method-parameter-section> <method-sub-sections> | <method-variable-section> <method-sub-sections> | <member-comment-section> <method-sub-sections>+<method-sub-sections>           ::= '' | <member-comment-section> <method-sub-sections> | <method-parameter-section> <method-sub-sections> | <method-variable-section> <method-sub-sections>
  
 <method-parameter-section>      ::= <tab> <tab> 'p' <tab> <lv-index> <tab> <var-name-a> <tab> <var-name-b> <extra-ns-var-names> <eol> <method-parameter-sub-sections> <method-parameter-section>      ::= <tab> <tab> 'p' <tab> <lv-index> <tab> <var-name-a> <tab> <var-name-b> <extra-ns-var-names> <eol> <method-parameter-sub-sections>
Line 98: Line 98:
   * ''%%<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''.
   * ''%%<conf-safe-string>%%'' is the same as ''%%<safe-string>%%'' if ''%%<properties>%%'' doesn't contain a ''%%<property>%%'' ''escaped-names'', otherwise it's a non-empty string further described by ''%%<escaped-string>%%''.   * ''%%<conf-safe-string>%%'' is the same as ''%%<safe-string>%%'' if ''%%<properties>%%'' doesn't contain a ''%%<property>%%'' ''escaped-names'', otherwise it's a non-empty string further described by ''%%<escaped-string>%%''.
-  * ''%%<escaped-string>%%'' is a string that must not contain ''%%<eol>%%'' and escapes+  * ''%%<escaped-string>%%'' is a string that must not contain an ''%%<eol>%%''escapes ''\'' to ''\\'' and the other forbidden values to their string literal equivalentsas seen in the list above.
-    *  ''\'' to ''\\''+
-    * ''"\n"'' to ''\n'', +
-    * ''"\r"'' to ''\r'', +
-    * ''"\t"'' to ''\t'' and +
-    * ''"\0"'' to ''\0''.+
   * ''%%<non-negative-int>%%'' is any integer from 0 to 2147483647 (2^31-1) inclusive, represented as per ''java.lang.Integer.toString()''.   * ''%%<non-negative-int>%%'' is any integer from 0 to 2147483647 (2^31-1) inclusive, represented as per ''java.lang.Integer.toString()''.
   * ''%%<class-name>%%'', once optionally unescaped, 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>%%'', once optionally unescaped, 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.
Line 125: Line 120:
   * The amount of extra namespaces defined in the header and the amount of names in every ''%%extra-ns-*-names%%'' definition have to match. They are associated by their relative position, like the mandatory name spaces a and b that are associated by the suffix, e.g. ''%%namespace-a%%'' covers ''%%class-name-a%%'', ''%%field-name-a%%'', ''%%field-desc-a%%'', ''%%method-name-a%%'', ''%%method-desc-a%%'' and ''%%var-desc-a%%'',.   * The amount of extra namespaces defined in the header and the amount of names in every ''%%extra-ns-*-names%%'' definition have to match. They are associated by their relative position, like the mandatory name spaces a and b that are associated by the suffix, e.g. ''%%namespace-a%%'' covers ''%%class-name-a%%'', ''%%field-name-a%%'', ''%%field-desc-a%%'', ''%%method-name-a%%'', ''%%method-desc-a%%'' and ''%%var-desc-a%%'',.
   * Sections representing the same element must not be repeated, e.g. there can be only one top-level section for a specific class or one class-level section for a specific member.   * Sections representing the same element must not be repeated, e.g. there can be only one top-level section for a specific class or one class-level section for a specific member.
-  * If any variable mapping doesn't specify a LVT index, e.g. due to a missing ''LocalVariableTable'' attribute in one of the methods, the property ''missing-lvt-indices'' has to be added to . +  * If any variable mapping doesn't specify a LVT index, e.g. due to a missing ''LocalVariableTable'' attribute in one of the methods, the property ''missing-lvt-indices'' has to be added to. 
-  * Mappings without any useful names or sub-sections should be omitted.+  * Mappings without any (usefulnames should be omitted. 
 +  * Sections without any (useful) mappings or sub-sections should be omitted.
   * Comments should be without their enclosing syntax elements, indentation or decoration. For example, the comment <code>   * Comments should be without their enclosing syntax elements, indentation or decoration. For example, the comment <code>
    /**    /**
documentation/tiny2.txt · Last modified: 2023/09/16 21:23 by nebelnidas