More DataSpec tweaks
This commit is contained in:
@ -31,12 +31,14 @@ class DataSpecLexer(RegexLexer):
|
||||
],
|
||||
'expression': [
|
||||
(r'(\s*)(\))', bygroups(Text, Punctuation), '#pop'),
|
||||
(r'(\s*)(\+)', bygroups(Text, Punctuation)),
|
||||
(r'(\s*)([+-])', bygroups(Text, Operator)),
|
||||
(r'(\s*)(\$\w+)', bygroups(Text, Name.Tag)),
|
||||
(r'(\s*)(\w+)', bygroups(Text, Name)),
|
||||
],
|
||||
'definition': [
|
||||
(r'(\s*)([\w=;]+)(\s)(::)(\s)', bygroups(Text, Name.Tag, Text, Operator, Text)),
|
||||
(r'(\s*)((?:[A-Z][a-z]+)+)', bygroups(Text, Name.Class)),
|
||||
(r'(\s*)([A-Z]{2,})', bygroups(Text, Name.Constant)),
|
||||
(r'(\s*)([\[\]])', bygroups(Text, Punctuation)),
|
||||
(r'(\s*)(\$\w+)', bygroups(Text, Name.Tag)),
|
||||
(r'(\s*)([0-9]+)(\+)?', bygroups(Text, Number, Punctuation)),
|
||||
|
@ -234,20 +234,20 @@ A 2-byte size Integer followed by a series of String=String; pairs
|
||||
{% endtrans %}</p>
|
||||
{% highlight lang='dataspec' %}
|
||||
+----+----+----+----+----+----+----+----+
|
||||
| size |key string (len + data) | = |
|
||||
| size |key_string (len + data) | = |
|
||||
+----+----+----+----+----+----+----+----+
|
||||
| val string (len + data) | ; | ...
|
||||
| val_string (len + data) | ; | ...
|
||||
+----+----+----+----+----+----+----+
|
||||
size :: Integer
|
||||
length -> 2 bytes
|
||||
Total number of bytes that follow
|
||||
|
||||
key string :: String
|
||||
key_string :: String
|
||||
A string (one byte length followed by UTF-8 encoded characters)
|
||||
|
||||
= :: A single byte containing '='
|
||||
|
||||
val string :: String
|
||||
val_string :: String
|
||||
A string (one byte length followed by UTF-8 encoded characters)
|
||||
|
||||
; :: A single byte containing ';'
|
||||
@ -329,7 +329,7 @@ signing_key :: SigningPublicKey
|
||||
certificate :: Certificate
|
||||
length -> >= 3 bytes
|
||||
|
||||
Total length: 387+ bytes
|
||||
total length: 387+ bytes
|
||||
{% endhighlight %}
|
||||
|
||||
<h4>{% trans %}Notes{% endtrans %}</h4>
|
||||
@ -378,7 +378,7 @@ signing_public_key :: SigningPublicKey
|
||||
certificate :: Certificate
|
||||
length -> >= 3 bytes
|
||||
|
||||
Total length: 387+ bytes
|
||||
total length: 387+ bytes
|
||||
{% endhighlight %}
|
||||
|
||||
<h4><a href="http://docs.i2p-projekt.de/javadoc/net/i2p/data/Destination.html">Javadoc</a></h4>
|
||||
|
Reference in New Issue
Block a user