Coder plugin (2)

Discuss and announce AkelPad plugins
  • Author
  • Message
Offline
Posts: 173
Joined: Mon Dec 06, 2010 9:53 am
Location: г.Харьков, Русь

Post by San_dr »

Skif_off, спасибо. Да, дело в кодировке, перекачал и сохранил в UTF-16LE и всё исправилось.

Offline
Posts: 582
Joined: Mon Apr 08, 2013 9:50 pm
Location: Win7SP1x64, APx64

Post by Drugmix »

Instructor,
а какой сейчас статус у работы regex в правилах QuotesRE в Coder плагине?
Должен ли он полностью соответствовать работе PCRE на https://regex101.com/#pcre ?

У меня в coder'е правило

Code: Select all

0	'^Anchor,((?:"[^"]*"|[^;,\s])++)$' "\1=(4,${STR},#820)"	0	0
не срабатывает на строке
Anchor,","
хотя на сайте этот пример матчится указанным шаблоном.

Offline
Posts: 1161
Joined: Sun Oct 20, 2013 11:44 am

Post by Skif_off »

Drugmix wrote:Должен ли он полностью соответствовать работе PCRE на https://regex101.com/#pcre ?
AkelPad использует свою реализацию регулярных выражений
Drugmix wrote:хотя на сайте этот пример матчится указанным шаблоном.
Шаблон не должен быть фиксированной длины?

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

Kley wrote:Небольшой недочет...
Поправлено.

Drugmix
У меня правило отрабатывает. Убедитесь, что вы используете последнюю тестовую версию программы.

YuS
Offline
Posts: 512
Joined: Sun Sep 15, 2013 8:25 am
Location: 013 в Тентуре, семь по Спирали, налево от Большой Медведицы

Post by YuS »

Drugmix wrote:Должен ли он полностью соответствовать работе PCRE на https://regex101.com/#pcre ?
Сомневаюсь, что должен... скорее, просто приближен к правилам PCRE.
Drugmix wrote: У меня в coder'е правило

Code: Select all

0	'^Anchor,((?:"[^"]*"|[^;,\s])++)$' "\1=(4,${STR},#820)"	0	0
не срабатывает на строке
Anchor,","
При использовании сверхжадных квантификаторов, лучше избегать неоднозначных шаблонов. Если уж используется вариативность, то надо оставлять пути для отхода, т.е. чтобы у парсера была возможность возврата по строке для проверки всех вариантов.
В такой ситуации, лучше использовать атомарную группу, с учетом того, что в ней первое найденное совпадение будет и единственное, либо обычный жадный "+"
так:

Code: Select all

0	'^Anchor,((?>"[^"]*"|[^;,\s])++)$' "\1=(4,${STR},#820)"	0	0
или так:

Code: Select all

0	'^Anchor,("[^"]*"|[^;,\s])+$' "\1=(4,${STR},#820)"	0	0

YuS
Offline
Posts: 512
Joined: Sun Sep 15, 2013 8:25 am
Location: 013 в Тентуре, семь по Спирали, налево от Большой Медведицы

Post by YuS »

Instructor wrote: Drugmix
У меня правило отрабатывает. Убедитесь, что вы используете последнюю тестовую версию программы.
Действительно отрабатывает, правда именно только в последней тестовой.

*мечтательно, самому себе:
Эх, опять что-ли поплакаться, чтобы сделали возможность в апдейтере обновление до крайней тестовой версии... :)

Offline
Posts: 202
Joined: Sat Mar 28, 2015 2:36 pm
Location: Russia

Post by Kley »

YuS wrote:Эх, опять что-ли поплакаться, чтобы сделали возможность в апдейтере обновление до крайней тестовой версии...
...и поддержку языковых модулей для нее.
Так недолго и английский выучить, сидя на тестовой по пол-года :D

Offline
Posts: 366
Joined: Mon Jan 10, 2011 5:28 pm
Contact:

Post by Lenchik »

Kley
Когда под себя написаны все менюшки, на русском, то язык тестовой версии не имеет значения.
А образец базового меню лежит где-то на странице с плагинами, если не изменяет память.

Offline
Posts: 202
Joined: Sat Mar 28, 2015 2:36 pm
Location: Russia

Post by Kley »

Lenchik

