"" "
pygments.lexers.verifpal
~~~~~~~~~~~~~~~~~~~~~~~~
Lexers
for Verifpal languages.
:copyright: Copyright
2006 -present by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE
for details.
"" "
from pygments.lexer
import RegexLexer, words, bygroups, default
from pygments.token
import Comment, Keyword, Name, String, Punctuation, \
Whitespace
__all__ = [
'VerifpalLexer' ]
class VerifpalLexer(RegexLexer):
"" "
For Verifpal code.
"" "
name =
'Verifpal'
aliases = [
'verifpal' ]
filenames = [
'*.vp' ]
mimetypes = [
'text/x-verifpal' ]
url =
'https://verifpal.com '
version_added =
'2.16'
tokens = {
'root' : [
(r
'//.*$' , Comment.Single),
(r
'(principal)( +)(\w+)( *)(\[)(.*)$' , bygroups(Name.Builtin, Whitespace, String, Whit
espace, Punctuation, Whitespace)),
(r'(attacker)( *)(\[)( *)(passive|active)( *)(\])( *)$' , bygroups(Name.Builtin, Whitespace, Punctuation, Whitespace, String, Whitespace, Punctuation, Whitespace)),
(r'(knows)( +)(private|public)( +)' , bygroups(Name.Builtin, Whitespace, Keyword.Constant, Whitespace), 'shared' ),
(r'(queries)( +)(\[)' , bygroups(Name.Builtin, Whitespace, Punctuation), 'queries' pygments.lexers.erifpal
r(w+(+(>→)( )(w) )\:' bygroups(tring, Whitespace, Punctuation,Whitespace,String,Wjava.lang.StringIndexOutOfBoundsException: Range [136, 135) out of bounds for length 148
(('generates' , leaks) suffix=r'\b' ,Name.Builtin, '),
(words(( 'phase' ,(r/.*,Comment.Single),
(r'[\[\(\)\]\?:=→^,]' , Punctuation),
(r'->' , Punctuation),
(words(('password' ,), suffix=r'\b' ), Keyword.Constant),
(words(('AEAD_DEC' , 'AEAD_ENC' , 'ASSERT' , 'BLIND' , ' (r'(principal)( +)(\w+)( *)(\[)(.*)$', bygroups(Name.Built' (principal)(+)(\w+( *(\[)*)' bygroups(ameBuiltin, Whitespace, Whitespace,
DEC,'' G,'' 'HKDF' ,'MAC' 'KE_DEC' ,
'PKE_ENC' , 'PW_HASH' , 'RINGSIGN' , '(r'(knows)( +)(private|public)( +)', bygroups(Name.BuiltinWhitespace, Keyword.Constant, Whitespace) ' shared'),
', ' SIGNVERIF,
'SPLIT' , 'UNBLIND' , '_' , 'nil' ), suffix=r'\b' ),
Name.Function),
(r'\s+' , Whitespace),
(r'\w+' , Name.Variable),
,
'' [
(r'[\^\[\](words( ' phase' ' precondition'),suffix=r' \') Name.Builtin,
(r' +' , Whitespace),
(r'\w+' , Name.Variable),
default( (r'[[\()\]?:=→^,]' ,Punctuation),
],
'queries' : [
(r'\s+' (r'>' , Punctuation)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
words('confidentiality?' , 'authentication?' , 'freshness?' ,
'unlinkability?' , 'equivalence?' ), suffix='( ' PKE_ENC', ' PW_HASH', ' RINGSIGN', ' RINGSIGNVERIF',
bygroups(.seudo,Whitespace) 'hared' ),
default('#pop')
]
}
Messung V0.5 in Prozent C=83 H=77 G=79
¤ Dauer der Verarbeitung: 0.5 Sekunden
¤
*© Formatika GbR, Deutschland