LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Blogs > rainbowsally
User Name
Password

Notices


Rate this Entry

The C/C++ Parser Generator (v. 2.x) -- The Brains

Posted 04-20-2015 at 07:15 PM by rainbowsally
Updated 05-08-2015 at 05:17 AM by rainbowsally (bug fix, typo correction, misc tweeks)

The C/C++ Parser Generator (v. 2.x) -- The Brains

Features:
  • How many times do I have to tell you, Igor?

See the version notes at the top of the source extractor below. Latest: May 8, 2015.

The code for this is just over the size limit here at linuxquestions last time I ran into it, so we have packed this stuff up.

Run this file as 'sh parser-files.base64'. You probably have the base64 app if you're running linux.

It creates:

src
src/parser.h
src/common
src/common/parser.cpp

The Madness and examples using this code begins here:
http://www.linuxquestions.org/questi...melcase-36511/

file: parser-files.base64
purpose: compressed sources extractor
Code:
# Run this as sh parser-files.base64
# Version 2.1: minor bug fix in error display
# Version 2.2: fixed bug in OUT OF OUTPUT MEMORY for copy_n() funcs in do_while()
# Version 2.3 fixed missing update_errpos() and skip_past() (not going past)
# Version 2.4 fixed copy_to() (advanced ip one char too far)
# Version 2.5 several non-critical tweeks and cleanups ==>
#   added op string termination in RESTORE_PTRS()
#   added skip_delimited() and is_delimited() parser funcs hacks
#   removed unimplemented tabstr() declaration

cat << _eof | base64 -d - > src.tar.xz
/Td6WFoAAATm1rRGAgAhARYAAAB0L+Wj4FH/E3xdADmciIYQ5JSzSrhLj6AMfRRMT3fYqdcEtrO0
A/BWRQ4kFhfO/Xaejqu22X1tbMJiL1Ne7cqSd4Fz1GkxKrKRNYqyGJUnISVNjTIeykMiXcGODBGq
wE34Xm5iX+gWN5ohFSSdI2w+qsGu7D7ojw5dv0pk6tSx7fFC5m6uTJk0RnYP3Pffg5d0k6x4IUuO
K1O77dd0mcR3xlAGRi49u1uLXiYdyqKfxVQtem+l2zxg+hdlJEcm2qRAnoFdHF75tadW7J7/dFeW
HL5zRwBeN0C3lRPqESH/tZiXlmoeErbINeLnwhEGW5UJ/9pl4Jop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J4CkAQAhwbJrscRn+wIAAAAABFla
_eof

tar -xaf src.tar.xz
Posted in Uncategorized
Views 890 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 02:35 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration