pl1gcc-development Mailing List for PL/I front-end for GCC (Page 3)
Status: Alpha
Brought to you by:
gccpl1dude
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(3) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(33) |
Dec
|
2006 |
Jan
(114) |
Feb
(17) |
Mar
(4) |
Apr
|
May
(1) |
Jun
(2) |
Jul
(7) |
Aug
(11) |
Sep
(10) |
Oct
(19) |
Nov
(7) |
Dec
(4) |
2007 |
Jan
(7) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(2) |
Aug
(3) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(1) |
2008 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
(4) |
Jun
(7) |
Jul
(20) |
Aug
(6) |
Sep
(1) |
Oct
(3) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
(11) |
Jul
(35) |
Aug
|
Sep
(1) |
Oct
(7) |
Nov
(6) |
Dec
(3) |
2010 |
Jan
(4) |
Feb
(3) |
Mar
(17) |
Apr
|
May
|
Jun
(2) |
Jul
(7) |
Aug
(14) |
Sep
(13) |
Oct
(2) |
Nov
|
Dec
|
2011 |
Jan
(3) |
Feb
|
Mar
(3) |
Apr
|
May
(1) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
(2) |
Nov
|
Dec
(1) |
2012 |
Jan
(1) |
Feb
(1) |
Mar
(1) |
Apr
(2) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(4) |
Aug
(3) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: <hen...@ba...> - 2006-12-06 21:06:31
|
There are a number of interesting tasks related to the pl1gcc project, where any help would be greatly appreciated. a) Error regression infrastructure b) Error message codes c) Case insensitive include name expansion d) Test cases e) Web pages f) Language reference manual g) User guide h) Tutorial to PL/I i) Frequently asked questions j) Internals of pl1gcc Any code you contribute must be either in the public domain or available using GPLv2 (GNU General Public License version 2), and any text using GNU Free Documentation License. If any of these tasks could have your interest please get involved. See the pl1gcc.sourceforge.net/tasks for more details. Send me your sourceforge userid and an indication of which tasks you would find interesting, and I will add your userid to the pl1gcc project. To register use https://sourceforge.net/account/newuser_emailverify.php Details to the tasks: a) Error regression infrastructure Problem is that only positive tests are in CVS. But just as important is to ensure that all the semantic checks are working. For example: dcl a fixed float; is a sample of code that should be valid. Create samples that exercise all possible error messages. b) Error message codes Each error message should have unique number defined. For each number, a detailed explanation can be found in a manual. c) Case insensitive include name expansion This is mainly to ease migration from a mainframe environment. d) Test cases The more the better. Especially tests that really exercises all the corners of what is possible with PL/I, even if it doesn't make sense. For example dcl (if,then) fixed; if if then then=1; But also keywords used in a different context, for example conditionnames as procedurenames etc. Basically something worse than http://www.multicians.org/proc-proc.html e) Web pages As the user base grows, change the webpages to a more interactive nature, with polls, upload of source code etc. For example use the GeekLog tool ... f) Language reference manual Yes exactly that. Make it better than the current outdated one: http://pl1gcc.sourceforge.net/pl1gcc-doc/doc.html Also document enhancement to the PL/I standard. For example dcl (a,b(2))(3) fixed; This is equivalent to dcl (a(3), b(2,3)) fixed; Use the ebnf2eps tool to generate the syntax diagrams. g) User guide Installation guide. h) Tutorial to PL/I Spread the word how easy it is to work with PL/I i) Frequently asked questions There should already now be quite a few questions by now. j) Internals of pl1gcc Document in details how the internal of pl1gcc works. This should be reference material for anybody working on the compiler itself. looking forward to hear from you Henrik pl1gcc.sourceforge.net Mailing list https://sourceforge.net/mailarchive/forum.php?forum_id=41614 |
From: <hen...@ba...> - 2006-12-01 12:49:07
|
Now the dcltermoptionlist can be partly parsed, including correct handling of structures. 30-11-2006 * Fix implementation of checkStructureSubLevels. 29-11-2006 * In parseMisc.c, prepare the setAttribute functions for the merge function. * In parseDclOptionList.c, added new function set conditionally set the attributes of a struct DclOptionList: 27-11=2006 * First cut of function to merge a dcloption with a dcltermcommalist: * In pl1-parser.y, rule dclfactor, explicitly set $$=NULL, to ensure stack is correct initialised: * In pl1-parser.y, enhance %type * set dependencies correctly. * First cut of parsing of declare statement 22-11-2006 * Added files for struct DeclareElement and DeclareElementList 21-11-2006 * In pl1-parser.y, refactored the rules dclterm and dclnamebase * After refactoring the dclterm/dclnamebase, added two apparently * And looking at bit further, eliminate the dclnamebase completely: * refactoring the rule again, adding dclnamebase, but separating dclnamebase from dclterm: * Added type to rule dclfactor: * The refactoring of dcltermcommalist, dclterm, dclnamebase, has the effect on the stack type 20-11-2006 * Removed unused #defines, from parseMiscStructs.h: |
From: <hen...@ba...> - 2006-11-24 09:26:25
|
On Friday 24 November 2006 09:32, Banai Istvan wrote: > I'd like to subscribe to your mailing list. Excellent. Please use this link: https://lists.sourceforge.net/lists/listinfo/pl1gcc-development Henrik |
From: Banai I. <ic...@ga...> - 2006-11-24 08:33:15
|
I'd like to subscribe to your mailing list. =DCdv=F6zlettel: Banai Istvan ic...@ga... Programtervez=F5 Informatikus (BSc) |
From: <hen...@ba...> - 2006-11-17 20:23:10
|
it's been a while since last commit. Building of the parse tree for declare structures are processing. 16-11-2006 * in pl1-parser.y, changed rule dcloption to check the dcloptionlist uniontype: * in parserDclOptionList.c, added function: - extern void showStructDclOptionPgm(struct DclOptionPgm *dop) * in rule dclpgm, added setting of attributes - REDUCIBLE - IRREDUCIBLE 09-11-2006 * Moved REDUCIBLE from dclmisc to dclpgm. * Added new function to set boolean typed parameters int setBooleanAttribute(int *variable, int data); char *sprintBooleanAttribute(int *variable, int data); 03-11-2006 * Prepare for more declare attributes. - INTERNAL/EXTERNAL - PARAMETER * ensure rule dcloption inherit the allocated Struct DclOptionList 02-11-2006 * Looking at how the DECLARE statement is processed. - The name of a single variable, or structure member is parsed by the rule dclnamebase. - The type is parsed by the rule dclfactor, this means each dclfactor carries its own struct dcloptionlist. - To handle the structure enumeration, add counter and a reference to the parent dcl. - To handle array, add the list of dimensions to struct DclOptionList, but, this require some sort of parsing of an 'expr', also notice, that this allow for an extension to the PL/I language for free: dcl (a (2) fixed, i float)(3) binary; ==> a is now a(2,3) fixed binary and i(3) float binary ; - When a list of variables share the same attributes, just use the same pointer to the allocated struct DclOption. - How to do: dcl ( i fixed , j float, (m,n) ) decimal; here there will be three different instances of struct DclOptionList, one for 'fixed', 'float' and 'decimal' respectively. All three will be individually allocated via dclfactor. 01-11-2006 * parsing up procedure entries and their parameters and attributes. * Added parsing of RETURNS. - For now only support a single type to be returned. * Added new field to struct ProcGroupList struct DclOptionList *returnsList; * Added new method to parseProcGroupList.c int setProcGroupListReturnsList(struct ProcGroupList *pgl ,struct DclOptionList *dol); * In parseProcgroupList.c/showProcGroupList, added call to showStructDclOptionList. * Added new test program: PL1_TEST_PROCEDURE.pl1 31-10-2006 * Almost there, but this fails: DCL A COMPLEX FLOAT INIT(1+2.456i); * Problem is that the complex constants are implemented as a '+' expression and not as a constant. * Parser rules for numeric constants * Creating special rules for parsing of constants in inititem * Reverted the lot to the original implementation with on reduce/reduce conflict. Verified that bison does the expected shift and not reduce. Getting the INIT correct, in the sense that there are no conflicts, is taking too much time, and can be done later. * Now back to parsing the dcloptionlist. Currently only the dclnumeric is parsed. * In parseDclOptionList.c, added: void showStructDclOptionList(struct DclOptionList *dol); void showStructDclOptionNumeric(struct DclOptionNumeric *don); 30-10-2006 * rethink what an inititem is. (expr) number constant string constant/w.o. repition factor varname * <repetition> inititem * In pl1-parser.y, remove reduce/reduce conflict by changing inititem to * Added new files for parsing of declare options pl1/libpl1/include/parseDclOptionList.h pl1/libpl1/include/parseDclOptionListStructs.h pl1/libpl1/src/parseDclOptionList.c * In pl1/libpl1/src/parseMisc.c, added new function to set Integer values: * After change of initItem, this did work dcl (b,c) init(-1,+1); * In pl1-parser.y, added +- numeric constant * Almost there, but this fails: DCL A COMPLEX FLOAT INIT(1+2.456i); |
From: Tisha <Tis...@ro...> - 2006-11-10 16:42:19
|
Buy it now – and this night will be the best in your life Surely you only dream of it You certainly wish to eliminate your frustration and the frustration of your partner about your bed games duration. Use this tab regularly and you’ll have the best http://allkj.com/y/vm/ Girls will start spreading rumors about the duration they got with you. |
From: <hen...@ba...> - 2006-10-29 21:24:51
|
managed to remove some 200+ warnings when compiling from scratch. 29-10-2006 * Hunting warnings pl1-parser.y: * In ppVariable.c, change assignment of scannerContext->ppreturn->location, to a copy instead of pointer assignment: * In pl1-scanner.l, set correct location when preprocessor returns LIT_PREPROCESSOR_ERROR 27-10-2006 * In PLIParser.h, added the flex scanner to the PLI parser parms structure. * Hunting warnings libpl1/src/IncludeFileUtils.c * Hunting warnings libpl1/src/PLIMessage.c * Hunting warnings libpl1/src/SavedToken.c * Hunting warnings pl1-parser.y * Hunting warnings libpl1/src/TokenBasedLookahead.c * Hunting warnings libpl1/src/ppVariable.c * Hunting warnings libpl1/src/parseParserStack.c * Hunting warnings libpl1/src/parseProcGroupList.c * Hunting warnings libpl1/src/parseProcOptionList.c * Hunting warnings pl11.c * Hunting warnings pl1pp-parser.y * Hunting warnings pl1-scanner.l: * Hunting warnings pl1-parser.y: * Changed interface to yyerror * In pl1-scanner.l fix call to yyerror 26-10-2006 * Add location info to these messages: *** errors *** Name specified in a, is already defined at the same scope - ok this is better: *** errors *** Error at (Line,column from,to)(819,0-1) offset from-to[14075-14076[ : Name specified in a, is already defined at the same scope * In pl1-parser.y, adding location info to int setScope int setCompilerMessage * In setCompilerMessage use yyerror instead of addErrorMessage. * Makefile: fix broken dependcies to prevent files from built even without changes: |
From: <hen...@ba...> - 2006-10-26 18:26:25
|
Parsing of the PROCEDURE and ENTRY statements are progressing very well. Look in CHANGELOG for the all the glory details. 26-10-2006 * Add location info to these messages: *** errors *** Name specified in a, is already defined at the same scope - ok this is better: *** errors *** Error at (Line,column from,to)(819,0-1) offset from-to[14075-14076[ : Name specified in a, is already defined at the same scope * In pl1-parser.y, adding location info to int setScope int setCompilerMessage * In setCompilerMessage use yyerror instead of addErrorMessage. yyerror adds location information to the error message, where as addErrorMessage 'just' put the message to the error list of messages. * Makefile: some files are built even without changes: - adding debug option to make revealed that the @pl1/libpl1 always is being marked as not found, which is correct since it is only a pseudo target. 25-10-2006 * Added files to handle procedure OPTIONS: libpl1/include/parseOptionList.h libpl1/include/parseOptionListStructs.h libpl1/src/parseOptionList.c - Note the 'calling convention', the stack element before a procoption _must_ be of type struct ProcOptionList, otherwise the $0 reference in parser rule procoptionlist, will fail. specific parts of the grammar. * Add check that options(MAIN), is only when the parent scope is ROOT As poormans check just add one extra check within the parser rule. * parsing ENTRY statement: Reusing the ProcGroupList structure. * After adding a number of consistency checks, the test cases doesnot compile anymore. Which is reasonable enough since they are not really PL/I, they are just testing various statements, and are mostly without any main procedure. * Ok found the problem, had to remember scopeName is really a struct ListOfNames and not a char *. 24-10-2006 * Added new function, temporary to parseProcGroupList.c: sprintTristateAttribute * Fixed the wrong setting of parserStackType: - because the type of the token PROCEDURE is <s>, and the value is the string "proc" or "procedure", depending on the input itself. When PROCEDURE is used in an action, then it refers to the int-token number returned by flex. * Added chargraphic, order, recursive to struct ProcGroupList: * Created new files: libpl1/src/parseMisc.c libpl1/include/parseMisc.h * print nice error message when syntax error occurs, by invoking yyerror and YYERROR 23-10-2006 * thinking about the parser setting attributes in a structure: REDUCIBLE { if(setTristateAttribute(&$<pgl>0->reducible,1)<0) YYERROR; } IRREDUCIBLE { if(setTristateAttribute(&$<pgl>0->reducible,0)<0) YYERROR; } - this has a good feel to it. Now if errors happens, then we are the the right place and bison can procude a syntax error, and there is no need for a big switch statement inside the ProcGroupList.c code, remember to set the $0 stack element: * Added setTristateAttribute function Henrik |
From: <hen...@ba...> - 2006-10-22 19:22:31
|
22-10-2006 * In IncludeFileUtils.c, fix check if suffix is set: * Allow qoutes in filenames of %INCLUDE * in pl1-parser.y, added ENVIRONMENT option to OPEN statement: * in pl1-parser.y, allow number to follow environment option F * in pl1-scaner.l, allow BUFF as abbrev for BUFFERS * In pl1-scanner.l, added tilde (~) as NOT sign as well. |
From: <hen...@ba...> - 2006-10-19 18:54:25
|
Started the 0.0.14 series. The main topic for the 0.0.14 will be building a cross-reference table for procedures and their parameters. 19-10-2006 * Had some problems with exposing the translation of a token number into text after moving functions into its own module. To counter the problems, added a function to pl1-parser.y /* helper function to expose some of bisons internal function */ char *getTokenText(int token) { return yytname[yytranslate[token]]; } * Added the necessarz include dependencies to make file for the new modules. * Changed version string to 0.0.14, in pl1-parser/showWelcome(). 18-10-2006 * revisiting pl1-parser.y - The calling sequence for the maintenance of the parser stack is less than impressive. * New files to implement new and better way (tm): libpl1/include/parseParserStack.h libpl1/include/parseParserStackStructs.h libpl1/include/parseProcGroupList.h libpl1/include/parseProcGroupListStructs.h libpl1/include/parseMiscStructs.h libpl1/include/parseScopeNode.h libpl1/include/parseScopeNodeStructs.h libpl1/src/parseParserStack.c libpl1/src/parseProcGroupList.c libpl1/pl1/parseScopeNode.c * Moved code from pl1-parser.y into respective module. * Removed unnecessary global variable from pl1-parser.y: unsigned int scopeCount=0; * Changed interface of struct ScopeNode *endScope(...) * Added %token-table to pl1-parser.y 17-10-2006 * Analysing various approaches for populating a stack element with parsed data. 16-10-2006 * In pl1-parser.y, aligned rules, and renamed rule ProcGroupList to procgrouplist. |
From: <hen...@ba...> - 2006-10-10 19:52:47
|
Thanks for your interest in the PL/I frontend project. Please follow this link to be added to the mailing list. https://lists.sourceforge.net/lists/listinfo/pl1gcc-development On Tuesday 10 October 2006 21:24, Donald L. Dobbs wrote: > Not too familiar with GCC. When the PL1GCC is complete what operating > systems will it run on? Windows? Linux? The target is anywhere GCC runs, so yes Windows and Linux is a possibility. Maybe even z/OS :-) > > -- Don Henrik |
From: Donald L. D. <dd...@co...> - 2006-10-10 19:18:49
|
Not too familiar with GCC. When the PL1GCC is complete what operating = systems will it run on? Windows? Linux? -- Don |
From: <hen...@ba...> - 2006-10-10 19:00:29
|
Bonjour, Thanks for your interest in the PL/I frontend project. On Tuesday 10 October 2006 18:14, Pierre Scotto wrote: > compiler and exec from PL1GCCL/I run under Windows/XP ? You can install pl1gcc under CygWin. (www.cygwin.com) Please note, that currently there is no code generation taking place. > sincerely > Pierre Scotto Henrik |
From: <hen...@ba...> - 2006-10-10 18:42:54
|
October 2006 This is the thirteenth code drop of the GCC front-end for the PL/I programming language. PL/I for GCC is released under the terms of the GNU Public License; version 2. Main new feature in pl1gcc-0.0.13 is the preprocessor %GOTO statement. There is still no code generation taking place, so don't run out and uninstall your production PL/I compiler just yet :-) Changes in v0.0.13 * improved internal documentation * many improved diagnostic messages Changed syntax in v0.0.13 * added %GOTO label * added %ACTIVATE variable * added %DEACTIVATE variable * added %NOTE ( level , message ) For a complete list of changes check the CHANGELOG file. What is pl1gcc? The pl1gcc project is an attempt to create a native PL/I compiler using the GNU Compiler Collection. The project is looking for more people to join the development and testing. If you want to help speed up the development of a free PL/I compiler please do contact us and join the fun, or consider making a donation using the sourceforge donation system[*]. That way you can support both the pl1gcc project and also sourceforge and a number of other open source projects. For more information, comments, feedback and download, please visit http://pl1gcc.sourceforge.net Finally, remember to have some fun. The GCC PL/I Team. Web links mentioned: http://pl1gcc.sourceforge.net [*] http://sourceforge.net/donate/index.php?group_id=49916 |
From: Pierre S. <psd...@wa...> - 2006-10-10 16:15:03
|
=20 compiler and exec from PL1GCCL/I run under Windows/XP ? =20 sincerely =20 =20 Pierre Scotto =20 Email : <mailto:psd...@wa...> psd...@wa... =20 =20 Ce message ainsi que les pi=E8ces jointes, sont exclusivement transmis = =E0 l'usage de leur destinataire. Leur contenu est strictement confidentiel. = Une quelconque copie, retransmission, diffusion ou autre usage, ainsi que = toute utilisation par des personnes physiques ou morales ou entit=E9s autres = que le destinataire sont formellement interdits.=20 Si vous recevez ce message par erreur, merci de le d=E9truire et d'en = avertir imm=E9diatement l'exp=E9diteur. This electronic message and attachment are transmitted for the exclusive = use of their address. Their content is strictly confidential. Any copy, forward, release or any other use, is prohibited, as well as any use by = any unauthorized individual or legal entity. Should you receive this message by mistake, please delete it and notify = the sender at once.=20 =20 |
From: <hen...@ba...> - 2006-10-09 21:03:20
|
getting much closer to 0.0.13 09-10-2006 * Continue to enhance comments in ppVariable.c * Created new file NOTES, and copied content README file. * Reduced the README file to a simple instruction. * Moved Announce-0.0.12 to archive folder. * Finished pl1www/WebFiles/pl1gcc-0.0.13.index.html 05-10-2006 * Enhance comments for functions in ppVariable.c * Remove unused function ppRemoveLabels: * Remove unused function removeDCLElement: * Started pl1www/WebFiles/pl1gcc-0.0.13.index.html 04-10-2006 * When overwriting the location of a label, check that the offset is really different before adding warning message * Announce-0.0.13 * Moved ppAnalyseStmt - from pl1-scanner.l - to ppVariable.c * In ppVariable.c, remove include of ppVariable.h * In pl1-scanner.l, removed external entry definitions, - and add prober #include "ppVariable.h" * In pl1-scanner.l, use NULL for location information when calling ppGetValueAsString. |
From: <hen...@ba...> - 2006-10-04 02:43:32
|
almost ready for 0.0.13. %GOTO now works for both forward and backward references. 03-10-2006 * In ppVariable.c/ppPushDCLLabelStack, remove allocation of dummy name * in ppVariable.c/ppDefineLabel, ensure the new name is added to end of list * Allow preprocessor labels that are met during discard processing to be registered. This will allow the ping-pong-pang sample to complete. %goto ping ; %pong: goto pang; %ping: goto pong; %pang:; 02-10-2006 * working on defining label during preprocessor discard processing. * change calling convention for ppAnalyseStmt |
From: <hen...@ba...> - 2006-09-30 18:46:22
|
14-09-2006 * Enhanced error handling in pl1-scanner.l - If fseek fails, add error message, and swith to scanner state _MUST_TERMINATE_ - Anywhere the error(...) function is invoked, swith to scanner state _MUST_TERMINATE_ * Added description of function ppAnalyzeStmt. 13-09-2006 * Added new function to be used when looking for a preprocessor label, during the discard processing. The function is currently located in pl1-scanner.l, but should be in a file of each own, like much of the other cruft in the scannner. int ppAnalyzeStmt(char *labelName, struct savedtokenlist *head , struct savedtokenlist *pctStartToken, int *soutPctPos ) returns 0: statement is not a preprocessor label statement 1: statement is a preprocessor labelstatement and the label matches (tbd) 2: statement is a pp labelstatement but the label dont match * check the target location of the label is within the current file - Ok Checked it: with the label stack it is not a problem anymore, since the lookup for the label name will only see the labels defined within the current file. Problem solved:-) |
From: <hen...@ba...> - 2006-09-12 19:32:06
|
More %GOTO work, and in the process added the following preprocessor statements: %NOTE %ACTIVATE %DEACTIVATE 12-09-2006 * Changed returntype of ppPushDCLLabelStack, ppPopDCLLabelStack * Each active include file, now has its own set of labels. * Utilize the push/pop of labels. * Add %ACTIVATE, %DEACTIVATE of variable names. 11-09-2006 * Added %NOTE to preprocessor statements * When <<EOF>> is met, then discard all the LABEL entries in the preprocessor declare structure. 07-09-2006 * Renamed functions to handle preprocessor labels: * Simplyfied scanner rule for ':', removed unnecessary if statements: 29-08-2006 * Created new structure to hold the list of labels within the current active file. This is implemented as a LIFO stack. 28-08-2006 * Added new test case with preprocessor keywords as variable names * Preprocessor keywords as variable names * Added rule in pl1-parser.y, to allow programs without any statements * In pl1-scanner.l, keep track of the token position of the last met '%' when looking for the preprocessor label. |
From: <hen...@ba...> - 2006-08-24 18:21:39
|
A first cut of %GOTO is now implemented. Still missing is endless loop detection, and some minor clean ups. 24-08-2006 * In pl1pp-parser.y, change the location information stored together with a label, to the positon of the '%', because this is the location an evt. %GOTO has to reposition to. * % GOTO - use the lookahead feature of pl1-scanner.l to keep scanning until %<label>: is met. - also keep in mind that we somehow have to scan until end of a preprocessor procedure or end of %DO-%END block, even for the branch of an %IF statement.. * Preprocessor labels * Add %GOTO to scanner, before releasing 0.0.1x * For now disallow %GO TO LABEL ... - has to be implemented when pp vars can be keywords. * For now only allow forward %GOTO - without any %IF, backwards goto will probably not be useful. - also develop a infinite %goto loop-detection could be partly implemented by checking if any preprocessor variables has been changed since previous %goto was met. * Idea, enable look ahead, and at each ';', check if the preprocessor label has been met. Note, when the label is met, then the preprocessor has to be invoked, because the preprocessor label by nature is a preprocessor statement. This will require the % statements has to be completely tokenized. Check consequences and impacts of the the combinations of the scanner state variables ppGatherTokens lookahead also check how the ppSaveTokenList is filled and freed by pl1-scanner.l * Step wise implementation 1) check if only goto empty statement: %label:; should be implemented... because when ppGatherTokens is active, than all non kw is set to VARNAME by the macro dupyy, so the statement would not work %label: dcl a fixed ; will be returned as tokens % VARNAME : DECLARE VARNAME FIXED ; hmm, seems to work anyway. But keep an eye on this until preprocessor kw can be used as variable names. 2) note the %GOTO itself does not return any tokes to the parser, so care must be taken that the return is not done. note2, the label has to be found within the same file. note3, no further preprocessing takes place until the END has been matched. 2.a) When the preprocessor returns LIT_PREPROCESSOR_GOTO_LABEL, - discard current tokenlist - store LABEL name to find in a variable - enable ppGatherTokens - when the next ';' is met check if the following sequence of tokens are met '%', LABEL, ':' - then check if the LABEL is part of the label list - then if the label is met, then invoke the pl1pp-parser - else discard the gathered token list, and keep ppGatherTokens active - and continue scanning. # checked that when subsequent % ... ; is met and when gathertokens is active, then the %stmt is simply added to the preprocessor tokenlist. This means that the control can be coded entirely within the semicolon rule. Only have to check when the ';' rule is started, whether ppGatherTokens is active and if the LABEL variable constains a value. 2.b) When the preprocessor returns LIT_PREPROCESSOR_GOTO_LOCATION - discard current token list - check that within the location information the file mathces the current active include file - then do a fseek for the start position of the location. - and reset the location tracking variables to correct values. - and invoke the flex macro YY_FLUSH_BUFFER, then a fseek(yyin...) - else give prober error message * From man fseek: int fseek(FILE *stream, long offset, int whence); The fseek() function sets the file position indi- cator for the stream pointed to by stream. The new position, measured in bytes, is obtained by adding offset bytes to the position specified by whence. If whence is set to SEEK_SET, SEEK_CUR, or SEEK_END, the offset is relative to the start of the file, the current position indicator, or end-of-file, respectively. A successful call to the fseek() function clears the end-of-file indi- cator for the stream and undoes any effects of the ungetc(3) function on the same stream. RETURN VALUE The rewind() function returns no value. Upon successful completion, fgetpos(), fseek(), fset- pos() return 0, and ftell() returns the current offset. Otherwise, -1 is returned and errno is set to indicate the error 23-08-2006 * In pl1-scanner.l rule for semicolon to look for the label contained in the variable ppScanForLabel: * Implemented %GOTO forwards 2.a) When the preprocessor returns LIT_PREPROCESSOR_GOTO_LABEL, - discard current tokenlist - store LABEL name to find in a variable - enable ppGatherTokens - when the next ';' is met check if the following sequence of tokens are met '%', LABEL, ':'; if the '%' is not the first token, then keep track of how many tokens need to be skipped. - then check if the LABEL is part of the label list - then if the label is met, then invoke the pl1pp-parser - else discard the gathered token list, and keep ppGatherTokens active - and continue scanning. # checked that when subsequent % ... ; is met and when gathertokens is active, then the %stmt is simply added to the preprocessor tokenlist. This means that the control can be coded entirely within the semicolon rule. Only have to check when the ';' rule is started, whether ppGatherTokens is active and if the LABEL variable constains a value. * Do not add the label name to the declared preprocessor variables when %GOTO is met. This will avoid an error message when the %LABEL : is found in the source. |
From: <hen...@ba...> - 2006-08-22 18:34:27
|
still working on %GOTO ... almost there 22-08-2006 * Rename structure Pl1ParserParms to PLIParserParms * define the YY_USER_INIT macro to ensure local scanner variables gets correctly initialsed. From info flex: The macro `YY_USER_INIT' may be defined to provide an action which is always executed before the first scan (and before the scanner's internal initializations are done). For example, it could be used to call a routine to read in a data table or open a logging file. * Add check in <<EOF>> rule in pl1-scanner.l if ppScanLabel is NULL or not NULL meaning looking for a preprocessor label and convert the debugLexer to addErrorMessage, since this the program is in error. 21-08-2006 * In libpl1/ppVariable.c/ppGetValueAsString, use pp_yyerror to write error messages - buf=sprintfString("error converting %i to string.\n",w->value.number); pp_yyerror(locp,0,buf); * Create new macro in pl1-scanner to reduce the check for the few special keywords that requires look ahed to be enabled. - specialKeyWord(a,b,c) - new code from pl1-scanner.l, almost 200 lines less code DCL|DECLARE { /* If we see a 'dcl' inside a preprocessor directory, the preprocessor will handle it. */ if(ppGatherTokens) { __dupyy(DECLARE); } else specialKeyWord(DECLARE,DECLARE,VARNAME); } DFT|DEFAULT specialKeyWord(DEFAULT,DEFAULT,VARNAME); ENTRY specialKeyWord(ENTRY,ENTRY,ENTRY); FORMAT specialKeyWord(FORMAT,FORMAT_STMT,FORMAT); OTHER(WISE)? specialKeyWord(OTHERWISE,OTHERWISE,VARNAME); PROC(EDURE)? specialKeyWord(PROCEDURE,PROCEDURE,VARNAME); SNAP specialKeyWord(SNAP,SNAP,VARNAME); * make rule for NUMFLOAT slightly more readable" |
From: <hen...@ba...> - 2006-08-16 19:49:44
|
currently working on %GOTO 16-08-2006 * In pl1-scanner.l/ppExpandToken, dont expand LABELs. 15-08-2006 * In ppVariableStructs.h, add location to ppDCLElement and namelistelement * Add location information to ppDefineVariable * bite the bullet, and add location everywhere extern int ppSetIntValue(char *name,int value,YYLTYPE *locp); extern int ppSetStringValue(char *name,char *value,YYLTYPE *locp); extern int ppDefineVariable(char *name,int type, YYLTYPE *llocp); extern int ppDefineVariableList(struct namelist *,int type); extern struct namelist *ppInitList(char *name, YYLTYPE *llocp); extern struct namelist *ppAddName(struct namelist *,char *name, YYLTYPE *llocp); extern int ppShowNameList(struct namelist *); extern int ppGetIntValue(char *name,YYLTYPE *locp) ; extern char * ppGetStringValue(char *name,YYLTYPE *locp); extern struct ppDCLelement * ppFindDCLName(char *name); extern struct ppDCLelement * ppFindDCLNameInList(struct ppDCLelement *head ,char *name); extern char * ppGetValueAsString(struct ppDCLelement *,YYLTYPE *locp) ; extern int ppSetGotoStmt(char *label, YYLTYPE *llocp) * create a ppSetIncludeFile, and remove code from pl1pp-parser.y - in ppVariable.c create new function ppSetIncludeStmt * in pl1pp-parser.y, change include statement rule: 14-08-2006 * Created CHANGELOG file * In ppVariableStructs.h, define preprocessore return types * In ppVariableStructs.h, define preprocessor variable label type: * Prepare for %GOTO - In pl1-scanner.l, check for preprocessor return types: LIT_PREPROCESSOR_GOTO_LABEL) /* skip until label is met ... */ LIT_PREPROCESSOR_GOTO_LOCATION) /* reposition scanner to a previous pos. */ |
From: <hen...@ba...> - 2006-08-09 19:51:24
|
August 2006 This is the twelfth code drop of the GCC front-end for the PL/I programming language. PL/I for GCC is released under the terms of the GNU Public License; version 2. This is mostly a technical release, with some visible user changes. Most notably, the compiler output will now show the compiler options, and a message indicating the number of successfully parsed statements, and further show syntax errors as well. There is still no code generation taking place, so don't run out and uninstall your production PL/I compiler just yet :-) Please inform us about any syntax errors that might occur so we can check if the error is in the pl1gcc parser, and not in your code. Summary of changes in v0.0.12: * Scanner and parser are now reentrant * Synchronized with gcc version 4.2-20060715 * Improved internal documentation of functions * Parsing of procedures and their parameters * Stop compiling at first error * Make compiler output more user friendly Changed syntax in v0.0.12 * Fixed error when %INCLUDE filename was not found * Ignoring hex character 0x1A (ctrl-z, EOF) * Accept but ignore the following preprocessor statements - %SKIP - %PAGE - %PRINT - %NOPRINT Changed semantic checks in v0.0.12: * Error message if procedure name is already defined * Error message if %INCLUDE cannot be resolved * Error message if an unknown character is met * Error messages by bison: Syntax error ... For a complete change-log look in the README file. What is pl1gcc? The pl1gcc project is an attempt to create a native PL/I compiler using the GNU Compiler Collection. The project is looking for more people to join the development and testing. If you want to help speed up the development of a free PL/I compiler please do contact us and join the fun, or consider making a donation using the sourceforge donation system [*]. That way you can support both the pl1gcc project and also sourceforge and a number of other open source projects. Looking ahead. If you know of a PL/I project that should be compilable by the pl1gcc compiler, please get in touch with us and we'll see if we can accommodate it. The code does not have to be covered by GPL. For more information, comments, feedback and download, please visit http://pl1gcc.sourceforge.net If you are interested in how the development is progressing, follow the discussions on the development mailing list: pl1gcc-development (-at-) lists.sourceforge.net Finally, remember to have some fun. The GCC PL/I Team. Web links mentioned: http://pl1gcc.sourceforge.net [*] http://sourceforge.net/donate/index.php?group_id=49916 |
From: <hen...@ba...> - 2006-08-08 19:53:23
|
getting closer to v0.0.12 08-08-2006 * In PLIMessage.c/showMessage, remove message counter * Updated INSTALL * Updated INSTALL.eclipse * Created new sub project: pl1www - Added pl1gcc-0.0.12.index.html to the folder WebContent - Added pl1gcc-0.0.11.index.html to the folder WebContent - Added pl1gcc-0.0.10.index.html to the folder WebContent - Added pl1gcc-0.0.9.index.html to the folder WebContent - Added pl1gcc-0.0.8.index.html to the folder WebContent - Added pl1gcc-0.0.7.index.html to the folder WebContent - Added pl1gcc-0.0.6.index.html to the folder WebContent - Added pl1gcc-0.0.5.index.html to the folder WebContent - Added pl1gcc-0.0.4.index.html to the folder WebContent - Added pl1gcc-0.0.3.index.html to the folder WebContent - Added pl1gcc-0.0.2.index.html to the folder WebContent - Added pl1gcc-0.0.1.index.html to the folder WebContent * created new folder WebFiles - Added gcc-4.2-20060415.tar.bz2 - Added gcc-core-3.5-20040704.tar.bz2 - Added gcc-core-4.0-20050220.tar.bz2 - Added pl1gcc-0.0.10.tar.bz2 - Added pl1gcc-0.0.11.tar.bz - Added pl1gcc-0.0.11.tar.gz - Added pl1gcc-0.0.9.tar.bz2 - Added tree-ssa-20040429.tar.bz2 - Added pl1gcc-0.0.1.zip - Added pl1gcc-0.0.10.zip - Added pl1gcc-0.0.11.zip - Added pl1gcc-0.0.2.zip - Added pl1gcc-0.0.3.zip - Added pl1gcc-0.0.4.zip - Added pl1gcc-0.0.5.zip - Added pl1gcc-0.0.6.zip - Added pl1gcc-0.0.7.zip - Added pl1gcc-0.0.8.zip - Added pl1gcc-0.0.9.zip |
From: <hen...@ba...> - 2006-08-07 12:09:43
|
here a delayed commit log ... 27-07-2006 * Update Announce-0.0.12 * Add content of environment variable PL1SYSLIB to showWelcome. buf = getenv("PL1SYSLIB"); printf("* \tPL1SYSLIB path\t%s\n",buf?buf:"variable not found"); * In pl1-scanner.l, ensure that PAGE is recognized as a pl1pp keyword. * In pl1-parser.y fixed spelling in showWelcome * In pl1-scanner.l, reset preprocessor return type if(ppCurrentContext->ppreturn) ppCurrentContext->ppreturn->type=-1; - to avoid: -accepting rule at line 984 ("%") scanner: enabling preprocessor scanning of tokens. allocate tokenlist pp scanner(Line,column from,to)(48,0-1) offset from-to[2981-2982[ Saving Token[1]:37 >%< --accepting rule at line 547 ("page") (Line,column from,to)(48,1-5) offset from-to[2982-2986[ Saving Token[2]:4361 >page< --accepting rule at line 856 (";") (Line,column from,to)(48,5-6) offset from-to[2986-2987[ Saving Token[3]:59 >;< pp scanner: number of collected tokens 3 (Line,column from,to)(48,0-1) offset from-to[2981-2982[ pp scanner: token[0]=37, text=% (Line,column from,to)(48,1-5) offset from-to[2982-2986[ pp scanner: token[1]=4361, text=page (Line,column from,to)(48,5-6) offset from-to[2986-2987[ pp scanner: token[2]=59, text=; invoking preprocessor via pl1pp_parser pl1pp_parser returned 0 preprocessor parser returned filename to include ../../include/mlsys_message.incl.pl1 addIncludeBuffer type 0, name ../../include/mlsys_message.incl.pl1 ./canonicalize_mailbox.pl1:0: error: could not open 146221952nclude file stacking current scanner buffer --(end of buffer or a NUL) ./canonicalize_mailbox.pl1:0: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. * In pl1pp-parser.y, add %SKIP %SKIP (NUM) - as preprocessor statement to ignore. 26-07-2006 * In TokenLocation.c, check if the location pointer is NULL. * In IncludeFileUtils.c, replace call to pp_yyerror with call to error. * In ppVariable.c, use the external reference to scanner context block, when adding messages, instead of clutter the pl1pp-parser.y grammar file, when code that has nothing to do with the grammar. Another good effect, is that the error get reported where the most relevant information is in the right context. * In pl1pp-parser.y, add check on defineVariable, and invoke YYERROR when necessary. * In pl1-parser.y/yyerror, include a call to addErrorMessage * In showWelcome, add build date and time of the compiler printf("*****************************************\n"); printf("* PL/I COMPILER FOR GCC VERSION 0.0.12 *\n"); printf("* built %s %s *\n",__DATE__,__TIME__); printf("* pl1gcc.sourceforge.net *\n"); printf("*****************************************\n"); - from info gcc (predefined macros): `__DATE__' This macro expands to a string constant that describes the date on which the preprocessor is being run. The string constant contains eleven characters and looks like `"Feb 12 1996"'. If the day of the month is less than 10, it is padded with a space on the left. If GCC cannot determine the current date, it will emit a warning message (once per compilation) and `__DATE__' will expand to `"??? ?? ????"'. `__TIME__' This macro expands to a string constant that describes the time at which the preprocessor is being run. The string constant contains eight characters and looks like `"23:59:01"'. If GCC cannot determine the current time, it will emit a warning message (once per compilation) and `__TIME__' will expand to `"??:??:??"'. * In pl1pp-parser.y, use %pure-parser, to get the location information to pp_yyerror - old pp_yyerror: int pp_yyerror(const char* msgid) { fprintf(stderr, "%s\n\n", msgid); return 0; } /* yyerror */ - new pp_yyerror: void yyerror (YYLTYPE *locp, char *msg) { char *buf=sprintfString("Preprocessor error at %s: %s\n\n",sprintf_yylloc(locp),msg); fprintf(stderr, "%s", buf); addErrorMessage(scannerContext->ppp ,buf); } /* yyerror */ * had to change the pp_yylex function to use the reentrant functions to get llval and lloc. - new int pp_yylex (YYSTYPE *lvalp, YYLTYPE *llocp) { struct savedtokenlist *temp; int unused; if(currentToken==NULL) return 0; /* EOF */ temp=currentToken; currentToken=currentToken->next; memcpy(llocp ,temp->locations,sizeof(YYLTYPE)); lvalp->s = temp->string; return temp->token; } - old int old_pp_yylex(void) { struct savedtokenlist *temp; if(currentToken==NULL) return 0; /* EOF */ temp=currentToken; currentToken=currentToken->next; memcpy(&pp_yylloc,temp->locations,sizeof(YYLTYPE)); pp_yylval.s=temp->string; return temp->token; } |