Да, да, конечно. Меню... Все команды, типа "" Command(4153), "" Command(4154), надо переделывать, давая им свои имена.
А как насчет диалогов настройки, поиска, замены... Или скриптов, типа LinesFilter.js... Что с ними делать? Не научите?
Всякий раз видеть при старте-перезагрузке:
AkelPad wrote:Update Russian.dll
Current version: 4.9.6.0
Required version: 4.9.7.0
Приходится переходить на внутренний язык.
Lenchik wrote:Когда под себя написаны все менюшки, на русском, то язык тестовой версии не имеет значения.
Представьте себя на месте нового пользователя AkelPad...
p.s. Может по этому и нет тестовых версий в "апдейтере"?

Offline
Posts: 366
Joined: Mon Jan 10, 2011 5:28 pm
Contact:

Post by Lenchik »

Да, новые пользователи задерживаются на Акеле в случае своебразного "шила" или любопытства. Либо соскакивают на NotePad++, либо качают сборку от San_dr, например, и обнаруживают "дивный новый мир". Я как раз обнаружил коллегу, который даже не знает, что подсветка синтаксиса есть в акеле...

Offline
Posts: 582
Joined: Mon Apr 08, 2013 9:50 pm
Location: Win7SP1x64, APx64

Post by Drugmix »

Instructor wrote:Добавлено: при перемещении секции "QuotesRE:" выше "Quotes:", приоритет секции "QuotesRE:" становится выше. Требуется AkelPad 4.9.7 или выше.

Added: when moving section "QuotesRE:" above "Quotes:", priority of section "QuotesRE:" becomes higher. Required AkelPad 4.9.7 or higher.


Coder plugin v18.6
А вы бы не могли такую информацию сразу в доки заносить? Мне кажется, она важная.

Offline
Posts: 381
Joined: Wed Sep 28, 2011 3:05 pm

Post by Cuprum »

Instractor
Поскольку сейчас дублирующие слова не выводятся в списке дополнения, я попытался логически структурировать подсказки и подсветку согласно стандарту ECMA-262 (6-я версия)
Получилось

Code: Select all

;--Keywords--
1	0	${OP}	0	super
1	0	${OP}	0	this
1	0	${OP}	0	yield
;--Operators--
1	0	${OP}	0	delete
1	0	${OP}	0	in
1	0	${OP}	0	instanceof
1	0	${OP}	0	new
1	0	${OP}	0	typeof
1	0	${OP}	0	void
;--Types and Values--
1	0	${TYPE}	0	true
1	0	${TYPE}	0	false
1	0	${TYPE}	0	null
1	0	${TYPE}	0	undefined
;--special values of Number Type--
1	0	${TYPE}	0	Infinity
1	0	${TYPE}	0	NaN
;--Declarations and the Variable Statement--
1	0	${OP}	0	const
1	0	${OP}	0	let
1	0	${OP}	0	var
 ;--Statements--
