8000 Non-standard CAL features · Issue #42 · orcc/orcc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ < 8000 strong itemprop="name" class="mr-2 flex-self-stretch"> orcc Public

Non-standard CAL features #42

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

Open
ekeroid opened this issue Mar 20, 2013 · 6 comments
Open

Non-standard CAL features #42

ekeroid opened this issue Mar 20, 2013 · 6 comments

Comments

@ekeroid
Copy link
Member
ekeroid commented Mar 20, 2013

Hi All,

I am looking into compiling the ORC-Apps with an alternative tool chain and run into a number of issues related to use of non standard functions and/or syntax (or maybe some has become standard and I am just out of sync).

i) The use of the built-in function println is causing incompatibilities. I seem to remember a standardization effort to address printing, so maybe you can show me how it shall look. I am sure at least that it is not part of the language, as it seems to be in ORCC.
I propose that you move println() to the system project.

ii) Array declarations using C-style notation is commonly used. Is that standardized yet? If not, I would propose a slightly modified syntax placing the brackets with the type, and not with variable, i.e. like

int[a][3] X;

The syntax for variable declarations in CAL is " ", and as far as I am concerned the array dimensions are part of the type.

iii) The keyword 'elsif' is introduced to address the ugly problem with nested 'if'-loops. I think this is something that needs fixing, but maybe not this way.What is the status with this in the RVC standard. If not done yet, I propose we bring this up for discussion.

[edit] Next 2 points have been fixed in 73e953b
iv) ORCC do not require variables to be declared in the 'var' section of functions, procedures, action etc. and instead allow declarations in the beginning of the body.

v) Semicolon for separation of declarations is allowed in ORCC. I think this is welcome addition, but needs to be added to the standard. The semicolon following the last declaration should be optional. I believe this is connected to #iv)

vi) The type "String" is with capital letters. All other basic types are with lower case and I believe string should be as well. Is this standardized?

Cheers,
Johan

@hyviquel
Copy link
Contributor

Hi Johan,

i) True, the print should be a standard native function... The tricky part is to handle the concatenation such as println("dd" + res), it's probably related to a better support of the string type/operation.
ii) Personnaly, I like the current syntax and I'm not really fond of changing all applications due to a new one... @mraulet I'm not sure about the standardization state of this.
iii) Same idea, is there really an interest to change again if it solves the problem ?
iv) This is a bug that has to be fixed ;)
v,vi) Why not... I've never seen any String declaration in the applications :)

And, of course, contributions are always welcome !

Regards,
Hervé

@ekeroid
Copy link
Member Author
ekeroid commented Mar 20, 2013

Hi Hervé, All,

i) True, the print should be a standard native function... The tricky part is to handle the concatenation such as println("dd" + res), it's probably related to a better support of the string type/operation.

To support string concatenation is one possible solution. However I am weary of introducing a Java style string concatenation we int, floats etc is magically converted to string values. I think we should start with just "string" + "string", and introduce some helper function "int2str" etc.
ii) Personnaly, I like the current and I'm not really fond of changing all applications due to a new syntax... @mraulet I'm not sure about the standardization state of this.
iii) Same idea, is there really an interest to change again if it solves the problem ?

Well, I think we all should be interested if there is a better way. And in any situation applications that are using non standard features are of course in danger of having to be modified. You are the guys driving the standard so I assume you value standard compliance.
iv) This is a bug that has to be fixed ;)
v,vi) Why not... I've never seen any String declaration in the applications :)

And, of course, contributions are always welcome !

Great, should I fix the grammar right away?

Cheers,
J

@hyviquel
Copy link
Contributor

Hahaha, it's great to see your motivation... Be free to make your own branch, we have to wait two things before merging it to the master :

  • The reaction of other people (At least, the one of @mraulet )
  • We plan to do a release today, It would be preferable to keep the FE in its current state for this one

alorence referenced this issue Apr 5, 2013
In function / procedure / action, CAL standard specify that variables must be declared in a specific 'var' block.
@alorence
Copy link
Contributor
alorence commented Apr 5, 2013

iv) has been fixed in 6d68080, but only in a branch for now. This better implementation of CAL standard introduces a lot of errors across all projects in https://github.com/orcc/orc-apps repository. These errors need to be fixed before merging this branch to master.

@mraulet
Copy link
Member
mraulet commented Apr 6, 2013

I) print is not part of the standard. So what you propose might be the best solution
We like the java like print. It works well for us.

Ii) it is already c style array declaration in the standard. This involves to change 3 different standards.

Iii) this can be a contribution to MPEG. But at the moment we might have to change the applications according to the syntax allowed in the standard.

Iv) grammar fixed. Works need to be done on applications.

Vi) I have to check he standard. Don t remember the exact syntax

@alorence
Copy link
Contributor

6d68080 has been merged to master (see 73e953b), so iv) & v) are now fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
0