Git Product home page Git Product logo

grl's Introduction

GRL

Program translating GRL (Graphs Representation Language) into dot, with lex and yacc. GRL is an artificial language made by me. Program was made as a Text Proccessing student's project.

Contents:

  • grl.l - lex tokenizer for GRL language
  • grl.y - yacc parser for GRL language
  • grlEx - example graph wrriten in GRL
  • Makefile - Makefile that builds lexer & parser, and then translates grlEx into dot and prints graph in ps format. To run it you need to have Lex, Yacc and dot installed on your machine.

GRL Documentation

  • Each line ends with a ';'.
  • Comments starts with '#':
# An example comment
  • To start a new graph:
BEGIN_GRAPH "GraphName";
  • To start a new driected graph:
BEGIN_DIGRAPH "GraphName";

Graph name is optional.

  • To draw a new node:
NODE 1 "Node label";

Node label is optional.

  • To draw a new edge:
EDGE 1--3 "Edge label";  #Non directed edge
EDGE 1->3;               #Directed edge

Edge label is optional.

  • To add an egde with a custom style:
EDGE 1->3 STYLE="dotted";
  • To end a graph:
END_GRAPH;
  • To set a node shape or style:
NODE 5 "Extra 2" STYLE="filled" SHAPE="star";

All flags are optional.

  • To set a default node shape:
DEFAULT_SHAPE "circle";
  • To set a default node style:
DEFAULT_STYLE "dotted";

Graph build from grlEx code:
Graph image

grl's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.