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

Notices


Old

Alphanumeric Calculator: Flex Specification

Posted 10-01-2021 at 07:29 PM by astrogeek
Updated 10-07-2021 at 01:47 AM by astrogeek (Rev. 3 source)

This post is Part 3 of the Alphanumeric Calculator program group.

Note: This is Rev. 3 version and works with Rev. 3 Bison specification.

Copy the code below into a file named alphacalc.l in your build directory for this project where Makefile and alphacalc.y are located.

This is the specification file for a Flex generated lexical analyzer, also called a lexer or scanner.

A brief description of the file contents follows, but if you are...
Moderator
Views 486 Comments 0 astrogeek is offline
Old

Alphanumeric Calculator: Makefile

Posted 10-01-2021 at 07:29 PM by astrogeek
Updated 10-03-2021 at 12:45 PM by astrogeek (meh... tpoys)

This post is Part 2 of the Alphanumeric Calculator program group.

Copy the code below into a file named Makefile in your local build directory for this project, the same directory where alphacalc.l and alphacalc.y are located.

Read and follow comment about TABs at top of the file.

I have it configured to build with gcc and -std=c17, although this project does not use any features specific to the c17 standard. If you use a different compiler or an older gcc...
Moderator
Views 437 Comments 0 astrogeek is offline
Old

Alphanumeric Calculator: The Source

Posted 10-01-2021 at 07:28 PM by astrogeek
Updated 10-12-2021 at 11:52 AM by astrogeek (Test cases, rearrange page)

Alphanumeric Calculator: The Source

To make it easy to find the source code I have moved the links to the top, along with links to test cases for my code and your build! You will find a brief discussion of the origins of this project below, as well as instructions for building and running the program.

The Source Code

Two source files and a Makefile are all that is required to build this project. Follow each of the links below to copy/paste the source...
Moderator
Views 573 Comments 0 astrogeek is offline
Old

New Years Data To DB - Arithmetic, Graphs and Relations

Posted 03-14-2019 at 04:58 PM by astrogeek
Updated 03-15-2019 at 12:14 PM by astrogeek (Forgot aggregate column)

... Or, How To Get From Arithmetic to Relational Algebra and Enjoy The Trip!

Quote:
Originally Posted by dogpatch View Post
I found the 'NP Complete' link quite interesting, even though i still don't fully grasp the concept, nor your explanations about sets, etc.
I would very much like to try to explain some of the ideas of sets, how those are important to some aspects of our fun with the newyears puzzle, and why that takes us into the domains of graph theory and relational databases. In doing so, I do not pretend...
Moderator
Views 1498 Comments 0 astrogeek is offline
Old

New Years Data To DB - The Model and The Data

Posted 03-12-2019 at 03:48 PM by astrogeek
Updated 03-12-2019 at 05:02 PM by astrogeek (typos)

With a now complete solution set and minimal set of generating expressions, it seems reasonable to think about inserting these into a relational database in order to more easily explore the landscape. To do so we need a normalized data model to query, and methods of capturing the data into the model or schema, both of which are easily within reach.

First, it is important to realize how many unique result sets there are, and how these are related to the ten thousand four digit "years"....
Attached Images
File Type: gif newyear.gif (20.4 KB, 11 views)
Attached Files
File Type: txt years_v1.1.0.tar.gz.txt (16.2 KB, 2 views)
Moderator
Views 1732 Comments 2 astrogeek is offline

  



All times are GMT -5. The time now is 11:33 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