forked from cmbsolutions/copie_scr.sh-Encoding-Decoding
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathksh.langproj
More file actions
252 lines (235 loc) · 14.9 KB
/
ksh.langproj
File metadata and controls
252 lines (235 loc) · 14.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<?xml version="1.0" encoding="utf-8"?>
<!--
Actipro Syntax Language Project (.langproj)
For use with Actipro SyntaxEditor and related products.
http://www.actiprosoftware.com
'KornShell' language created by CMBSolutions.
Copyright (c) 2022 CMBSolutions
-->
<LanguageProject LanguageKey="ksh" LanguageDescription="KornShell" OutputLanguageDefinition="False" OutputLanguageKey="VB" OutputNamespaceName="CMBSolutions.Text.ksh" OutputPath="E:\My Documents\localRepos\copie_scr.sh-Encoding-Decoding\Copie_scr_decoder_GUI\Copie_scr_decoder_GUI\Lexer" OutputPlatformKind="WinForms" Creator="CMBSolutions" Copyright="Copyright (c) 2022 CMBSolutions" xmlns="http://schemas.actiprosoftware.com/langproj/1.0">
<!-- Classification types -->
<LanguageProject.ClassificationTypes>
<ClassificationType Key="Backtick" DefaultStyle="#FFCEDF99,True,False,#FF3F3F3F,True" />
<ClassificationType Key="Character" DefaultStyle="#FFDCA3A3,False,False,#FF3F3F3F,True" />
<ClassificationType Key="Comment" DefaultStyle="#FF7F9F7F,True,True,#FF3F3F3F,True" />
<ClassificationType Key="Default" DefaultStyle="#FFDCDCCC,False,False,#FF3F3F3F,True" />
<ClassificationType Key="Error" DefaultStyle="#FFEDD6ED,True,False,#FF3F3F3F,True" />
<ClassificationType Key="Identifier" DefaultStyle="#FFDCDCCC,False,False,#FF3F3F3F,True" />
<ClassificationType Key="Keyword" DefaultStyle="#FFDFC47D,True,False,#FF3F3F3F,True" />
<ClassificationType Key="Number" DefaultStyle="#FF8CD0D3,False,False,#FF3F3F3F,True" />
<ClassificationType Key="Operator" DefaultStyle="#FF9F9D6D,True,False,#FF3F3F3F,True" />
<ClassificationType Key="Param" DefaultStyle="#FFFFEBDD,False,False,#FF3F3F3F,True" />
<ClassificationType Key="Scalar" DefaultStyle="#FFE3CEAB,True,False,#FF3F3F3F,True" />
<ClassificationType Key="String" DefaultStyle="#FFCC9393,False,False,#FF3F3F3F,True" />
</LanguageProject.ClassificationTypes>
<!-- Lexer -->
<LanguageProject.Lexer>
<DynamicLexer>
<!-- Default state -->
<State Key="Default" DefaultClassificationTypeKey="Default">
<State.ChildStates>
<StateRef Key="Character" />
<StateRef Key="String" />
<StateRef Key="MultiLineComment" />
<StateRef Key="Comment" />
</State.ChildStates>
<RegexPatternGroup TokenKey="Whitespace" ClassificationTypeKey="Default" Pattern="{Whitespace}+" />
<RegexPatternGroup TokenKey="LineTerminator" ClassificationTypeKey="Default" Pattern="{LineTerminator}" />
<ExplicitPatternGroup Key="OpenParenthesisPatternGroup" TokenKey="OpenParenthesis" ClassificationTypeKey="Identifier" Pattern="(" />
<ExplicitPatternGroup Key="CloseParenthesisPatternGroup" TokenKey="CloseParenthesis" ClassificationTypeKey="Identifier" Pattern=")" />
<ExplicitPatternGroup Key="OpenCurlyBracePatternGroup" TokenKey="OpenCurlyBrace" ClassificationTypeKey="Identifier" Pattern="{" />
<ExplicitPatternGroup Key="CloseCurlyBracePatternGroup" TokenKey="CloseCurlyBrace" ClassificationTypeKey="Identifier" Pattern="}" />
<ExplicitPatternGroup Key="OpenSquareBracePatternGroup" TokenKey="OpenSquareBrace" ClassificationTypeKey="Identifier" Pattern="[" />
<ExplicitPatternGroup Key="CloseSquareBracePatternGroup" TokenKey="CloseSquareBrace" ClassificationTypeKey="Identifier" Pattern="]" />
<ExplicitPatternGroup TokenKey="Punctuation">
<ExplicitPatterns><![CDATA[
. , : ;
]]></ExplicitPatterns>
</ExplicitPatternGroup>
<RegexPatternGroup TokenKey="Identifier" ClassificationTypeKey="Identifier" Pattern="(_ | {Alpha})({Word})*" />
<ExplicitPatternGroup TokenKey="Operator" ClassificationTypeKey="Operator">
<ExplicitPatterns><![CDATA[
!= == = ! ++ -- += -= *= /= %= -> + - * / % && || &= |= ^= & | ~ ^ <<= >>= << >> <= < >= > ?
]]></ExplicitPatterns>
</ExplicitPatternGroup>
<RegexPatternGroup TokenKey="RealNumber" ClassificationTypeKey="Number" LookAheadPattern="{NonWord}|\z">
<RegexPattern Value="{Digit}* \. {Digit}+ ([Ee] [\+\-]? {Digit}+)? [FfDdMm]?" />
<RegexPattern Value="{Digit}+ [Ee] [\+\-]? {Digit}+ [FfDdMm]" />
</RegexPatternGroup>
<RegexPatternGroup TokenKey="IntegerNumber" ClassificationTypeKey="Number" Pattern="{Digit}+ (([Uu]? [Ll]?) | ([Ll]? [Uu]?))" LookAheadPattern="{NonWord}|\z" />
<RegexPatternGroup TokenKey="HexIntegerNumber" ClassificationTypeKey="Number" Pattern="0 [xX] {HexDigit}+ (([Uu]? [Ll]?) | ([Ll]? [Uu]?))" LookAheadPattern="{NonWord}|\z" />
</State>
<!-- Error state -->
<State Key="Error" DefaultTokenKey="ErrorText" DefaultClassificationTypeKey="Error" />
<!-- Keyword state -->
<State Key="Keyword" DefaultTokenKey="KeywordText" DefaultClassificationTypeKey="Keyword">
<ExplicitPatternGroup Key="Keywords" TokenKey="InstuctionWords" ClassificationTypeKey="Keyword" LookAheadPattern="{NonWord}|\z" CaseSensitivity="Insensitive">
<ExplicitPatterns><![CDATA[
7z adduser alias apt-get ar as asa autoconf automake awk banner base64 basename bash bc bdiff blkid
break bsdcpio bsdtar bunzip2 bzcmp bzdiff bzegrep bzfgrep bzgrep bzip2 bzip2recover bzless bzmore
c++ cal calendar case cat cc cd cfdisk chattr chgrp chmod chown chroot chvt cksum clang clang++ clear
cmp col column comm compgen compress continue convert cp cpio crontab crypt csplit ctags curl cut
date dc dd deallocvt declare deluser depmod deroff df dialog diff diff3 dig dircmp dirname disown
dmesg do done dpkg dpkg-deb du echo ed egrep elif else env esac eval ex exec exit expand export expr
fakeroot false fc fdisk ffmpeg fgrep fi file find flex flock fmt fold for fsck function functions
fuser fusermount g++ gas gawk gcc gdb genisoimage getconf getopt getopts git gpg gpgsplit gpgv grep
gres groff groups gunzip gzexe hash hd head help hexdump hg history httpd iconv id if ifconfig ifdown
ifquery ifup in insmod integer inxi ip ip6tables ip6tables-save ip6tables-restore iptables iptables-save
iptables-restore jobs join kill killall killall5 lc ld ldd let lex line ln local logname look ls lsattr
lsb_release lsblk lscpu lshw lslocks lsmod lsusb lzcmp lzegrep lzfgrep lzgrep lzless lzma lzmainfo
lzmore m4 mail mailx make man mkdir mkfifo mkswap mktemp modinfo modprobe mogrify more mount msgfmt
mt mv nameif nasm nc ndisasm netcat newgrp nl nm nohup ntps objdump od openssl p7zip pacman passwd
paste patch pathchk pax pcat pcregrep pcretest perl pg ping ping6 pivot_root poweroff pr print printf
ps pwd python python2 python3 ranlib read readlink readonly reboot reset return rev rm rmdir rmmod
rpm rsync sed select service set sh sha1sum sha224sum sha256sum sha3sum sha512sum shift shred shuf
shutdown size sleep sort spell split start stop strings strip stty su sudo sum suspend switch_root
sync systemctl tac tail tar tee test then time times touch tr trap troff true tsort tty type typeset
ulimit umask umount unalias uname uncompress unexpand uniq unlink unlzma unset until unzip unzipsfx
useradd userdel uudecode uuencode vi vim wait wc wget whence which while who wpaste wstart xargs
xdotool xxd xz xzcat xzcmp xzdiff xzfgrep xzgrep xzless xzmore yes yum zcat zcmp zdiff zegrep zfgrep
zforce zgrep zless zmore znew zsh
]]></ExplicitPatterns>
</ExplicitPatternGroup>
</State>
<!-- Identifier state -->
<State Key="Identifier" DefaultTokenKey="IdentifierText" DefaultClassificationTypeKey="Identifier" />
<!-- Scalar state -->
<State Key="Scalar" DefaultTokenKey="ScalarText" DefaultClassificationTypeKey="Scalar" />
<!-- Param state -->
<State Key="Param" DefaultTokenKey="ParamText" DefaultClassificationTypeKey="Param" />
<!-- Backticks state -->
<State Key="Backticks" DefaultTokenKey="BacktickText" DefaultClassificationTypeKey="Backtick">
<State.Scopes>
<Scope>
<Scope.StartPatternGroup>
<ExplicitPatternGroup TokenKey="startbacktick" ClassificationTypeKey="Backtick" Pattern="`" />
</Scope.StartPatternGroup>
<Scope.EndPatternGroup>
<ExplicitPatternGroup TokenKey="endbacktick" ClassificationTypeKey="Backtick" Pattern="`" />
</Scope.EndPatternGroup>
</Scope>
</State.Scopes>
<ExplicitPatternGroup Key="backticks" TokenKey="backticks" ClassificationTypeKey="Backtick" Pattern="`" />
</State>
<!-- Character state -->
<State Key="Character" DefaultTokenKey="CharacterText" DefaultClassificationTypeKey="Character">
<State.Scopes>
<Scope>
<Scope.StartPatternGroup>
<ExplicitPatternGroup TokenKey="CharacterStartDelimiter" Pattern="'" />
</Scope.StartPatternGroup>
<Scope.EndPatternGroup>
<RegexPatternGroup TokenKey="CharacterEndDelimiter" Pattern="['\n]" />
</Scope.EndPatternGroup>
</Scope>
</State.Scopes>
<RegexPatternGroup TokenKey="CharacterEscapedCharacter" Pattern="\\x {HexDigit}{1,4}" />
<RegexPatternGroup TokenKey="CharacterEscapedCharacter" Pattern="\\u {HexDigit}{4,4}" />
<RegexPatternGroup TokenKey="CharacterEscapedCharacter" Pattern="\\U {HexDigit}{8,8}" />
<RegexPatternGroup TokenKey="CharacterEscapedCharacter" Pattern="\\." />
<RegexPatternGroup TokenKey="CharacterText" Pattern="[^'\\\n]+" />
</State>
<!-- String state -->
<State Key="String" DefaultTokenKey="StringText" DefaultClassificationTypeKey="String">
<State.Scopes>
<Scope>
<Scope.StartPatternGroup>
<ExplicitPatternGroup TokenKey="StringStartDelimiter" Pattern=""" />
</Scope.StartPatternGroup>
<Scope.EndPatternGroup>
<RegexPatternGroup TokenKey="StringEndDelimiter" Pattern="[\"\n]" />
</Scope.EndPatternGroup>
</Scope>
</State.Scopes>
<RegexPatternGroup TokenKey="StringEscapedCharacter" Pattern="\\x {HexDigit}{1,4}" />
<RegexPatternGroup TokenKey="StringEscapedCharacter" Pattern="\\u {HexDigit}{4,4}" />
<RegexPatternGroup TokenKey="StringEscapedCharacter" Pattern="\\U {HexDigit}{8,8}" />
<RegexPatternGroup TokenKey="StringEscapedCharacter" Pattern="\\." />
<RegexPatternGroup TokenKey="StringText" Pattern="[^\"\\\n]+" />
</State>
<!-- Comment state -->
<State Key="Comment" DefaultTokenKey="CommentText" DefaultClassificationTypeKey="Comment">
<State.Scopes>
<Scope>
<Scope.StartPatternGroup>
<ExplicitPatternGroup TokenKey="CommentStartDelimiter" Pattern="//" />
</Scope.StartPatternGroup>
<Scope.EndPatternGroup>
<RegexPatternGroup TokenKey="CommentEndDelimiter" Pattern="{LineTerminator}" />
</Scope.EndPatternGroup>
</Scope>
</State.Scopes>
<RegexPatternGroup TokenKey="CommentLineTerminator" Pattern="{LineTerminator} {Whitespace}* //" LookAheadPattern="[^/]" />
<RegexPatternGroup TokenKey="CommentText" Pattern="[^\n]+" />
</State>
<!-- MultiLineComment state -->
<State Key="MultiLineComment" DefaultTokenKey="MultiLineCommentText" DefaultClassificationTypeKey="Comment">
<State.Scopes>
<Scope>
<Scope.StartPatternGroup>
<ExplicitPatternGroup TokenKey="MultiLineCommentStartDelimiter" Pattern="/*" />
</Scope.StartPatternGroup>
<Scope.EndPatternGroup>
<ExplicitPatternGroup TokenKey="MultiLineCommentEndDelimiter" Pattern="*/" />
</Scope.EndPatternGroup>
</Scope>
</State.Scopes>
<RegexPatternGroup TokenKey="MultiLineCommentLineTerminator" Pattern="{LineTerminator}" />
<RegexPatternGroup TokenKey="MultiLineCommentText" Pattern="[^*\n]+" />
</State>
</DynamicLexer>
</LanguageProject.Lexer>
<!-- Example text -->
<LanguageProject.ExampleText><![CDATA[#!/bin/ksh
sdcard=`ls /mnt|grep sdcard.*t`
SDPath=/mnt/$sdcard
# mounts
mount -uw $SDPath
mount -uw /mnt/efs-system
mount -uw /mnt/efs-persist
dt=$(getTime)
echo "Start at " $dt "\r\n"> $SDPath/$dt.txt
echo -ne $(getTime) " - Show geStart\r\n" >> $SDPath/$dt.txt
$SDPath/utils/showScreen $SDPath/screens/geStart.png
echo -ne $(getTime) " - Copy DataPST to SD\r\n" >> $SDPath/$dt.txt
cp -v -r /mnt/efs-persist/DataPST.db $SDPath/DataPST.db.bkp
cp -v -r /mnt/efs-persist/DataPST.db $SDPath/DataPST.db
echo -ne $(getTime) " - Insert data into DataPST on SD\r\n" >> $SDPath/$dt.txt
$SDPath/utils/sqlite3 $SDPath/DataPST.db "INSERT OR REPLACE INTO tb_intvalues (pst_is,pst_namespace,pst_key,pst_value) VALUES (null,1418463176,288230376151646213,1)"
$SDPath/utils/sqlite3 $SDPath/DataPST.db "INSERT OR REPLACE INTO tb_intvalues (pst_is,pst_namespace,pst_key,pst_value) VALUES (null,4,40960,32783)"
$SDPath/utils/sqlite3 $SDPath/DataPST.db "INSERT OR REPLACE INTO tb_intvalues (pst_is,pst_namespace,pst_key,pst_value) VALUES (null,4,4117,1)"
echo -ne $(getTime) " - Insert online POI into DataPST on SD\r\n" >> $SDPath/$dt.txt
$SDPath/utils/sqlite3 $SDPath/DataPST.db "INSERT OR REPLACE INTO tb_intvalues (pst_is,pst_namespace,pst_key,pst_value) VALUES (null,676990753,72057594037862404,1)"
$SDPath/utils/sqlite3 $SDPath/DataPST.db "INSERT OR REPLACE INTO tb_intvalues (pst_is,pst_namespace,pst_key,pst_value) VALUES (null,1550256158,72063091596001282,3)"
echo -ne $(getTime) " - Insert GEMMI into DataPST on SD\r\n" >> $SDPath/$dt.txt
$SDPath/utils/sqlite3 $SDPath/DataPST.db "INSERT OR REPLACE INTO tb_intvalues (pst_is,pst_namespace,pst_key,pst_value) VALUES (null,1418463180,144115188075790336,0)"
$SDPath/utils/sqlite3 $SDPath/DataPST.db "INSERT OR REPLACE INTO tb_intvalues (pst_is,pst_namespace,pst_key,pst_value) VALUES (null,1418463180,288230376151646212,1)"
$SDPath/utils/sqlite3 $SDPath/DataPST.db "INSERT OR REPLACE INTO tb_intvalues (pst_is,pst_namespace,pst_key,pst_value) VALUES (null,1418463180,288230376151646213,2)"
$SDPath/utils/sqlite3 $SDPath/DataPST.db "INSERT OR REPLACE INTO tb_intvalues (pst_is,pst_namespace,pst_key,pst_value) VALUES (null,1418463180,288230376151646227,2)"
echo -ne $(getTime) " - Copy DataPST on SD to MMI\r\n" >> $SDPath/$dt.txt
cp -v -r $SDPath/DataPST.db /mnt/efs-persist/DataPST.db
cp -v -r $SDPath/DataPST.db /HBpersistence/DataPST.db
cp -v -r $SDPath/DataPST.db /mnt/hmisql/DataPST.db
echo -ne $(getTime) " - Show geDone\r\n" >> $SDPath/$dt.txt
$SDPath/utils/showScreen $SDPath/screens/geDone.png
echo -ne $(getTime) " - Show diagStart\r\n" >> $SDPath/$dt.txt
$SDPath/utils/showScreen $SDPath/screens/diagStart.png
if test -a /scripts/Connectivity/getStatus.sh.bak ; then
rm /scripts/Connectivity/getStatus.sh
cp $SDPath/getStatus.sh /scripts/Connectivity/.
echo -ne $(getTime) " - getStatus.sh copied on MMI\r\n" >> $SDPath/$dt.txt
else
mv /scripts/Connectivity/getStatus.sh /scripts/Connectivity/getStatus.sh.bak
echo -ne $(getTime) " - getStatus.sh bakuped on MMI (getStatus.sh.bak)\r\n" >> $SDPath/$dt.txt
cp $SDPath/getStatus.sh /scripts/Connectivity/.
echo -ne $(getTime) " - getStatus.sh copied on MMI\r\n" >> $SDPath/$dt.txt
fi
if ! test -a /usr/bin/awk ; then
cp $SDPath/utils/awk /usr/bin/.
cp $SDPath/utils/libc.so.3 /usr/bin/.
echo -ne $(getTime) " - awk copied on MMI\r\n" >> $SDPath/$dt.txt
fi
echo -ne $(getTime) " - Show diagDone\r\n" >> $SDPath/$dt.txt
$SDPath/utils/showScreen $SDPath/screens/diagDone.png
echo -ne $(getTime) " - Installation successful\r\n" >> $SDPath/$dt.txt]]></LanguageProject.ExampleText>
</LanguageProject>