Kent A. Reed | 1 Feb 05:47
Picon

Re: rs274ngc bison/flex parser {was: question on gcode parsing}

On 1/31/2012 6:10 PM, Michael Haberler wrote:
> [I guess this better belongs here]
I happen to agree with you, Michael, but Erik has expressed his dislike 
of this "second" list (indeed, I don't see any messages from him in my 
archive of this list) and he's our most likely contributor of wisdom on 
this subject. For that reason, I replied instead to the duplicate of 
this message that you posted to emc-users. My apology in advance if this 
upsets your attempt to re-situate the thread.

Regards,
Kent

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
EBo | 1 Feb 10:58
Favicon

Re: rs274ngc bison/flex parser {was: question on gcode parsing}

If it is of any interest I could send you an experimental parser I 
wrote a decade ago that uses Sprit++ (a C++ template tool, part of 
Boost.org now, which replaces bison and flex, and reads like EBNF).  At 
that time I was experimenting with runtime polymorphic parsers (which 
would allow you to overload the language description and support 
different interpretations of the rs274*...

   EBo --

On Wed, 1 Feb 2012 00:10:04 +0100, Michael Haberler wrote:
> [I guess this better belongs here]
>
> ok, while this wonderful discussion was raging on, I built a working
> parser for the current linuxcnc dialect, as an experiment in
> feasability (this is NOT an end-user tool!)
>
> 
> http://git.mah.priv.at/gitweb/emc2-dev.git/shortlog/refs/heads/parser-v2-dev
>
> - Michael
>
> ps: I'd appreciate feedback from language geeks wrt to removing
> shift/reduce conflicts.
>
> -------------- src/emc/parser-v2/README: --------
>
> RS274NGC parser based on Bison/Flex
> ===================================
>
> usage:
(Continue reading)

Michael Haberler | 1 Feb 12:16
Picon
Favicon

Re: rs274ngc bison/flex parser {was: question on gcode parsing}

yes, please - I looked at Sprit++ and would be happy to shorten the learning curve.

-m
ps: I just love these concise C++ template compile time errors - how could I have ever lived without them ;-?

Am 01.02.2012 um 10:58 schrieb EBo:

> If it is of any interest I could send you an experimental parser I 
> wrote a decade ago that uses Sprit++ (a C++ template tool, part of 
> Boost.org now, which replaces bison and flex, and reads like EBNF).  At 
> that time I was experimenting with runtime polymorphic parsers (which 
> would allow you to overload the language description and support 
> different interpretations of the rs274*...
> 
>   EBo --
> 
> On Wed, 1 Feb 2012 00:10:04 +0100, Michael Haberler wrote:
>> [I guess this better belongs here]
>> 
>> ok, while this wonderful discussion was raging on, I built a working
>> parser for the current linuxcnc dialect, as an experiment in
>> feasability (this is NOT an end-user tool!)
>> 
>> 
>> http://git.mah.priv.at/gitweb/emc2-dev.git/shortlog/refs/heads/parser-v2-dev
>> 
>> - Michael
>> 
>> ps: I'd appreciate feedback from language geeks wrt to removing
>> shift/reduce conflicts.
(Continue reading)

Chris Morley | 3 Feb 05:09
Picon
Favicon

Re: gladevcp patch -please review



From: chrisinnanaimo-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org
To: mah-Hlu4VFpx/Azk7+2FdBfRIA@public.gmane.org
Subject: RE: gladevcp patch -please review
Date: Fri, 3 Feb 2012 04:08:25 +0000

.ExternalClass .ecxhmmessage P {padding:0px;} .ExternalClass body.ecxhmmessage {font-size:10pt;font-family:Tahoma;}

> can I ask you to have a look at this patch before I add it to v2.5_branch?
>
> It works around a Gtk bug where Gladedbuilder files havent set their name properly which is needed to properly support themes/gtkrc
>
>
> http://git.linuxcnc.org/gitweb?p=emc2.git;a=commit;h=f62708319375ce2f26dccd686692c270b495f4d3
>
> please see also the example posted here:
>
> http://www.linuxcnc.org/index.php/english/component/kunena/?func=view&catid=48&id=16439&limit=6&start=18#17332
>
> thanks
>
> Michael
>
>

I tried your patch and it seemed to work fine. -pretty cool!
But looking at the code I wonder if the -R option should be run before the -t theme change since
themes have rc files. It might not matter I didn't test this.

Also the docs should mention that your example will not work with all themes.
themes using pixmap engine render the states of (eg.) labels with different images.
You must have different colored images.
I am not an theme expert so there may be away around this - in fact in the Blue-Joy theme
there is an option written for some widgets:       recolorable        = TRUE
Though it does't seen to allow recoloring - If i add Blue-Joy them to your example it doesn't work.

I really wish you would change back the printed info about changing themes.
I had a them problem and could not find out if gladevcp was trying to change the theme or not.
I can see this as a common user problem and I see no reason to hide it from them.
by the way how do you enable debug messages?

Chris M

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Emc-developers mailing list
Emc-developers@...
https://lists.sourceforge.net/lists/listinfo/emc-developers
Chris Morley | 3 Feb 05:18
Picon
Favicon

PATCH - gremlin for 2.5

Hi here is a patch that I wish to add to 2.5
I consider it a bug fix.

It adds ability to select options in gremlin that are common
such as setting the units of the DRO.
in AXIS and allows clearing the display, though that may need an EMC action added.
It also allows you to reload the program be calling load without the filename.
There maybe a better way.

There is a turned off option called show_offsets that will
show tool and coordinate offsets on the DRO but I will submit a different patch
later as it touches glcannon affects AXIS and should go in master.

Michael, Pavel what do you think?

Chris M
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Emc-developers mailing list
Emc-developers@...
https://lists.sourceforge.net/lists/listinfo/emc-developers
Jeff Epler | 5 Feb 02:46
Favicon

Re: gremlin patch to look at

The part that applies to gremlin.py looks fine, and I see how it's
enabling the stuff in hal_gremlin.py.

I don't know what the use case is for toggling lathe mode at runtime,
but it probably doesn't hurt anything.

Jeff

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
Chris Morley | 5 Feb 08:12
Picon
Favicon

Re: gremlin patch to look at



> Date: Sat, 4 Feb 2012 19:46:39 -0600
> From: jepler-ixP+gI44yfQ4d9/VWYMlNA@public.gmane.org
> To: emc-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Subject: Re: [Emc-developers] gremlin patch to look at
>
> The part that applies to gremlin.py looks fine, and I see how it's
> enabling the stuff in hal_gremlin.py.
>
> I don't know what the use case is for toggling lathe mode at runtime,
> but it probably doesn't hurt anything.
>
> Jeff
>

Thanks for looking Jeff.

I feel no strong attachment to the ability to change to lathe mode at runtime.
Other then it is easily discoverable in glade by the user I can't think of a
reason for it either.

I could change it to search the INI file for the lathe display switch.
Then it will automatically switch as long as the user knows to add the switch statement
and I'm pretty sure you could override that in a program if you wanted.

look like I should also limit the views in lathe mode to y and P.
It doesn't seem to handle the others well when rotated...

Chris M
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Emc-developers mailing list
Emc-developers@...
https://lists.sourceforge.net/lists/listinfo/emc-developers
spadnos | 5 Feb 08:43
Picon
Favicon

Re: gremlin patch to look at

>
>
>
>> Date: Sat, 4 Feb 2012 19:46:39 -0600
>> From: jepler@...
>> To: emc-developers@...
>> Subject: Re: [Emc-developers] gremlin patch to look at
>>
>> The part that applies to gremlin.py looks fine, and I see how it's
>> enabling the stuff in hal_gremlin.py.
>>
>> I don't know what the use case is for toggling lathe mode at runtime,
>> but it probably doesn't hurt anything.
>>
>> Jeff
>>
>
> Thanks for looking Jeff.
>
> I feel no strong attachment to the ability to change to lathe mode at
> runtime.
> Other then it is easily discoverable in glade by the user I can't think of
> a
> reason for it either.
>
> I could change it to search the INI file for the lathe display switch.
> Then it will automatically switch as long as the user knows to add the
> switch statement
> and I'm pretty sure you could override that in a program if you wanted.
>
> look like I should also limit the views in lathe mode to y and P.
> It doesn't seem to handle the others well when rotated...
>
> Chris M

There are combination machines that can operate as either lathe or mill. 
Two examples that come to mind are the ShopTask machines and the Tormach
PCNC with the lathe attachment.

So if a UI can swap on the fly, that's step 1 (of about 10e(3+/-1)) down :)

- Steve

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
ebo@swcp.com | 5 Feb 10:10
Favicon

Re: rs274ngc bison/flex parser {was: question on gcode parsing}

I'm in the middle of a move and will only have sporatic email access for the next week.  Also, i do not have ready access to those files.  

Could you give me a poke in a week or two?

EBo

Sent from my Android phone on T-Mobile. America’s first nationwide 4G network.

----- Reply message -----
From: "Michael Haberler" <mail17 <at> mah.priv.at>
To: "EBo" <ebo <at> sandien.com>
Subject: [Emc-developers] rs274ngc bison/flex parser {was: question on gcode parsing}
Date: Sat, Feb 4, 2012 12:00 pm


Hi Ebo,

the more I look into it the more Spirit looks interesting to me. Would you mail me your example?

regards

-Michael
Am 01.02.2012 um 10:58 schrieb EBo:

> If it is of any interest I could send you an experimental parser I
> wrote a decade ago that uses Sprit++ (a C++ template tool, part of
> Boost.org now, which replaces bison and flex, and reads like EBNF).  At
> that time I was experimenting with runtime polymorphic parsers (which
> would allow you to overload the language description and support
> different interpretations of the rs274*...
>
>  EBo --
>
> On Wed, 1 Feb 2012 00:10:04 +0100, Michael Haberler wrote:
>> [I guess this better belongs here]
>>
>> ok, while this wonderful discussion was raging on, I built a working
>> parser for the current linuxcnc dialect, as an experiment in
>> feasability (this is NOT an end-user tool!)
>>
>>
>> http://git.mah.priv.at/gitweb/emc2-dev.git/shortlog/refs/heads/parser-v2-dev
>>
>> - Michael
>>
>> ps: I'd appreciate feedback from language geeks wrt to removing
>> shift/reduce conflicts.
>>
>> -------------- src/emc/parser-v2/README: --------
>>
>> RS274NGC parser based on Bison/Flex
>> ===================================
>>
>> usage:
>>
>> parser [options] ngcfile ...
>>
>> example:
>> $ parser emc2-dev/nc_files/*.ngc
>>
>> no output means good news (parse ok)
>> other that that, no actions - this is an experiment to find out
>> wether this is feasible
>>
>> options are:
>> -v: create listing with interspersed error messages
>> -s: trace scanning
>> -p: trace parsing
>>
>> I'd be grateful for hints how to remove the remaining shift/reduce
>> conflicts in the grammar. I guess there's something wrong/missing
>> with
>> operator precedence and/or associativity.
>>
>> Error messages
>> --------------
>> There are no custom error messages yet. All error messages are
>> autogenerated from the parser, and derived from the grammar,
>> including
>> the set of permitted tokens, which is already quite reasonable:
>>
>> $ parser -v emc2-dev/src/emc/parser-v2/ngc/foo.txt
>>
>> ...
>> #<bar> = [EXISTS[23
>> -----------------^^
>> ngc/foo.txt:8:unexpected integer, expecting #
>> ...
>> m73.1
>> ---^^
>> ngc/foo.txt:18:unexpected real, expecting one of: <<EOF>> EOL ^ <at> %
>> if while break do repeat sub endsub return call # G-code M-code A B C
>> D E F H I J K L P Q R S T U V W X Y Z
>> ...
>> N3242 G10 x[1
>>
>> ^
>> ngc/foo.txt:24:unexpected EOL, expecting one of: ] EQ NE GT GE LT LE
>> and or xor + - * / mod pow
>> ...
>> N3242 G10 x[1]]
>> --------------^
>> ngc/foo.txt:25:unexpected ], expecting one of: <<EOF>> EOL ^ <at> % if
>> while break do repeat sub endsub return call # G-code M-code A B C D
>> E
>> F H I J K L P Q R S T U V W X Y Z
>> ..
>> 4 error(s)
>>
>> Error recovery:
>> ---------------
>>
>> currently, on syntax error the parser skips to the next of line, and
>> continues, which seems to work ok.
>>
>> Build notes
>> -----------
>> All files needed to compile are in this branch
>> If you change the grammar: bison 2.5 is needed (Ubuntu 10.04 has
>> 2.4.1 which is too old)
>> I compiled from source - found no backport.
>> Flex: the stock flex coming with 10.04 is fine (flex 2.5.35)
>>
>> Speed is quite good - without spending a thought on optimization and
>> all debug options on, this parser does about 300.000 lines/second on
>> my MBP.
>>
>> added Submakefile
>>
>> base taken from https://idlebox.net/2007/flex-bison-cpp-example/
>> much of that example code is still to be deleted but then this is
>> a proof of concept
>>
>> -mah
>>
>> ------------------------------------------------------------------------------
>> Keep Your Developer Skills Current with LearnDevNow!
>> The most comprehensive online learning library for Microsoft
>> developers
>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3,
>> MVC3,
>> Metro Style Apps, more. Free future releases when you subscribe now!
>> http://p.sf.net/sfu/learndevnow-d2d
>> _______________________________________________
>> Emc-users mailing list
>> Emc-users <at> lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Keep Your Developer Skills Current with LearnDevNow!
>> The most comprehensive online learning library for Microsoft
>> developers
>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3,
>> MVC3,
>> Metro Style Apps, more. Free future releases when you subscribe now!
>> http://p.sf.net/sfu/learndevnow-d2d
>> _______________________________________________
>> Emc-developers mailing list
>> Emc-developers <at> lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-developers
>
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> Emc-developers mailing list
> Emc-developers <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-developers


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Emc-developers mailing list
Emc-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Emc-developers mailing list
Emc-developers@...
https://lists.sourceforge.net/lists/listinfo/emc-developers
Andy Pugh | 5 Feb 14:35
Picon

Re: gremlin patch to look at


On 5 Feb 2012, at 03:46, Jeff Epler <jepler@...> wrote:

> I don't know what the use case is for toggling lathe mode at runtime,

I have a machine that runs as both a mill and a lathe. I shut down and restart from a different config file to
switch, but I can imagine someone with a similar but different machine might want to switch live. Tormach
Duality maybe? 
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2

Gmane