1	0	${IF}	0	break
1	0	${IF}	0	case
1	0	${IF}	0	catch
1	0	${IF}	0	continue
1	0	${IF}	0	debugger
1	0	${IF}	0	default
1	0	${IF}	0	do
1	0	${IF}	0	else
1	0	${IF}	0	finally
1	0	${IF}	0	for
1	0	${IF}	0	if
1	0	${IF}	0	in
1	0	${IF}	0	of
1	0	${IF}	0	return
1	0	${IF}	0	switch
1	0	${IF}	0	throw
1	0	${IF}	0	try
1	0	${IF}	0	while
1	0	${IF}	0	with
;--Functions and Classes--
1	0	0	0	class
1	0	0	0	constructor
1	0	0	0	extends
1	0	${OP}	0	function
1	0	${OP}	0	get
1	0	${OP}	0	set
1	0	0	0	static
;--Modules--
1	0	0	0	as
1	0	0	0	export
1	0	0	0	from
1	0	0	0	import
;--Value Properties of the Global Object--
1	0	0	0	Infinity
1	0	0	0	NaN
1	0	0	0	undefined
;--Function Properties of the Global Object--
1	0	${OP}	0	decodeURI
1	0	${OP}	0	decodeURIComponent
1	0	${OP}	0	encodeURI
1	0	${OP}	0	encodeURIComponent
1	0	${OP}	0	eval
1	0	${OP}	0	isFinite
1	0	${OP}	0	isNaN
1	0	${OP}	0	parseFloat
1	0	${OP}	0	parseInt
;--Extend with Microsoft's implementation--
1	0	${OP}	0	ScriptEngine
1	0	${OP}	0	ScriptEngineMajorVersion
1	0	${OP}	0	ScriptEngineMinorVersion
1	0	${OP}	0	ScriptEngineBuildVersion
;--Constructor Properties of the Global Object--
1	0	${OP}	0	Array
1	0	${OP}	0	ArrayBuffer
1	0	${OP}	0	Boolean
1	0	${OP}	0	DataView
1	0	${OP}	0	Date
1	0	${OP}	0	Error
1	0	${OP}	0	EvalError
1	0	${OP}	0	Float32Array
1	0	${OP}	0	Float64Array
1	0	${OP}	0	Function
1	0	${OP}	0	Int8Array
1	0	${OP}	0	Int16Array
1	0	${OP}	0	Int32Array
1	0	${OP}	0	Map
1	0	${OP}	0	Number
1	0	${OP}	0	Object
1	0	${OP}	0	Proxy
1	0	${OP}	0	Promise
1	0	${OP}	0	RangeError
1	0	${OP}	0	ReferenceError
1	0	${OP}	0	RegExp
1	0	${OP}	0	Set
1	0	${OP}	0	String
1	0	${OP}	0	Symbol
1	0	${OP}	0	SyntaxError
1	0	${OP}	0	TypeError
1	0	${OP}	0	Uint8Array
1	0	${OP}	0	Uint8ClampedArray
1	0	${OP}	0	Uint16Array
1	0	${OP}	0	Uint32Array
1	0	${OP}	0	URIError
1	0	${OP}	0	WeakMap
1	0	${OP}	0	WeakSet
;--Extend with Microsoft implementation--
1	0	${OP}	0	ActiveXObject
1	0	${OP}	0	Enumerator
1	0	${OP}	0	VBArray
;--Extend with AkelPad environment--
1	0	${OP}	0	_TCHAR
1	0	${OP}	0	_TSTR
1	0	${OP}	0	_TSIZE
1	0	${OP}	0	_X64
1	0	${OP}	0	_PtrAdd
1	0	${OP}	0	_PtrMath
;--Other Properties of the Global Object--
1	0	${OP}	0	JSON
1	0	${OP}	0	Math
1	0	${OP}	0	Reflect
;--Properties of the Object Constructor--
1	0	0	0	assign
1	0	0	0	create
1	0	0	0	defineProperties
1	0	0	0	defineProperty
1	0	0	0	freeze
1	0	0	0	getOwnPropertyDescriptor
1	0	0	0	getOwnPropertyNames
1	0	0	0	getOwnPropertySymbols
1	0	0	0	getPrototypeOf
1	0	0	0	is
1	0	0	0	isExtensible
1	0	0	0	isFrozen
1	0	0	0	isSealed
1	0	0	0	keys
1	0	0	0	preventExtensions
1	0	0	0	prototype
1	0	0	0	seal
1	0	0	0	setPrototypeOf
;--Properties of the Object Prototype Object--
1	0	0	0	constructor
1	0	0	0	hasOwnProperty
1	0	0	0	isPrototypeOf
1	0	0	0	propertyIsEnumerable
1	0	0	0	toLocaleString
1	0	0	0	toString
1	0	0	0	valueOf
;--Properties of the Function Constructor--
1	0	0	0	length
1	0	0	0	prototype
;--Properties of the Function Prototype Object--
1	0	0	0	apply
1	0	0	0	bind
1	0	0	0	call
1	0	0	0	constructor
1	0	0	0	toString
;--Properties of the Function Instances--
1	0	0	0	length
1	0	0	0	name
1	0	0	0	prototype
;--Properties of the Boolean Constructor--
1	0	0	0	prototype
;--Properties of the Boolean Prototype Object--
1	0	0	0	constructor
1	0	0	0	toString
1	0	0	0	valueOf
;--Properties of the Symbol Constructor--
1	0	0	0	for
1	0	0	0	hasInstance
1	0	0	0	isConcatSpreadable
1	0	0	0	iterator
1	0	0	0	keyFor
1	0	0	0	match
1	0	0	0	prototype
1	0	0	0	replace
1	0	0	0	search
1	0	0	0	species
1	0	0	0	split
1	0	0	0	toPrimitive
1	0	0	0	toStringTag
1	0	0	0	unscopables
;--Properties of the Symbol Prototype Object--
1	0	0	0	constructor
1	0	0	0	toString
1	0	0	0	valueOf
;--Properties of the Error Constructor--
1	0	0	0	prototype
;--Properties of the Error Prototype Object--
1	0	0	0	constructor
1	0	0	0	message
1	0	0	0	name
1	0	0	0	toString
;--Properties of the Number Constructor--
1	0	0	0	EPSILON
1	0	0	0	isFinite
1	0	0	0	isInteger
1	0	0	0	isNaN
1	0	0	0	isSafeInteger
1	0	0	0	MAX_SAFE_INTEGER
1	0	0	0	MAX_VALUE
1	0	0	0	MIN_SAFE_INTEGER
1	0	0	0	MIN_VALUE
1	0	0	0	NaN
1	0	0	0	NEGATIVE_INFINITY
1	0	0	0	parseFloat
1	0	0	0	parseInt
1	0	0	0	POSITIVE_INFINITY
1	0	0	0	prototype
;--Properties of the Number Prototype Object--
1	0	0	0	constructor
1	0	0	0	toExponential
1	0	0	0	toFixed
1	0	0	0	toLocaleString
1	0	0	0	toPrecision
1	0	0	0	toString
1	0	0	0	valueOf
;--Value Properties of the Math Object--
1	0	0	0	E
1	0	0	0	LN10
1	0	0	0	LN2
1	0	0	0	LOG10E
1	0	0	0	LOG2E
1	0	0	0	PI
1	0	0	0	SQRT1_2
1	0	0	0	SQRT2
;--Function Properties of the Math Object--
1	0	0	0	abs
1	0	0	0	acos
1	0	0	0	acosh
1	0	0	0	asin
1	0	0	0	asinh
1	0	0	0	atan
1	0	0	0	atanh
1	0	0	0	atan2
1	0	0	0	cbrt
1	0	0	0	ceil
1	0	0	0	clz32
1	0	0	0	cos
1	0	0	0	cosh
1	0	0	0	exp
1	0	0	0	expm1
1	0	0	0	floor
1	0	0	0	fround
1	0	0	0	hypot
1	0	0	0	imul
1	0	0	0	log
1	0	0	0	log1p
1	0	0	0	log10
1	0	0	0	log2
1	0	0	0	max
1	0	0	0	min
1	0	0	0	pow
1	0	0	0	random
1	0	0	0	round
1	0	0	0	sign
1	0	0	0	sin
1	0	0	0	sinh
1	0	0	0	sqrt
1	0	0	0	tan
1	0	0	0	tanh
1	0	0	0	trunc
;--Properties of the Date Constructor--
1	0	0	0	now
1	0	0	0	parse
1	0	0	0	prototype
1	0	0	0	UTC
;--Properties of the Date Prototype Object--
1	0	0	0	constructor
1	0	0	0	getDate
1	0	0	0	getDay
1	0	0	0	getFullYear
1	0	0	0	getHours
1	0	0	0	getMilliseconds
1	0	0	0	getMinutes
1	0	0	0	getMonth
1	0	0	0	getSeconds
1	0	0	0	getTime
1	0	0	0	getTimezoneOffset
1	0	0	0	getUTCDate
1	0	0	0	getUTCDay
1	0	0	0	getUTCFullYear
1	0	0	0	getUTCHours
1	0	0	0	getUTCMilliseconds
1	0	0	0	getUTCMinutes
1	0	0	0	getUTCMonth
1	0	0	0	getUTCSeconds
1	0	0	0	setDate
1	0	0	0	setFullYear
1	0	0	0	setHours
1	0	0	0	setMilliseconds
1	0	0	0	setMinutes
1	0	0	0	setMonth
1	0	0	0	setSeconds
1	0	0	0	setTime
1	0	0	0	setUTCDate
1	0	0	0	setUTCFullYear
1	0	0	0	setUTCHours
1	0	0	0	setUTCMilliseconds
1	0	0	0	setUTCMinutes
1	0	0	0	setUTCMonth
1	0	0	0	setUTCSeconds
1	0	0	0	toDateString
1	0	0	0	toISOString
1	0	0	0	toJSON
1	0	0	0	toLocaleDateString
1	0	0	0	toLocaleString
1	0	0	0	toLocaleTimeString
1	0	0	0	toString
1	0	0	0	toTimeString
1	0	0	0	toUTCString
1	0	0	0	valueOf
;--Properties of the String Constructor--
1	0	0	0	fromCharCode
1	0	0	0	fromCodePoint
1	0	0	0	prototype
1	0	0	0	raw
;--Properties of the String Prototype Object--
1	0	0	0	charAt
1	0	0	0	charCodeAt
1	0	0	0	codePointAt
1	0	0	0	concat
1	0	0	0	constructor
1	0	0	0	endsWith
1	0	0	0	includes
1	0	0	0	indexOf
1	0	0	0	lastIndexOf
1	0	0	0	localeCompare
1	0	0	0	match
1	0	0	0	normalize
1	0	0	0	repeat
1	0	0	0	replace
1	0	0	0	search
1	0	0	0	slice
1	0	0	0	split
1	0	0	0	startsWith
1	0	0	0	substring
1	0	0	0	toLocaleLowerCase
1	0	0	0	toLocaleUpperCase
1	0	0	0	toLowerCase
1	0	0	0	toString
1	0	0	0	toUpperCase
1	0	0	0	trim
1	0	0	0	valueOf
;--Properties of String Instances--
1	0	0	0	length
;--Properties of the RegExp Constructor--
1	0	0	0	prototype
;--Properties of the RegExp Prototype Object--
1	0	0	0	constructor
1	0	0	0	exec
1	0	0	0	flags
1	0	0	0	global
1	0	0	0	ignoreCase
1	0	0	0	multiline
1	0	0	0	source
1	0	0	0	sticky
1	0	0	0	test
1	0	0	0	toString
1	0	0	0	unicode
;--Properties of RegExp Instances--
1	0	0	0	lastIndex
;--Properties of the Array Constructor--
1	0	0	0	from
1	0	0	0	isArray
1	0	0	0	of
1	0	0	0	prototype
;--Properties of the Array Prototype Object--
1	0	0	0	concat
1	0	0	0	constructor
1	0	0	0	copyWithin
1	0	0	0	entries
1	0	0	0	every
1	0	0	0	fill
1	0	0	0	filter
1	0	0	0	find
1	0	0	0	findIndex
1	0	0	0	forEach
1	0	0	0	indexOf
1	0	0	0	join
1	0	0	0	keys
1	0	0	0	lastIndexOf
1	0	0	0	map
1	0	0	0	pop
1	0	0	0	push
1	0	0	0	reduce
1	0	0	0	reduceRight
1	0	0	0	reverse
1	0	0	0	shift
1	0	0	0	slice
1	0	0	0	some
1	0	0	0	sort
1	0	0	0	splice
1	0	0	0	toLocaleString
1	0	0	0	toString
1	0	0	0	unshift
1	0	0	0	values
;--Properties of Array Instances--
1	0	0	0	length
;--Function Properties of the JSON Object--
1	0	0	0	parse
1	0	0	0	stringify
.
Может, запилить его? Тут еще кое-что не внесено, но основные слова есть.
Бонус :) : в таком виде js.coder может быть неплохим справочником по списку свойств и методов последней редакции нативного Javascript.

Offline
Posts: 202
Joined: Sat Mar 28, 2015 2:36 pm
Location: Russia

Post by Kley »

Cuprum
js.coder. Закрывающая скобка и двойные "/" работают, как-то так:
n = 50 + 50) / 2; //50
n = 50 + 50) / 2; //50 //50
/n = 100 / 2; //50 //50

Offline
Posts: 381
Joined: Wed Sep 28, 2011 3:05 pm

Post by Cuprum »

Kley
Попробуйте тестовую

Offline
Posts: 202
Joined: Sat Mar 28, 2015 2:36 pm
Location: Russia

Post by Kley »

Cuprum,
извините пожалуйста. js.coder версий, от разных людей, предостаточно.
Я излагал ( боюсь писать писал :) ) про версию из PlugsPack. Если Вы тоже,
то с "тестовой" ничего не изменилось :(
Locked