Git Product home page Git Product logo

bravesoftdz / oz-cocor-delphi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marat1961/oz-cocor-delphi

0.0 0.0 0.0 180 KB

Coco/R is a compiler generator, which takes an attributed grammar of a source language and generates a scanner and a parser for this language. The scanner works as a deterministic finite automaton. The parser uses recursive descent. LL(1) conflicts can be resolved by a multi-symbol lookahead or by semantic checks. Thus the class of accepted grammars is LL(k) for an arbitrary k.

License: GNU General Public License v3.0

Pascal 100.00%

oz-cocor-delphi's Introduction

Oz Coco/R

Coco/R is a compiler generator, which takes an attributed grammar of a source language and generates a scanner and a parser for this language. The scanner works as a deterministic finite automaton. The parser uses recursive descent. LL(1) conflicts can be resolved by a multi-symbol lookahead or by semantic checks. Thus the class of accepted grammars is LL(k) for an arbitrary k.

Why this project appeared

I've been using the turbo pascal version of Coco / R for a long time. Sometimes it was necessary to change the code. If the sources changed, I recompiled it. But after some Windows update, I found that Turbo Pascal go to a better place and stopped running. In general, I think many people's languages from Niklaus Emil Wirth cause dislike.

In general, I believe that there are few such people who have made a comparable contribution to the development of programming and computer science languages.

It is easy to find a complex and often incomprehensible solution to a problem. It is difficult to make a simple, clean and understandable solution.

When you see such a decision, it becomes clear that this is the work of the Master with a capital letter. First, I ported the code from Turbo Pascal. But I discovered that in almost 20 years a lot of water has flowed under the bridge and the COCO/R code has also been improved well.

The last version I found was C ++, C #, Java. Then I decided to port the code and chose C #. In spirit, this is the language closest to Delphi, probably due to the fact that they have one chief architect.

  1. The most important improvements in my opinion are the support for LL (k) grammar.
  2. The utf-8 support is also very useful.
  3. Great attention is paid to the good quality of the generated code.
  4. Also attention was paid to the separate CocoLib unit. I developed this library when I was using the Turbo Pascal version. I usually always include it unchanged in my projects. using Coco / r.

You can see an example of use in the protobuf-delphi project.

oz-cocor-delphi's People

Contributors

marat1961 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.