LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Blogs > astrogeek
User Name
Password

Notices


Tutorials and Templates A collection of tutorials and templates of my own making.
Old

New Year Puzzle

Posted 01-04-2019 at 08:43 PM by astrogeek
Updated 01-06-2019 at 01:08 AM by astrogeek

NOTE: See updates at bottom of this post - last 1/5/19

Way back around new year's day during the winter of '19 (remember that kiddies?), LQ member Beryllos posted a New Year Puzzle and programming challenge in the Programming forum.

The goal of the puzzle is to generate as many whole numbers as possible between 0 and 100 using only the digits of the year, 2,0,1 and 9 in simple constant arithmetic expressions such as 9 * (10 - 2).

The rules are simple,...
Moderator
Views 123 Comments 0 astrogeek is offline
Old

A Simple Flex/Bison Project Template

Posted 08-19-2017 at 04:18 AM by astrogeek
Updated 08-19-2017 at 04:46 AM by astrogeek (typos)

For most of the past year I have encouraged others to make use of their LQ blog space as a place to post and manage code for their personal projects and interests which they wish to share with others.

Posting to our LQ blog space allows us to share our code and ideas without the posting constraints that apply within the question oriented fora, and also allows us to update, alter and extend that information over time without corrupting the logical development, or train of thought so...
Moderator
Views 98 Comments 0 astrogeek is offline
Old

Flex / Bison Project Template README

Posted 08-19-2017 at 04:17 AM by astrogeek

Flex / Bison Project Template README file.

This file provides a description of the source files and of the major features and purpose of the template project.

Code:
Flex/Bison project skeleton template

This set of files consists of:

README - This file

Makefile        Simple makefile for building project files
                Defines multiple targets, see file for details

fbproject.l     Flex scanner
...
Moderator
Views 40 Comments 0 astrogeek is offline
Old

Parser: Simple Bison Template

Posted 08-19-2017 at 04:17 AM by astrogeek

Flex / Bison Project Template, Bison parser source.

Save this source to a file named fbproject.y in the same directory with other project files.

This file defines a Bison parser which along with the Flex lexer source and Makefile will allow you to quickly build a working project template with the essential features required by many projects, as described in the project README file.

Code:
%code top {
/* Flex/Bison Tutorial Skeleton Parser
   Robert
...
Moderator
Views 53 Comments 0 astrogeek is offline
Old

Lexer: Simple Flex Template

Posted 08-19-2017 at 04:16 AM by astrogeek

Flex / Bison Project Template, Flex lexer source file.

Save this source to a file named fbproject.l in the same directory as other project template files.

This file defines a Flex based lexer which along with the Bison parser source and Makefile will allow you to quickly build a working project template with the essential features required by many projects, as described in the project README file.

Code:
%{
/* Flex/Bison tutorial skeleton lexer definitions
...
Moderator
Views 38 Comments 0 astrogeek is offline

  



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