Another interesting related trawling find, with a some ideas for syntax 
evolution:

A G code precompiler which parses a language based on C control structures, and 
generates rs274ngc gcode for LinuxCNC (including O-word constructs etc). It's 
by a fellow named Lawrence Yu, and its based on PLY/(Python lex yacc), and 
includes some basic yacc grammar for a G-code block syntax

an interesting concept I hadnt thought of: he uses whitespace and 
whitespace/newline combination as language tokens returned by the scanner

it makes a lot of sense to do that for rs274ngc and is a way to deal with Ken's 
'drop whitespace squashing' idea in a backwards-compatible/selectable way and 
within a single parser

its very well hidden from google:

http://tsemsb.blogspot.com/search/label/GCODE
http://tsemsb.blogspot.com/2010/04/cgcc-gcode-with-c-constructs.html

The code isnt online in a readable fashion - one need to download and unpack 
the zip archive:
http://sites.google.com/site/cgcccompiler/CGCC_v101.zip


-m

ps: unfortunately, a quick check of performance of pycparsers with a PLY based 
scanner/parser suggests it needs serious tuning, at least a faster scanner - a 
dozen or so example program needs near 0.5 sec of CPU time 

Am 23.01.2012 um 03:16 schrieb Scott Hasse:

> I understand where you are coming from.  Word order is not important as
>> 


------------------------------------------------------------------------------
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to