-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
PL/I or PL1 Grammars #1752
Comments
Thanks for labeling. |
https://www.cs.vu.nl/grammarware/browsable/os-pli-v2r3/ This document might be useful |
@KvanTTT @studentmain This Grammar is created in 90's and seems Based on EBNF. |
I've start to port the grammar from the link here https://github.com/teverett/grammars-v4/tree/pl1 PR's are welcome |
@teverett |
@Heidernlee it's hardly in a testable state yet. Lots of work to do before it can even parse "Hello World". |
Since PL/1 was the first compiler I worked on out of school, at Intermetrics, 35 years ago, I decided as an exercise today to see if I can use my VS extension for Antlr to import the grammar from http://pl1gcc.sourceforge.net/ then use the transforms to fix the grammar (i.e., remove indirect left recursion, convert string literals for keywords to a sequence of upper and lower case letters). It had some problems, which I'm correcting, but it mostly worked. I now have a parser for PL/1 here: https://github.com/kaby76/AntlrExamples/tree/master/pl1. The grammar at https://www.cs.vu.nl/grammarware/browsable/os-pli-v2r3/ is not in a machine-readable form, and has a warning saying "This grammar is not yet corrected nor completed". For example, it doesn't include lexical considerations, like case and abbreviations for keywords. Further, there's supposed to be a preprocessor for PL/1, which the GNU FE for PL/1 implements. But, it works for several PL/1 files. There's an LSP server for PL/1 for VSCode, but the git repo for it is complete vaporware--no parser--a la IBM. |
Anyone can provide a PL/1 Grammar?
PL/0 seems doesn't work with PL/1.
The text was updated successfully, but these errors were encountered: