You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building on Ubuntu 18.04 64 bits with g++-9 with a custom script that builds the lpg2 binary, to be able to build/run I needed to make the changes shown bellow.
Now I can run lpg2 but it doesn't find the template files and I need to put all files on the same folder (I'm not using any extra command line parameters, not even -include-directory=semicolon-separated-strings), it seems that it expect the template files to be in some specific places but I can't find where they are specified, when I build it using lpg2/CMakeLists.txt there is no install option like make install.
It seems that the default installation directories are missing somehow.
Can anyone give some clues here ?
/usr/bin/time lpg2 LEGLexer.gi
Options in effect for LEGKWLexer.gi:
ACTION-BLOCK=("LEGKWLexer.h","/.","./")
AST-DIRECTORY="" AST-TYPE="Ast" NOATTRIBUTES NOAUTOMATIC-AST NOBACKTRACK
BYTE CONFLICTS DAT-DIRECTORY="" DAT-FILE="LEGKWLexerdcl.data"
DCL-FILE="LEGKWLexerprs.cpp" NODEBUG DEF-FILE="LEGKWLexerdef.cpp"
DIRECTORY-PREFIX="" NOEDIT NOERROR-MAPS ESCAPE='$'
EXPORT-TERMINALS=("LEGLexerexp.h","","") EXTENDS-PARSETABLE FACTORY="new "
FILE-PREFIX="LEGKWLexer" NOFIRST NOFOLLOW NOGLR NOGOTO-DEFAULT
GRM-FILE="LEGKWLexer.gi" IMP-FILE="LEGKWLexerimp.h" INCLUDE-DIRECTORY=""
LALR=1 LEGACY NOLIST MARGIN=4 MAX-CASES=1024 NAMES=OPTIMIZED
NONT-CHECK OR_MARKER='|' OUT-DIRECTORY=""
PACKAGE="org.eclipse.imp.leg.parser" NOPARENT-SAVE
PARSETABLE-INTERFACES="ParseTable" PREFIX="Char_" PRIORITY
PROGRAMMING_LANGUAGE=RT_CPP PRS-FILE="LEGKWLexerprs.h" NOQUIET
READ-REDUCE REMAP-TERMINALS RULE_CLASSNAMES=SEQUENTIAL NOSCOPES
NOSERIALIZE NOSHIFT-DEFAULT SINGLE-PRODUCTIONS NOSOFT-KEYWORDS NOSTATES
SUFFIX="" SYM-FILE="LEGKWLexersym.h" TAB-FILE="LEGKWLexer.t" TABLE
TEMPLATE="KeywordTemplateF.gi" TRACE=CONFLICTS NOVARIABLES NOVERBOSE
NOVISITOR VISITOR-TYPE="Visitor" WARNINGS NOXREF
LEGKWLexer.gi:8:5:8:27:128:150: Warning: Some options may have been imported from the included file "KWLexerLowerCaseMapF.gi"
KWLexerLowerCaseMapF.gi:16:24:16:24:379:379: Warning: The macro "$" is undefined. No substitution made
KWLexerLowerCaseMapF.gi:2:5:2:14:16:25: Informative: The terminal DollarSign is useless.
KWLexerLowerCaseMapF.gi:3:5:3:11:39:45: Informative: The terminal Percent is useless.
KWLexerLowerCaseMapF.gi:4:5:4:5:59:59: Informative: The terminal _ is useless.
KWLexerLowerCaseMapF.gi:6:15:6:15:80:80: Informative: The terminal c is useless.
KWLexerLowerCaseMapF.gi:6:35:6:35:100:100: Informative: The terminal g is useless.
KWLexerLowerCaseMapF.gi:6:50:6:50:115:115: Informative: The terminal j is useless.
KWLexerLowerCaseMapF.gi:6:55:6:55:120:120: Informative: The terminal k is useless.
KWLexerLowerCaseMapF.gi:6:65:6:65:130:130: Informative: The terminal m is useless.
KWLexerLowerCaseMapF.gi:7:15:7:15:146:146: Informative: The terminal p is useless.
KWLexerLowerCaseMapF.gi:7:20:7:20:151:151: Informative: The terminal q is useless.
KWLexerLowerCaseMapF.gi:7:55:7:55:186:186: Informative: The terminal x is useless.
KWLexerLowerCaseMapF.gi:7:60:7:60:191:191: Informative: The terminal y is useless.
KWLexerLowerCaseMapF.gi:7:65:7:65:196:196: Informative: The terminal z is useless.
LEGKWLexer.gi:32:5:32:11:556:562: Informative: Grammar is LR(0).
Number of Terminals: 30
Number of Nonterminals: 1
Number of Productions: 11
Number of Single Productions: 0
Number of Items: 58
Number of States: 37
Number of Shift actions: 35
Number of Goto actions: 1
Number of Shift/Reduce actions: 10
Number of Goto/Reduce actions: 0
Number of Reduce actions: 1
Number of Shift-Reduce conflicts: 0
Number of Reduce-Reduce conflicts: 0
Number of entries in base Action Table: 38
Additional space required for compaction of Action Table: 2.6%
Number of unique terminal states: 37
Number of Shift actions saved by merging: 0
Number of Conflict points saved by merging: 0
Number of Reduce actions saved by merging: 0
Number of Reduce saved by default: 0
Number of entries in Terminal Action Table: 83
Additional space required for compaction of Terminal Table: 6.0%
Actions in Compressed Tables:
Number of Shifts: 35
Number of Shift/Reduces: 10
Number of Gotos: 1
Number of Goto/Reduces: 0
Number of Reduces: 1
Number of Defaults: 0
Parsing Tables storage:
Storage required for BASE_CHECK: 11 Bytes
Storage required for BASE_ACTION: 51 Bytes
Storage required for TERM_CHECK: 114 Bytes
Storage required for TERM_ACTION: 89 Bytes
The LALR Parser Generator Version 2.2.01 (Feb 26 2025)
(C) Copyright LPG Group. 1984, 2021.
Options in effect for LEGLexer.gi:
ACTION-BLOCK=("LEGLexer.h","/.","./")
AST-DIRECTORY="" AST-TYPE="Ast" NOATTRIBUTES NOAUTOMATIC-AST NOBACKTRACK
BYTE CONFLICTS DAT-DIRECTORY="" DAT-FILE="LEGLexerdcl.data"
DCL-FILE="LEGLexerprs.cpp" NODEBUG DEF-FILE="LEGLexerdef.cpp"
DIRECTORY-PREFIX="" NOEDIT NOERROR-MAPS ESCAPE='$'
EXPORT-TERMINALS=("LEGLexerexp.h","","") EXTENDS-PARSETABLE FACTORY="new "
FILE-PREFIX="LEGLexer" FILTER="LEGKWLexer.gi" NOFIRST NOFOLLOW NOGLR
NOGOTO-DEFAULT GRM-FILE="LEGLexer.gi" IMP-FILE="LEGLexerimp.h"
INCLUDE-DIRECTORY="" LALR=1 LEGACY NOLIST MARGIN=4 MAX-CASES=1024
NAMES=OPTIMIZED NONT-CHECK OR_MARKER='|' OUT-DIRECTORY=""
PACKAGE="org.eclipse.imp.leg.parser" NOPARENT-SAVE
PARSETABLE-INTERFACES="ParseTable" PREFIX="Char_" PRIORITY
PROGRAMMING_LANGUAGE=RT_CPP PRS-FILE="LEGLexerprs.h" NOQUIET READ-REDUCE
REMAP-TERMINALS RULE_CLASSNAMES=SEQUENTIAL NOSCOPES NOSERIALIZE
NOSHIFT-DEFAULT NOSINGLE-PRODUCTIONS NOSOFT-KEYWORDS NOSTATES SUFFIX=""
SYM-FILE="LEGLexersym.h" TAB-FILE="LEGLexer.t" TABLE
TEMPLATE="LexerTemplateF.gi" TRACE=CONFLICTS NOVARIABLES NOVERBOSE
NOVISITOR VISITOR-TYPE="Visitor" WARNINGS NOXREF
LEGLexer.gi:54:5:54:16:1032:1043: Informative: The terminal CtlCharNotWS is useless.
LEGLexer.gi:67:5:67:14:1397:1406: Informative: The terminal AfterASCII is useless.
LEGLexer.gi:107:5:107:9:2370:2374: Informative: Grammar is LALR(1).
Number of Terminals: 102
Number of Nonterminals: 40
Number of Productions: 172
Number of Items: 363
Number of States: 20
Number of Shift actions: 7
Number of Goto actions: 13
Number of Shift/Reduce actions: 359
Number of Goto/Reduce actions: 102
Number of Reduce actions: 20
Number of Shift-Reduce conflicts: 0
Number of Reduce-Reduce conflicts: 0
Number of entries in base Action Table: 135
Additional space required for compaction of Action Table: 14.0%
Number of unique terminal states: 18
Number of Shift actions saved by merging: 20
Number of Conflict points saved by merging: 0
Number of Reduce actions saved by merging: 0
Number of Reduce saved by default: 19
Number of entries in Terminal Action Table: 365
Additional space required for compaction of Terminal Table: 11.5%
Actions in Compressed Tables:
Number of Shifts: 7
Number of Shift/Reduces: 339
Number of Gotos: 13
Number of Goto/Reduces: 102
Number of Reduces: 1
Number of Defaults: 13
Parsing Tables storage:
Storage required for BASE_CHECK: 172 Bytes
Storage required for BASE_ACTION: 654 Bytes
Storage required for TERM_CHECK: 472 Bytes
Storage required for TERM_ACTION: 816 Bytes
0.00user 0.00system 0:00.01elapsed 90%CPU (0avgtext+0avgdata 7288maxresident)k
0inputs+168outputs (0major+581minor)pagefaults 0swaps
I'm building on Ubuntu 18.04 64 bits with
g++-9
with a custom script that builds thelpg2
binary, to be able to build/run I needed to make the changes shown bellow.Now I can run
lpg2
but it doesn't find the template files and I need to put all files on the same folder (I'm not using any extra command line parameters, not even-include-directory=semicolon-separated-strings
), it seems that it expect the template files to be in some specific places but I can't find where they are specified, when I build it usinglpg2/CMakeLists.txt
there is no install option likemake install
.I'm following the https://github.com/A-LPG/LPG2/blob/main/lpg-generator-templates-2.1.00/docs/Getting%20Started%20with%20LPG.pdf .
It seems that the default installation directories are missing somehow.
Can anyone give some clues here ?
The text was updated successfully, but these errors were encountered: