R
runsun
Fri, Jan 1, 2016 4:06 AM
Happy New Year to all dear fellow OpenSCADists! To enjoy our journey of
OpenSCAD in the new 2016 to come, allow me to present a present: an OpenSCAD
syntax lexer for the editor SynWrite http://www.uvviewsoft.com/synwrite/
.
It's a lexer intended to deal with large and/or complicated scad files.
Users will be able to divide large code into sections, in-function sections
and in-module sections, all are blocks that can be folded and easily
navigated through the syntax tree panel.
The lexer already being incorporated into the SynWrite library, so you can
get right to it once the SynWrite is installed. Couple of screenshots :
1. The synwrite_syntax_demo.scad domonstrating all the features of the
lexer:
http://forum.openscad.org/file/n15402/2015-12-31_Screenshot_demo_file.png
2. foldable in-function sections
http://forum.openscad.org/file/n15402/2015-12-31_screenshot_in-func_sect.png
3. Foldable in-module sections
http://forum.openscad.org/file/n15402/2015-12-31_screenshot_in-mod_sect.png
4. William Adam's math lib as viewed with this lexer
http://forum.openscad.org/file/n15402/2015-12-31_18_58_15-Screenshot_WilliamAdams_Math_lib.png
To load it to your SynWrite, just go to [Options]/ [Add-ons Manager] /
[Install]
To use it, select it in the status bar on the bottom of editor.
The demonstrating file, synwrite_syntax_demo.scad, can be downloaded from
the thing: http://www.thingiverse.com/thing:1237864
http://www.thingiverse.com/thing:1237864 .Enjoy !
$ Runsun Pan, PhD
$ libs:
doctest ,
faces ( git ),
offline doc ( git ),
runscad.py( 1 , 2 , git );
$ tips:
hash( 1 , 2 ),
sweep ,
var( 1 , 2 ),
lerp ,
animGif ,
precision( 1 , 2 ),
xl-control
--
View this message in context: http://forum.openscad.org/Happy-New-Year-OpenSCAD-syntax-lexer-for-SynWrite-tp15402.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Happy New Year to all dear fellow OpenSCADists! To enjoy our journey of
OpenSCAD in the new 2016 to come, allow me to present a present: an OpenSCAD
syntax lexer for the editor SynWrite <http://www.uvviewsoft.com/synwrite/>
.
It's a lexer intended to deal with large and/or complicated scad files.
Users will be able to divide large code into sections, in-function sections
and in-module sections, all are blocks that can be folded and easily
navigated through the syntax tree panel.
The lexer already being incorporated into the SynWrite library, so you can
get right to it once the SynWrite is installed. Couple of screenshots :
*1. The synwrite_syntax_demo.scad domonstrating all the features of the
lexer:*
<http://forum.openscad.org/file/n15402/2015-12-31_Screenshot_demo_file.png>
*2. foldable in-function sections*
<http://forum.openscad.org/file/n15402/2015-12-31_screenshot_in-func_sect.png>
*3. Foldable in-module sections*
<http://forum.openscad.org/file/n15402/2015-12-31_screenshot_in-mod_sect.png>
*4. William Adam's math lib as viewed with this lexer*
<http://forum.openscad.org/file/n15402/2015-12-31_18_58_15-Screenshot_WilliamAdams_Math_lib.png>
To load it to your SynWrite, just go to [Options]/ [Add-ons Manager] /
[Install]
To use it, select it in the status bar on the bottom of editor.
The demonstrating file, synwrite_syntax_demo.scad, can be downloaded from
the thing: http://www.thingiverse.com/thing:1237864
<http://www.thingiverse.com/thing:1237864> .Enjoy !
-----
$ Runsun Pan, PhD
$ libs:
doctest ,
faces ( git ),
offline doc ( git ),
runscad.py( 1 , 2 , git );
$ tips:
hash( 1 , 2 ),
sweep ,
var( 1 , 2 ),
lerp ,
animGif ,
precision( 1 , 2 ),
xl-control
--
View this message in context: http://forum.openscad.org/Happy-New-Year-OpenSCAD-syntax-lexer-for-SynWrite-tp15402.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
NH
nop head
Fri, Jan 1, 2016 12:08 PM
Happy New Year and thanks for the lexer.
I hadn't come across SynWrite before but it looks like a nice editor. I
have never seen multi-caret editing before!
I added render to the list of actions as it seems to be missing.
On 1 January 2016 at 04:06, runsun runsun@gmail.com wrote:
Happy New Year to all dear fellow OpenSCADists! To enjoy our journey of
OpenSCAD in the new 2016 to come, allow me to present a present: an
OpenSCAD syntax lexer for the editor SynWrite
http://www.uvviewsoft.com/synwrite/.
It's a lexer intended to deal with large and/or complicated scad files.
Users will be able to divide large code into sections, in-function sections
and in-module sections, all are blocks that can be folded and easily
navigated through the syntax tree panel.
The lexer already being incorporated into the SynWrite library, so you can
get right to it once the SynWrite is installed. Couple of screenshots :
1. The synwrite_syntax_demo.scad domonstrating all the features of the
lexer:
2. foldable in-function sections
3. Foldable in-module sections
4. William Adam's math lib as viewed with this lexer
To load it to your SynWrite, just go to [Options]/ [Add-ons Manager] /
[Install]
To use it, select it in the status bar on the bottom of editor.
The demonstrating file, synwrite_syntax_demo.scad, can be downloaded from
the thing:http://www.thingiverse.com/thing:1237864. Enjoy !
$ http://forum.openscad.org/mailing_list/MailingListOptions.jtp?forum=1 Runsun
Pan, PhD
$ libs: doctest https://github.com/runsun/openscad_doctest, faces
http://forum.openscad.org/A-faces-function-for-simple-polyhedrons-td12809.html
(git https://github.com/runsun/faces.scad), offline doc
http://forum.openscad.org/Use-openscad-offliner-for-offline-documentation-td13096.html
(git https://github.com/runsun/openscad_offliner), runscad.py(1
http://forum.openscad.org/Animating-gif-with-3D-rotation-tp14011p14029.html
,2 http://forum.openscad.org/Symmetrical-Rotation-tp14062p14075.html,git
https://gist.github.com/runsun/995250a8002386ab9abc);
$ tips: hash(1
http://forum.openscad.org/parameterized-models-td8303.html#a8306,2
http://forum.openscad.org/Can-I-get-some-code-review-up-in-here-tp12341p12355.html),
sweep http://forum.openscad.org/Two-annoyances-td12935i20.html#a13110,
var(1
http://forum.openscad.org/Ignoring-unknown-variable-issue-tp13156p13321.html
,2 http://forum.openscad.org/Special-Variables-tp14477p14512.html), lerp
http://forum.openscad.org/Irregular-mesh-generated-tp13765p13779.html,
animGif
http://forum.openscad.org/Animating-gif-with-3D-rotation-tp14011.html,
precision(1
http://forum.openscad.org/Inconsistent-conversion-of-floating-number-to-string-at-7th-significant-digit-tp14350.html
,2
http://forum.openscad.org/Simple-addition-of-numbers-introduces-error-td14408.html),
xl-control
http://forum.openscad.org/Parameterlist-Excel-export-to-OpenSCAD-tp15363p15367.html
View this message in context: Happy New Year + OpenSCAD syntax lexer for
SynWrite
http://forum.openscad.org/Happy-New-Year-OpenSCAD-syntax-lexer-for-SynWrite-tp15402.html
Sent from the OpenSCAD mailing list archive http://forum.openscad.org/
at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Happy New Year and thanks for the lexer.
I hadn't come across SynWrite before but it looks like a nice editor. I
have never seen multi-caret editing before!
I added render to the list of actions as it seems to be missing.
On 1 January 2016 at 04:06, runsun <runsun@gmail.com> wrote:
> Happy New Year to all dear fellow OpenSCADists! To enjoy our journey of
> OpenSCAD in the new 2016 to come, allow me to present a present: an
> OpenSCAD syntax lexer for the editor SynWrite
> <http://www.uvviewsoft.com/synwrite/>.
>
> It's a lexer intended to deal with large and/or complicated scad files.
> Users will be able to divide large code into sections, in-function sections
> and in-module sections, all are blocks that can be folded and easily
> navigated through the syntax tree panel.
>
> The lexer already being incorporated into the SynWrite library, so you can
> get right to it once the SynWrite is installed. Couple of screenshots :
>
> *1. The synwrite_syntax_demo.scad domonstrating all the features of the
> lexer:*
>
>
>
> *2. foldable in-function sections*
>
>
>
> *3. Foldable in-module sections*
>
>
>
> *4. William Adam's math lib as viewed with this lexer*
>
>
>
>
> To load it to your SynWrite, just go to [Options]/ [Add-ons Manager] /
> [Install]
>
> To use it, select it in the status bar on the bottom of editor.
>
> The demonstrating file, synwrite_syntax_demo.scad, can be downloaded from
> the thing:http://www.thingiverse.com/thing:1237864. Enjoy !
> $ <http://forum.openscad.org/mailing_list/MailingListOptions.jtp?forum=1> *Runsun
> Pan, PhD*
> $ *libs*: doctest <https://github.com/runsun/openscad_doctest>, faces
> <http://forum.openscad.org/A-faces-function-for-simple-polyhedrons-td12809.html>
> (git <https://github.com/runsun/faces.scad>), offline doc
> <http://forum.openscad.org/Use-openscad-offliner-for-offline-documentation-td13096.html>
> (git <https://github.com/runsun/openscad_offliner>), runscad.py(1
> <http://forum.openscad.org/Animating-gif-with-3D-rotation-tp14011p14029.html>
> ,2 <http://forum.openscad.org/Symmetrical-Rotation-tp14062p14075.html>,git
> <https://gist.github.com/runsun/995250a8002386ab9abc>);
> $ *tips*: hash(1
> <http://forum.openscad.org/parameterized-models-td8303.html#a8306>,2
> <http://forum.openscad.org/Can-I-get-some-code-review-up-in-here-tp12341p12355.html>),
> sweep <http://forum.openscad.org/Two-annoyances-td12935i20.html#a13110>,
> var(1
> <http://forum.openscad.org/Ignoring-unknown-variable-issue-tp13156p13321.html>
> ,2 <http://forum.openscad.org/Special-Variables-tp14477p14512.html>), lerp
> <http://forum.openscad.org/Irregular-mesh-generated-tp13765p13779.html>,
> animGif
> <http://forum.openscad.org/Animating-gif-with-3D-rotation-tp14011.html>,
> precision(1
> <http://forum.openscad.org/Inconsistent-conversion-of-floating-number-to-string-at-7th-significant-digit-tp14350.html>
> ,2
> <http://forum.openscad.org/Simple-addition-of-numbers-introduces-error-td14408.html>),
> xl-control
> <http://forum.openscad.org/Parameterlist-Excel-export-to-OpenSCAD-tp15363p15367.html>
>
> ------------------------------
> View this message in context: Happy New Year + OpenSCAD syntax lexer for
> SynWrite
> <http://forum.openscad.org/Happy-New-Year-OpenSCAD-syntax-lexer-for-SynWrite-tp15402.html>
> Sent from the OpenSCAD mailing list archive <http://forum.openscad.org/>
> at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
>
R
runsun
Fri, Jan 1, 2016 8:08 PM
@nophead, Thx for the render reminding. I'll collect bugs/improvement, etc
into next version.
From what I see, SynWrite has a lot of potentials. Besides the extremely
flexible lexer customization that I can do almost all I want, it has other
features:
-- With the external tool feature you can set it up to run OpenSCAD then
capture the console output of current file without even have OpenSCAD
opened. This will allows for any quick check of OpenSCAD language behaviors
-- It has the "Auto-completion" and "Function parameter hint" for common
languages. It might be possible that a plugin can be written for OpenSCAD.
-- It has the capability of customizable event handlers (like, on_change or
something) and python API for that. This means that it could be possible to
set up key_up event and output function names and argument lists to
SynWrite's output panel.
$ Runsun Pan, PhD
$ libs:
doctest ,
faces ( git ),
offline doc ( git ),
runscad.py( 1 , 2 , git ),
synwrite( 1 , 2 );
$ tips:
hash( 1 , 2 ),
sweep ,
var( 1 , 2 ),
lerp ,
animGif ,
precision( 1 , 2 ),
xl-control
--
View this message in context: http://forum.openscad.org/Happy-New-Year-OpenSCAD-syntax-lexer-for-SynWrite-tp15402p15408.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
@nophead, Thx for the render reminding. I'll collect bugs/improvement, etc
into next version.
>From what I see, SynWrite has a lot of potentials. Besides the extremely
flexible lexer customization that I can do almost all I want, it has other
features:
-- With the external tool feature you can set it up to run OpenSCAD then
capture the console output of current file without even have OpenSCAD
opened. This will allows for any quick check of OpenSCAD language behaviors
-- It has the "Auto-completion" and "Function parameter hint" for common
languages. It might be possible that a plugin can be written for OpenSCAD.
-- It has the capability of customizable event handlers (like, on_change or
something) and python API for that. This means that it could be possible to
set up key_up event and output function names and argument lists to
SynWrite's output panel.
-----
$ Runsun Pan, PhD
$ libs:
doctest ,
faces ( git ),
offline doc ( git ),
runscad.py( 1 , 2 , git ),
synwrite( 1 , 2 );
$ tips:
hash( 1 , 2 ),
sweep ,
var( 1 , 2 ),
lerp ,
animGif ,
precision( 1 , 2 ),
xl-control
--
View this message in context: http://forum.openscad.org/Happy-New-Year-OpenSCAD-syntax-lexer-for-SynWrite-tp15402p15408.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
N
Neon22
Fri, Jan 1, 2016 10:43 PM
sounds and looks pretty good. I'm a notepad++ person and I find the openSCAD
support very good.
How does it compare - anyone know ?
--
View this message in context: http://forum.openscad.org/Happy-New-Year-OpenSCAD-syntax-lexer-for-SynWrite-tp15402p15411.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
sounds and looks pretty good. I'm a notepad++ person and I find the openSCAD
support very good.
- http://www.thingiverse.com/thing:911342 (remix of Gary Crowell
<http://www.thingiverse.com/garyacrowellsr> original via Fogl
<http://www.thingiverse.com/thing:167899/#remixes> )
- http://www.thingiverse.com/thing:167899
How does it compare - anyone know ?
--
View this message in context: http://forum.openscad.org/Happy-New-Year-OpenSCAD-syntax-lexer-for-SynWrite-tp15402p15411.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
R
runsun
Fri, Jan 1, 2016 11:09 PM
@Neon22, I'm a Notepad++ person, too, being using it for as long as I can
remember.
Ever since I started learning OpenScad, I tried to make it work several
times but has no luck. Later on I found people seem to have done it, so I
picked up and tried those (including yours). What I found is that npp only
provides some commonly used features and I've tried and failed to add stuff
that I want. For example, the different sections type of blocks that I
described in this threads. The flexibility of syntax customization is far
beyond that of SynWrite.
Another consideration is the auto-completion and function parameter hint.
People WERE using Npp for that, but it seems that new version of npp doesn't
allow it anymore.
I am also eyeing at the several other customizations that I mentioned. It
gives me an impression that we can do a lot more to fit out needs.
It doesn't mean that npp is not good tool for OpenSCAD. I think it is still
good for many. But to deal with large and complicated files, which I often
have, npp is just not enough.
$ Runsun Pan, PhD
$ libs:
doctest ,
faces ( git ),
offline doc ( git ),
runscad.py( 1 , 2 , git ),
synwrite( 1 , 2 );
$ tips:
hash( 1 , 2 ),
sweep ,
var( 1 , 2 ),
lerp ,
animGif ,
precision( 1 , 2 ),
xl-control
--
View this message in context: http://forum.openscad.org/Happy-New-Year-OpenSCAD-syntax-lexer-for-SynWrite-tp15402p15412.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
@Neon22, I'm a Notepad++ person, too, being using it for as long as I can
remember.
Ever since I started learning OpenScad, I tried to make it work several
times but has no luck. Later on I found people seem to have done it, so I
picked up and tried those (including yours). What I found is that npp only
provides some commonly used features and I've tried and failed to add stuff
that I want. For example, the different *sections* type of blocks that I
described in this threads. The flexibility of syntax customization is far
beyond that of SynWrite.
Another consideration is the auto-completion and function parameter hint.
People WERE using Npp for that, but it seems that new version of npp doesn't
allow it anymore.
I am also eyeing at the several other customizations that I mentioned. It
gives me an impression that we can do a lot more to fit out needs.
It doesn't mean that npp is not good tool for OpenSCAD. I think it is still
good for many. But to deal with large and complicated files, which I often
have, npp is just not enough.
-----
$ Runsun Pan, PhD
$ libs:
doctest ,
faces ( git ),
offline doc ( git ),
runscad.py( 1 , 2 , git ),
synwrite( 1 , 2 );
$ tips:
hash( 1 , 2 ),
sweep ,
var( 1 , 2 ),
lerp ,
animGif ,
precision( 1 , 2 ),
xl-control
--
View this message in context: http://forum.openscad.org/Happy-New-Year-OpenSCAD-syntax-lexer-for-SynWrite-tp15402p15412.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
J
jpmendes
Mon, Jan 4, 2016 8:55 PM
Hello,
Tnx runsun for the lexer.
It seems to exist a problem with some rules because some modules do not
appear in the tree list.
A construct like this:
module foo() color("SlateGray") render(convexity=2) // or other any
"operator" before the curly bracket
{
...
}
doesn't appear in the tree list.
Btw, is there a reason for the boolean operators to have the same style as
operators like translation and rotation?
I already defined a new style for the boolean by editing directly the file
Lexlib.lxl for my own use. Made some other minor changes to suit my taste
also.
jpmendes
--
View this message in context: http://forum.openscad.org/Happy-New-Year-OpenSCAD-syntax-lexer-for-SynWrite-tp15402p15483.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Hello,
Tnx runsun for the lexer.
It seems to exist a problem with some rules because some modules do not
appear in the tree list.
A construct like this:
module foo() color("SlateGray") render(convexity=2) // or other any
"operator" before the curly bracket
{
...
}
doesn't appear in the tree list.
Btw, is there a reason for the boolean operators to have the same style as
operators like translation and rotation?
I already defined a new style for the boolean by editing directly the file
Lexlib.lxl for my own use. Made some other minor changes to suit my taste
also.
jpmendes
--
View this message in context: http://forum.openscad.org/Happy-New-Year-OpenSCAD-syntax-lexer-for-SynWrite-tp15402p15483.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
R
runsun
Mon, Jan 4, 2016 9:47 PM
@ jpmendes,
- The lexer wasn't designed to handle the coding style as module xx()
<operations> {...}. The <operations> could be a lot of different things
with undetermined length. It'd be too complicated to consider that (note
that comparing to other lexers comes with SynWrite, this lexer is already on
the "very complicated" side).
So at this moment the best bet is to rewrite it to module xx() {
<operations> ... }
- boolean shouldn't have the same style as operations. See below:
http://forum.openscad.org/file/n15485/160104_osc_lexer_demo.png
It's likely that something was changed during your modification. I
personally never edit Lexlib.lxl directly but going:
[Options]/[Customize lexer] --- modify the current lexer
or
[Options]/[Customize lexer library] --- pick a lexer from a list
You can go [Customize lexer library], pick a lexer, make a copy using the
icon on the menu. This will give you a new lexer like "OpenSCAD (copy)". You
then edit it, hit [Apply] on the button to see if it fits your need, or add
your own code to the example panel of "OpenSCAD (copy)" .
$ Runsun Pan, PhD
$ libs:
doctest ,
faces ( git ),
offline doc ( git ),
runscad.py( 1 , 2 , git ),
synwrite( 1 , 2 );
$ tips:
hash( 1 , 2 ),
sweep ,
var( 1 , 2 ),
lerp ,
animGif ,
precision( 1 , 2 ),
xl-control
--
View this message in context: http://forum.openscad.org/Happy-New-Year-OpenSCAD-syntax-lexer-for-SynWrite-tp15402p15485.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
@ jpmendes,
1) The lexer wasn't designed to handle the coding style as *module xx()
<operations> {...}*. The <operations> could be a lot of different things
with undetermined length. It'd be too complicated to consider that (note
that comparing to other lexers comes with SynWrite, this lexer is already on
the "very complicated" side).
So at this moment the best bet is to rewrite it to *module xx() {
<operations> ... }*
2) boolean shouldn't have the same style as operations. See below:
<http://forum.openscad.org/file/n15485/160104_osc_lexer_demo.png>
It's likely that something was changed during your modification. I
personally never edit Lexlib.lxl directly but going:
[Options]/[Customize lexer] --- modify the current lexer
or
[Options]/[Customize lexer library] --- pick a lexer from a list
You can go [Customize lexer library], pick a lexer, make a copy using the
icon on the menu. This will give you a new lexer like "OpenSCAD (copy)". You
then edit it, hit [Apply] on the button to see if it fits your need, or add
your own code to the example panel of "OpenSCAD (copy)" .
-----
$ Runsun Pan, PhD
$ libs:
doctest ,
faces ( git ),
offline doc ( git ),
runscad.py( 1 , 2 , git ),
synwrite( 1 , 2 );
$ tips:
hash( 1 , 2 ),
sweep ,
var( 1 , 2 ),
lerp ,
animGif ,
precision( 1 , 2 ),
xl-control
--
View this message in context: http://forum.openscad.org/Happy-New-Year-OpenSCAD-syntax-lexer-for-SynWrite-tp15402p15485.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
R
runsun
Mon, Jan 4, 2016 9:52 PM
- The lexer wasn't designed to handle the coding style as
module xx()
<operations>
{...}
FYI, the tech side of this is that it uses "module xx() {" to identify
module blocks (see the module block rule named: "r_module<id>(...){"
Inserting <operations> breaks the rule.
$ Runsun Pan, PhD
$ libs:
doctest ,
faces ( git ),
offline doc ( git ),
runscad.py( 1 , 2 , git ),
synwrite( 1 , 2 );
$ tips:
hash( 1 , 2 ),
sweep ,
var( 1 , 2 ),
lerp ,
animGif ,
precision( 1 , 2 ),
xl-control
--
View this message in context: http://forum.openscad.org/Happy-New-Year-OpenSCAD-syntax-lexer-for-SynWrite-tp15402p15486.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
runsun wrote
> 1) The lexer wasn't designed to handle the coding style as
*
> module xx()
> <operations>
> {...}
*
> .
FYI, the tech side of this is that it uses *"module xx() {"* to identify
module blocks (see the module block rule named: "r_module<id>(...){"
Inserting <operations> breaks the rule.
-----
$ Runsun Pan, PhD
$ libs:
doctest ,
faces ( git ),
offline doc ( git ),
runscad.py( 1 , 2 , git ),
synwrite( 1 , 2 );
$ tips:
hash( 1 , 2 ),
sweep ,
var( 1 , 2 ),
lerp ,
animGif ,
precision( 1 , 2 ),
xl-control
--
View this message in context: http://forum.openscad.org/Happy-New-Year-OpenSCAD-syntax-lexer-for-SynWrite-tp15402p15486.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
J
jpmendes
Mon, Jan 4, 2016 10:42 PM
Ok, understood.
However when I mentioned the boolean operations I meant /intersection,
difference / and /union/, that have the same style as non boolean
/translation, rotation/ etc
My personal modification was to put/ intersection difference and union/ bold
italic, creating:
item
DisplayName = 's_id_openscad_builtin_boolean'
Font.Charset = DEFAULT_CHARSET
Font.Color = clTeal
Font.Height = -13
Font.Name = 'Courier New'
Font.Style = [fsBold, fsItalic]
end
and
item
DisplayName = 'r_id_openscad_builtin_boolean'
StyleName = 's_id_openscad_builtin_boolean'
BlockType = btTagDetect
ConditionList = <
item
TagList.Strings = (
'difference'
'intersection'
'union')
TokenTypes = 4
end>
HighlightPos = cpAny
IgnoreAsParent = False
end
jpmendes
--
View this message in context: http://forum.openscad.org/Happy-New-Year-OpenSCAD-syntax-lexer-for-SynWrite-tp15402p15487.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Ok, understood.
However when I mentioned the boolean operations I meant /intersection,
difference / and /union/, that have the same style as non boolean
/translation, rotation/ etc
My personal modification was to put/ intersection difference and union/ bold
italic, creating:
item
DisplayName = 's_id_openscad_builtin_boolean'
Font.Charset = DEFAULT_CHARSET
Font.Color = clTeal
Font.Height = -13
Font.Name = 'Courier New'
Font.Style = [fsBold, fsItalic]
end
and
item
DisplayName = 'r_id_openscad_builtin_boolean'
StyleName = 's_id_openscad_builtin_boolean'
BlockType = btTagDetect
ConditionList = <
item
TagList.Strings = (
'difference'
'intersection'
'union')
TokenTypes = 4
end>
HighlightPos = cpAny
IgnoreAsParent = False
end
jpmendes
--
View this message in context: http://forum.openscad.org/Happy-New-Year-OpenSCAD-syntax-lexer-for-SynWrite-tp15402p15487.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
R
runsun
Mon, Jan 4, 2016 11:20 PM
I c. I misunderstood.
During the design of the lexer, I kept in mind not to make the colors too
complicated, because the structure is already complicated. For example, all
symbols are of same style. I recalled in other version of lexer for
Notepad++, for example, symbols are separated into different several
subgroups and styled differently.
I also consider leaving some space for users to work on when they want to
add styles for their own libraries.
So in terms of "operations", I simple put everything that is applied to an
object to same style.
No matter what, good to see you have it worked.
jpmendes wrote
Ok, understood.
However when I mentioned the boolean operations I meant
, that have the same style as non boolean
etc
My personal modification was to put
intersection difference and union
bold italic, creating:
item
DisplayName = 's_id_openscad_builtin_boolean'
Font.Charset = DEFAULT_CHARSET
Font.Color = clTeal
Font.Height = -13
Font.Name = 'Courier New'
Font.Style = [fsBold, fsItalic]
end
and
item
DisplayName = 'r_id_openscad_builtin_boolean'
StyleName = 's_id_openscad_builtin_boolean'
BlockType = btTagDetect
ConditionList = <
item
TagList.Strings = (
'difference'
'intersection'
'union')
TokenTypes = 4
end>
HighlightPos = cpAny
IgnoreAsParent = False
end
jpmendes
$ Runsun Pan, PhD
$ libs:
doctest ,
faces ( git ),
offline doc ( git ),
runscad.py( 1 , 2 , git ),
synwrite( 1 , 2 );
$ tips:
hash( 1 , 2 ),
sweep ,
var( 1 , 2 ),
lerp ,
animGif ,
precision( 1 , 2 ),
xl-control
--
View this message in context: http://forum.openscad.org/Happy-New-Year-OpenSCAD-syntax-lexer-for-SynWrite-tp15402p15489.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
I c. I misunderstood.
During the design of the lexer, I kept in mind not to make the colors too
complicated, because the structure is already complicated. For example, all
symbols are of same style. I recalled in other version of lexer for
Notepad++, for example, symbols are separated into different several
subgroups and styled differently.
I also consider leaving some space for users to work on when they want to
add styles for their own libraries.
So in terms of "operations", I simple put everything that is applied to an
object to same style.
No matter what, good to see you have it worked.
jpmendes wrote
> Ok, understood.
> However when I mentioned the boolean operations I meant
/
> intersection, difference
/
> and
/
> union
/
> , that have the same style as non boolean
/
> translation, rotation
/
> etc
> My personal modification was to put
/
> intersection difference and union
/
> bold italic, creating:
>
> item
> DisplayName = 's_id_openscad_builtin_boolean'
> Font.Charset = DEFAULT_CHARSET
> Font.Color = clTeal
> Font.Height = -13
> Font.Name = 'Courier New'
> Font.Style = [fsBold, fsItalic]
> end
>
>
> and
>
> item
> DisplayName = 'r_id_openscad_builtin_boolean'
> StyleName = 's_id_openscad_builtin_boolean'
> BlockType = btTagDetect
> ConditionList = <
> item
> TagList.Strings = (
> 'difference'
> 'intersection'
> 'union')
> TokenTypes = 4
> end>
> HighlightPos = cpAny
> IgnoreAsParent = False
> end
>
> jpmendes
-----
$ Runsun Pan, PhD
$ libs:
doctest ,
faces ( git ),
offline doc ( git ),
runscad.py( 1 , 2 , git ),
synwrite( 1 , 2 );
$ tips:
hash( 1 , 2 ),
sweep ,
var( 1 , 2 ),
lerp ,
animGif ,
precision( 1 , 2 ),
xl-control
--
View this message in context: http://forum.openscad.org/Happy-New-Year-OpenSCAD-syntax-lexer-for-SynWrite-tp15402p15489.html
Sent from the OpenSCAD mailing list archive at Nabble.com.