Recent

Author Topic: New Scriptable Highlighter for SynEdit  (Read 37585 times)

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: New Scriptable Highlighter for SynEdit
« Reply #45 on: December 23, 2014, 04:55:57 pm »
SynFacilSyn 1.0 has been released.

News:
* Error handling, using exceptions.
* Basic support for Regex on token definitions.

In this version, it's possible to define tokens for the float numbers format:

Code: [Select]
<Token regex = '[0-9][0-9]*[\.]?[0-9]*[eE][+-]?[0-9]+' Attribute='NUMBER'>
</Token>
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: New Scriptable Highlighter for SynEdit
« Reply #46 on: January 07, 2015, 07:39:06 pm »
Quote
[0-9][0-9]*[\.]?[0-9]*[eE][+-]?[0-9]+
bad

good:
Quote
\d+(\.\d+)?([eE][\-\+]?\d+)?

make \d as [0-9] and \w as word-char. pls.
NOTE. + and - must escape.

« Last Edit: January 07, 2015, 07:41:22 pm by Alex22 »

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: New Scriptable Highlighter for SynEdit
« Reply #47 on: January 07, 2015, 10:48:25 pm »
OK. I'm working on improve the Regex support. It's very basic on the v1.0. Improves will appear on the v1.1. Check the GitHub.

NOTE. + and - must escape.
Formally yes. But in SynFacilSyn, it's not necessary. :-X
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: New Scriptable Highlighter for SynEdit
« Reply #48 on: March 11, 2015, 04:00:54 am »
There is an English translation of the documentation for SynFacilSyn 1.0:

https://github.com/t-edson/SynFacilSyn/tree/1.0/Docs

There is some corrections needed, yet.

Thanks to Tim Sinaeve, who helped with this work.
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: New Scriptable Highlighter for SynEdit
« Reply #49 on: March 13, 2015, 12:29:40 pm »
ATSynedit needs (after release, not now) Binary lexer. You may make it (not now) ? http://forum.lazarus.freepascal.org/index.php/topic,27478.0.html

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: New Scriptable Highlighter for SynEdit
« Reply #50 on: March 13, 2015, 06:53:19 pm »
I woul like, but What is a Binary Lexer? %)
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: New Scriptable Highlighter for SynEdit
« Reply #51 on: May 26, 2015, 12:20:43 am »
SynFacilSyn 1.1 has been released: https://github.com/t-edson/SynFacilSyn

News:
* Improved support for Regex on token definitions.
* Include basic script languaje for complex definitions of tokens.
* Delimited tokens can now to include an escape char.

In this version, it's possible to define tokens for the float numbers format:

Code: [Select]
  <Token regex = '\d+[\.]?\d*[eE][+\-]?\d+' Attribute='NUMBER'> </Token>
Or create a script like this:

Code: [Select]
 
  <Token CharsStart="0..9" Attribute='NUMBER'>
   <Regex Text="[0-9]*" />
   <Regex Text="[\.]" IfFalse='move(+2)' />
   <Regex Text="[0-9]+" IfFalse='exit(-1)' />
   <Regex Text="[eE]" />
   <Regex Text="[+-]?" />
   <Regex Text="[0-9]+" IfFalse='exit(-2)' />
  </Token>

Not english documentation updated by now.
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: New Scriptable Highlighter for SynEdit
« Reply #52 on: August 24, 2015, 05:57:05 pm »
SynFacilSyn 1.11 has been released: https://github.com/t-edson/SynFacilSyn

This a bug-fixing version. English documentation is updated.
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: New Scriptable Highlighter for SynEdit
« Reply #53 on: December 27, 2016, 07:02:15 pm »
SynFacilSyn is now in version 1.16. It has survived to FPC 3.0  :D and has been tested in Linux.
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

 

TinyPortal © 2005-2018