I see some sample main (floating) for C, e.g. And
This dereference seems aust I do not know what it is, and - Please forgive me - I do not want to if I can escape from it.
I just want to define the instruments & amp; Grammar (for modem AT commands) and main () auto generated, or cut / pasted from anywhere.
The slightest twist is that most of the examples read from the file, while I'm getting a series of input (AT command) as the string passed in the parameters.
Can someone point me at a simple main (), which I can optimize (and possibly suggest to customize it to HO?) Ask a lot, sorry.
AST is a "abstract syntax tree", and you do not need one for AT commands.
In fact, ATNLR is overkill for parsing AT commands. Why not just check "AT", and then parse the command by hand? The modem command set is probably sufficiently simple that compared to ANLR, it would be as easy as doing it if you have never done it before.
If you are implementing a complete AT command set, "++" escape sequence, time is also a factor that you will not be able to use alone ATRR.
Answer to comments:
It is advisable to see the ANLR as a tool to reduce bugs. In response to your questions, "Do you want to read it or have the codes prepared? And who you want to keep?", The answer is "It depends." I use both ANTLR and hand coded parser on the basis of reference; This is a reference where I will choose hand coded parser for some reason: perhaps an embedded application, relatively straightforward (not equal to many command complexity), a comics protocol you have a different context and clearly have its own reasons in which Includes "try it out"
So, to answer your second question about a main topic: Yes, you can use one on the ANLR wiki. To read from a piece of memory usage, AntelR 3 NACCI String Inflestream ()
or AntelR3 NACCI String Copystream ()
(as appropriate) 3 ASCIIFileStreamNew () .
No comments:
Post a Comment