Eagle Legacy Modernization, LLC

Lisp Grammar

Main program: Lisp_Program

 Count  Terminals:
29 Lisp_Character: A string enclosed in quotes
31 Lisp_Comment: Comment
179 Lisp_Function_Definition: An identifier
4,079 Lisp_Identifier_Reference: An identifier
134 Lisp_Literal: A string enclosed in quotes
321 Lisp_Number: A number
61 Lisp_Parameter_Definition: An identifier
1 Lisp_Variable_Definition: An identifier
 Count  Statistics(*) Tokens:
11 all all all all 1.00 all Lisp_DefmacroFunction: '(' "defmacro" Lisp_Function_Definition Lisp_SExpr Lisp_SExpr* ')'
61 all all all all all Lisp_DefparameterFunction: '(' "defparameter" Lisp_Parameter_Definition Lisp_SExpr ')'
168 all all 1% all all 1.43 all Lisp_DefunFunction: '(' "defun" [','] Lisp_Function_Definition Lisp_SExpr Lisp_SExpr* ')'
75 all all all all all all Lisp_IfFunction: '(' "if" Lisp_SExpr Lisp_SExpr [Lisp_SExpr] ')'
34 all all all all Lisp_LoopFunction: '(' "loop" Lisp_LoopType ')'
34 (97% | 3%) |   Lisp_LoopType: (Lisp_LoopFancy | Lisp_SExpr)
33 3% 1.46(85%) 1.30 |   |   Lisp_LoopFancy: [Lisp_LoopNamed] [Lisp_LoopVariableClause]* Lisp_LoopMainClause*
    |   |   |   Lisp_LoopInitialFinal: ("initially"|"finally") Lisp_SExpr
43 (7% | 40% | 5% | 14% | 33% | 2% | none) |   |   |   Lisp_LoopMainClause: (Lisp_LoopConditional | Lisp_LoopListAccumulation | Lisp_LoopNumericAccumulation | Lisp_LoopTerminationTest | Lisp_LoopUnconditionalDo | Lisp_LoopUnconditionalReturn | Lisp_LoopInitialFinal)
3 all all none none all |   |   |   |   Lisp_LoopConditional: ("if"|"when"|"unless") Lisp_SExpr [Lisp_LoopMoreSelectableClause]* [Lisp_LoopConditionalElse] ["end"]
    |   |   |   |   |   Lisp_LoopConditionalElse: "else" Lisp_SExpr [Lisp_LoopMoreSelectableClause]*
    |   |   |   |   |   Lisp_LoopMoreSelectableClause: "and" Lisp_SExpr
17 all all |   |   |   |   Lisp_LoopListAccumulation: ("append"|"appenging"|"collect"|"collecting"|"nconc"|"nconcing") Lisp_SExpr
2 all all none |   |   |   |   Lisp_LoopNumericAccumulation: ("count"|"counting"|"maximize"|"maximizing"|"minimize"|"minimizing"|"sum"|"summing") Lisp_SExpr [Lisp_LoopAccumulateInto]
    |   |   |   |   |   Lisp_LoopAccumulateInto: "into" Lisp_Variable
6 all all |   |   |   |   Lisp_LoopTerminationTest: ("while"|"until"|"repeat"|"always"|"never"|"thereis") Lisp_SExpr
14 all 1.00 |   |   |   |   Lisp_LoopUnconditionalDo: ("do"|"doing") Lisp_SExpr*
1 all all |   |   |   |   Lisp_LoopUnconditionalReturn: "return" Lisp_SExpr
1 all all |   |   |   Lisp_LoopNamed: "named" Lisp_Variable_Definition
41 (98% | 2% | none) |   |   |   Lisp_LoopVariableClause: (Lisp_LoopForAsClause | Lisp_LoopWith | Lisp_LoopInitialFinal)
40 all all 1.05 |   |   |   |   Lisp_LoopForAsClause: ("for"|"as") Lisp_Variable Lisp_LoopForClause*
42 (79% | 21%) |   |   |   |   |   Lisp_LoopForClause: (Lisp_ForArithmetic | Lisp_ForEqualsThen)
33 all all |   |   |   |   |   |   Lisp_ForArithmetic: ("across"|"below"|"from"|"in"|"on"|"to") Lisp_SExpr
9 all all 22% |   |   |   |   |   |   Lisp_ForEqualsThen: '=' Lisp_SExpr [Lisp_LoopForThen]
2 all all |   |   |   |   |   |   |   Lisp_LoopForThen: "then" Lisp_SExpr
1 all none |   |   |   |   Lisp_LoopWith: Lisp_LoopWithElement [Lisp_LoopMoreWith]*
    |   |   |   |   |   Lisp_LoopMoreWith: "and" Lisp_LoopWithElement
1 all all all |   |   |   |   |   Lisp_LoopWithElement: "with" [Lisp_SExpr] [Lisp_LoopWithValue]
1 all all |   |   |   |   |   |   Lisp_LoopWithValue: '=' Lisp_SExpr
349 (3% | 17% | 48% | 21% | 10%) Lisp_Function: (Lisp_DefmacroFunction | Lisp_DefparameterFunction | Lisp_DefunFunction | Lisp_IfFunction | Lisp_LoopFunction)
15 19.87 Lisp_Program: Lisp_SExpr*
8,240 (0% | 0% | 0% | 1% | 1% | 33% | 2% | 0% | 1% | 1% | 49% | 4% | 2% | 0% | 0% | 4% | 2%) Lisp_SExpr: (Lisp_Ampersand | Lisp_CharString | Lisp_Colon | Lisp_Comma | Lisp_Hash | Lisp_List | Lisp_Quote | Lisp_Tick | Lisp_doLetProg | "nil" | Lisp_Identifier_Reference | Lisp_Number | Lisp_Literal | Lisp_Character | Lisp_Comment | Lisp_Function | ("+"|"++"|"+++"|"-"|"*"|"**"|"***"|"/"|"//"|"///"|"1+"|"1-"|"."|"?"|">"|">="|"="|"/="|"<"|"<="))
9 all all |   Lisp_Ampersand: '&' Lisp_SExpr
16 all all all all none |   Lisp_CharString: ("char"|"string") ['/'] ['<'] ['>'] ['=']
25 all all |   Lisp_Colon: ':' Lisp_SExpr
56 all all all |   Lisp_Comma: ',' ['@'] Lisp_SExpr
47 all all |   Lisp_Hash: '#' Lisp_SExpr
2,691 all 2.59(98%) all |   Lisp_List: '(' [Lisp_SExpr]* ')'
137 all all |   Lisp_Quote: ''' Lisp_SExpr
16 all all |   Lisp_Tick: '`' Lisp_SExpr
89 all 17% |   Lisp_doLetProg: ("do"|"let"|"prog") ['*']
40 (3% | 98%) Lisp_Variable: (Lisp_VariableWithDot | Lisp_Identifier_Reference)
1 all all all all all |   Lisp_VariableWithDot: '(' Lisp_Identifier_Reference '.' Lisp_Identifier_Reference ')'

Terminals = 8 (instances=4,835)
Tokens = 43 (instances=12,404)

(*) Statistics are shown in the same order as the Tokens.
Percentages are rounded; 'all' and 'none' mean 100% and 0% before rounding.
For lists, it shows the average number of occurrences, excluding empty lists.