Skip to content

Instantly share code, notes, and snippets.

View TrigonaMinima's full-sized avatar

Shivam Rana TrigonaMinima

View GitHub Profile
@TrigonaMinima
TrigonaMinima / Lex.md
Last active September 24, 2015 20:29
A description about Lex

Introduction

Lex is a computer program that generates lexical analyzers ("scanners" or "lexers"). Lex reads an input stream specifying the lexical analyzer and outputs source code implementing the lexer in the C programming language. Lex turns the user's expressions and actions (called source here) into the host general-purpose language; the generated program is named yylex. The yylex program will recognize expressions in a stream (called input in this memo) and perform the specified actions for each expression as it is detected. See Figure 1.

                 +-------+
      Source ->  |  Lex  |  -> yylex
                 +-------+

                +-------+

Input -> | yylex | -> Output

#include <GL/glut.h> // GLUT, include glu.h and gl.h
// #include <windows.h>
// Global variable
GLfloat angle = 0.0f; // Current rotational angle of the shapes
int refreshMills = 30; // refresh interval in milliseconds
/* Initialize OpenGL Graphics */
# chat server using multicast
# python fork of the original ruby implementation
# http://tx.pignata.com/2012/11/multicast-in-ruby-building-a-peer-to-peer-chat-system.html
# receiver.py
# usage : $ python receiver.py # wait for messages to come in
import socket
import struct
multicast_addr = '224.0.0.1'

NOTIFICATIONS

New_Idea (idea in a tag, new idea by a user)

  • source: tag, user
  • action: new_idea
  • sub: tag, user
  • string = "%s was added under %s.", idea, source
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.out
*.pyc