View Single Post
  #22   Report Post  
Old June 17th 07, 04:29 PM posted to rec.radio.amateur.antenna
Richard Clark Richard Clark is offline
external usenet poster
 
First recorded activity by RadioBanter: Jul 2006
Posts: 2,951
Default Antenna programming tool/language/compiler/preprocessor?

On Sun, 17 Jun 2007 05:06:25 -0700, wrote:

Again,

my intention is, not to re-invent the programming language "C".


Hi Aziz,

Unfortunately that is exactly what you have done, re-invent C. The
source you provide makes sense mostly to the C programming community,
not antenna designers.

MY intention is, to describe in a prooven language an antenne. I decided
the programming language C, because it is most used language on the
world.


Antenna designers are not C programmers, usually. As this post proves
through your contribution, English is far more universal - hence
designing an antenna pre-processing language with a natural language
interface makes far more sense.

You don't know BNF or YACC, do you?

I have not given any name for my language to the pre-processor. Lets
call this as SNEC - just for "Symbolic NEC". The commands for the pre-
processor has similar syntax to the programming language C. But not
exactly the same. It has many limitations.


The first limitation is the source you provide is not a symbolic
language, it is a procedural language. Just giving it the name
symbolic does not make it one.

Please reference SNOBOL for symbolic languages, or Pascal records, or
if you insist C, then C's structs (I notice you don't use structs).

Mainstream symbolic languages still in use are AWK and Perl. Either
of these languages could be implemented in C, but neither look like C.

Do you know AWK? Perl?

Professional software C programmers have skills with the UNIX toolkit
since C was designed in BNF created by YACC and its product used to
build AWK.

As an example, I show you one of the source code of a horn antenna for
WLAN. It has three modules. As you can see, the language is as
superset of NEC2 and 4NEC2. It can be adapted easily to any other
antenne defining formats. If the pre-processor detects an unknowing
command, it will do nothing.


This is called a "silent failure" and YACC can easily provide a not so
silent warning. "Silent failures" are very poor design.

Just taking the line of code and writing
to output file. A special set of commands will be interpreted by the
pre-processor. It will translate it into the 4NEC2/NEC2 commands.
That is all. It is a very simple language, but you can design very
complex antenna model with few lines of "code".
The output file has a lot of kilobytes of code! It will split surface
patches into many segments or wires. The main module is Horn1.txt.


You should also consult (by googling the term) XLZIZL.zip.

You have done a lot of work. You obviously know what you want from
your code. You clearly know what the product is going to be. To be
useful, you need to wrap it in a truly symbolic language of your own
design.

Using the appropriate tools, LEX and YACC, you can preserve your
investment with the code you have written, and build a natural
language (or symbolic) interface to it.

Research the term BNF (Backus Naur Form). BNF is the ultimate
symbolic code and has stood the test of time in some version for 50
years.

73's
Richard Clark, KB7QHC