LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

Parser Test 3 (A Return Stack & Compiler)

Posted 01-03-2013 at 09:53 AM by rainbowsally
Updated 01-10-2013 at 06:05 PM by rainbowsally

Parser Test 3 (A Return Stack & Compiler)

A self extractor for the 'lib' files that we include for this (pretty cute) little calculator are here.
http://www.linuxquestions.org/questi...wsally-615861/

Re: the compiler part. It's not much of a compiler, but it serves as a proof of concept. (It's used internally, the program is not compiled.)

Before we dig in here, I should say...

Bug in Parser Test 2.

...
Member
Posted in Uncategorized
Views 1106 Comments 0 rainbowsally is offline
Old

Parser Test 1

Posted 01-02-2013 at 08:24 PM by rainbowsally
Updated 01-02-2013 at 08:26 PM by rainbowsally

Parser Test 1

------------------------------------

See the previous blog entry: "Playing with parsing" here.
http://www.linuxquestions.org/questi...wsally-615861/
to grab the files we need to include for these tests and a working mc2 definitions file for those who have mc2. Type "mc2 -init" first time. After that "make update" will add/remove files from the makefile.

[Note that we can link OR include...
Member
Posted in Uncategorized
Views 1139 Comments 0 rainbowsally is offline
Old

Playing with parsing

Posted 01-02-2013 at 07:46 PM by rainbowsally
Updated 08-06-2014 at 08:36 AM by rainbowsally (typo correction)

Playing with parsing

Today's features:
  • Creating an extensible mid-level parser that makes sense in C.
  • Looking at BNF-like syntax and C syntax similarities.
  • Tossing flex as far as we can throw it. While its still burning.

The file set here isn't 'finalized' in any way but it's been stable for a few days. These examples are therefor not about THIS set of functions but about parsing in general, although this file set will very likely be part of the mc2 parsing system...
Member
Posted in Uncategorized
Views 1089 Comments 0 rainbowsally is offline
Old

Simple C: some ideas on how to find headers, names, and a name demangler tool

Posted 02-08-2012 at 03:23 AM by rainbowsally
Updated 08-06-2014 at 10:30 AM by rainbowsally

The simplest yet, I think.. at least the C program is.

Features:
  • tips on how to find C/C++ header paths and declarations
  • tips on how to find libs containing references and definitions
  • a super-simple program to demangle C++ names
----------------
Note: With even a simple automatic makefile generator such as the one built from sources in this blog (
http://www.linuxquestions.org/questi...-part-2-34421/),
...
Member
Posted in Uncategorized
Views 1434 Comments 0 rainbowsally is offline
Old

Simple C: Filling in the blanks - A simple memory allocator/reallocator.

Posted 01-23-2012 at 07:32 AM by rainbowsally

No memdup()? No memcat()? No prob.

Today's Features:
  • Simple C/C++ program and new memdup() and memcat() functions.
  • C macros (spanning lines with backslash) to create 'lenient' aliases.
  • Type casting in C/C++ to override sometimes overly strict syntax checks.
Anyone that has used strdup() or strcat() knows how convenient those are. But when it comes to memory allocation and reallocation for other kinds of data the lack of simple standard mechanisms for this often leads to duplicated...
Member
Posted in Uncategorized
Views 7029 Comments 1 rainbowsally is offline

  



All times are GMT -5. The time now is 03:40 PM.

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
Open Source Consulting | Domain Registration