Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of the Component Pascal language #1198

Merged
merged 7 commits into from Jun 4, 2014

Conversation

@ilovb
Copy link
Contributor

commented May 16, 2014

It adds support for the Component Pascal language
http://en.wikipedia.org/wiki/Component_Pascal

Not tested.

@pchaigno

This comment has been minimized.

Copy link
Collaborator

commented May 16, 2014

We try to only add languages once they have some usage on GitHub, so please note in-the-wild usage examples in your pull request.

Could you point to some examples on GitHub?

@pchaigno

This comment has been minimized.

Copy link
Collaborator

commented May 16, 2014

The Travis build is failing because there isn't a Component Pascal lexer in Pygments (the highlighter).
You should set lexer: to Text only or to Delphi if the syntax is similar to that of Pascal.

@ilovb

This comment has been minimized.

Copy link
Contributor Author

commented May 16, 2014

Thanks for your help

@pchaigno

This comment has been minimized.

Copy link
Collaborator

commented May 16, 2014

You're welcome ;)
You should also add a sample file in samples/Component Pascal for each extension.

@ilovb

This comment has been minimized.

Copy link
Contributor Author

commented May 16, 2014

OK

@ilovb

This comment has been minimized.

Copy link
Contributor Author

commented May 16, 2014

How about this? https://github.com/Spirit-of-Oberon/linguist/commit/8e6efc3a7de95bb6807393b42713aa2ff28c0d29
This is a binary format. But I would like to have it recognized as Component pascal

Here is an example:
https://github.com/oberoncore/bb16-oberoncore/tree/master/Std/Docu

@pchaigno

This comment has been minimized.

Copy link
Collaborator

commented May 16, 2014

I don't think that it's possible.
Why do you want that? If it's a generated file there must be a source file corresponding, no?

@ilovb

This comment has been minimized.

Copy link
Contributor Author

commented May 16, 2014

No. This is the native format of sources and documents in BlackBox http://www.oberon.ch/blackbox.html

@ilovb

This comment has been minimized.

Copy link
Contributor Author

commented May 16, 2014

@dmitrys99

This comment has been minimized.

Copy link

commented May 17, 2014

Why do you want that? If it's a generated file there must be a source file corresponding, no?

Let me clarify a bit.

This system (BlackBox) uses binary file format to store sources. It uses rich document file format, which can store different type of information (it can vary from simple text formatting to complicated fully functioning graphical editor) inside source code. This document format is similar to OLE by design.

But at higher level it is still source code which can be compiled and executed.

There is a library https://github.com/gertvv/odcread, which can convert binary format ODC into plain text. We also have several tools for working with BB code as a text, like LightBox, mentioned earlier.

That is why we want improve library and make it work with BlackBox files.

BlackBox is not so popular in the wild as other compilers, but we have small and strong (and growing) community. The largest code storage at the moment is http://zinnamturm.eu/index.htm, also we have several independent source repositories (here at GitHub, like mine https://github.com/dmitrys99/BBAGG, and at other places) and having GitHub know how to understand BlackBox files will be great help to our community.

@romiras

This comment has been minimized.

Copy link

commented May 17, 2014

Oberon language is closer to Modula-2 than Delphi/Pascal, thus Modula2Lexer can be a starting point for writing Oberon2/Component Pascal lexer.

@pchaigno

This comment has been minimized.

Copy link
Collaborator

commented May 17, 2014

At the moment, linguist ignores binary files.
I don't think it would be a good idea to change this because:

  • In any case, binary files won't be highlighted and it's the main purpose of linguist (detect language for Pygments to highlight).
  • The statistics are currently computed by counting the number of lines of each file of each language. It wouldn't make any sense for binary files.
@ilovb

This comment has been minimized.

Copy link
Contributor Author

commented May 17, 2014

Well. Then we will do without odc :)

@arfon

This comment has been minimized.

Copy link
Contributor

commented Jun 4, 2014

At the moment, linguist ignores binary files.

Thanks for giving the background @pchaigno here.

arfon added a commit that referenced this pull request Jun 4, 2014
Support of the Component Pascal language
@arfon arfon merged commit 491700f into github:master Jun 4, 2014
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
@brianmario brianmario referenced this pull request Jun 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.