Skip to content

Create a simple tool that will Syntax Highlight /etc/host file.

License

Notifications You must be signed in to change notification settings

SDGophers/2018-02-SyntaxHighlight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2018-02-SyntaxHighlight

Create a simple tool that will Syntax Highlight /etc/host file.

Now that you have had a quick introduction to Pigeon.

Today's challenge will be to take the parser for /etc/hosts file that was given presented, to create a syntax highlighting cat program for /etc/hosts files.

You can use the https://godoc.org/github.com/fatih/color to get ANSI color support.

Challenge 2.

Now create a syntax highlighting cat program for the /etc/resolv.conf

Challenge 3.

Create a syntax highlighing cat program for simple SQL files. These SQL will be limited to the following clauses:

  • SELECT
  • UPDATE
  • JOIN
  • WHERE
  • FROM
  • LIMIT

It should support the folowing SQLS:

SELECT * FROM EMPLOYEE_TBL;

SELECT EMP_ID as EMP 
FROM EMPLOYEE_TBL;
SELECT EMP_ID, LAST_NAME
FROM EMPLOYEE_TBL
WHERE EMP_ID = '333333333';
SELECT EMP_ID, LAST_NAME
FROM EMPLOYEE_TBL
WHERE CITY = 'INDIANAPOLIS'
ORDER BY EMP_ID;
SELECT COUNT(*)
FROM TABLE_NAME;
select prod_desc,
    prod_desc product
from products_tbl;
select prod_desc,
    prod_desc as product
from products_tbl;
select prod_desc,
    prod_desc "as"
from products_tbl;
select prod_desc,
    prod_desc as "as"
from products_tbl;

About

Create a simple tool that will Syntax Highlight /etc/host file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages