X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Message-ID: <53EA7E2C.40804@sonic.net> Date: Tue, 12 Aug 2014 13:50:52 -0700 From: Dave Curtis User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121028 Thunderbird/16.0.2 MIME-Version: 1.0 To: geda-user AT delorie DOT com Subject: Re: [geda-user] rs-274x nits References: <53EA540E DOT 9000609 AT sonic DOT net> <2aabf5abd73cc057e4a0193bf4a2d101 AT mail DOT gmail DOT com> In-Reply-To: <2aabf5abd73cc057e4a0193bf4a2d101@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVbE6NIGWnET/aQO4VPRwwYhK+2O4LoqxQ0E8/UoeN5c2R7HXmwHxHS8x0v9tCoieU+ecd8JafXyjxWtfRUkolQVx4tdNJH7s30= X-Sonic-ID: C;Tp0ZWWIi5BG53c2354E5FQ== M;GFCIWWIi5BG53c2354E5FQ== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd Reply-To: geda-user AT delorie DOT com On 08/12/2014 11:46 AM, Dave Kerber wrote: >> -----Original Message----- >> From: Dave Curtis [mailto:davecurtis AT sonic DOT net] >> Sent: Tuesday, August 12, 2014 1:51 PM >> To: geda-user AT delorie DOT com >> Subject: [geda-user] rs-274x nits >> >> I'm trying to interpret the gerber format specification document >> authored by Ucamco. >> >> 1. On page 35 it says: >> The line separators CR and LF have no effect; they can be >> ignored when >> processing the file. It >> is recommended to use line separators to improve human readability. >> >> 2. On page 36 it says: >> It is recommended to add line separators between data blocks for >> readability. Do not >> put a line separator within a data block, except after a >> comma separator >> in long data blocks. >> The line separators have no effect on the image. >> >> >> 3. on page 40, talking about closing parameter blocks it says: >> The '%' must immediately follow the '*' of the last data >> block without >> intervening line separators. >> This is an exception to the general rule that a data block can be >> followed by a line separator. >> >> #3 is clear enough. >> >> #1 and #2 seem to be in conflict. A strict reading of #1 >> would say that >> CR and LF should simply be expunged, and that CR/LF could even split >> G-coded, numbers, etc., like this: >> G >> 03 >> X >> 123 >> * >> Which seems odd, but is a result of strict reading of #1. But is in >> conflict with the advice of #2. > > I don't see any conflict there. #1 is saying that *when processing* you > must ignore line breaks, but it is recommended to put them in for > readability. Your example of splitting G-codes, etc, certainly does NOT > improve readability.' So, then it is your interpretation that a correct RS-274X parser should not reject G-codes (and other lexical units) that have been split by CR/LF's? > > #2 is saying to put line blocks where they will improve readability, just > not at random spots in a data block. > > >> >> It's easy enough to comply with the advice of #2 while >> writing. But if >> reading RS-274X, should CR/LF's that split lexical units be ignored? >> Although I realize that even if legal, I doubt if anyone >> writes gerber >> that way. >> >> -dave >> >> >