424ec7b35b
Create interval.h. Use std::size_t instead of bare size_t. Redefine parser::Name to not be just a bare string. Break out and rename CharBlock from token-sequence.h for use in the parse tree. Incremental replacement of name strings with pointers to cooked characters. Fix case sensitivity problem. Use new CharBlock encoding to replace strings for real literal constants. Normalized cooked character stream to lower case. Simplify parsing now that cooked stream is lower case. Replace Keyword in parse tree. Add static_asserts to || and recovery parsers to enforce same result types. Remove needless TODO comment inserted earlier. Fix case conversion on prefixed character literals (f90_correct/dc04.f90). Use CharBlock in user-state.h. Complete transition from nextChar to nextCh (i.e., always use pointers). Document extensions. Begin work on compiler directive lines. More documentation work. Reformat prescan.cc. More work on compiler directive scanning. Original-commit: flang-compiler/f18@38d0404e16 Reviewed-on: https://github.com/flang-compiler/f18/pull/29 Tree-same-pre-rewrite: false
2.3 KiB
2.3 KiB
Extensions, deletions, and legacy features supported
- Tabs in source
<>
as synonym for.NE.
and/=
$
and@
as legal characters in names.T.
and.F.
- Initialization in type declaration statements using
/values/
- Kind specification with
*
, e.g.REAL*4
DOUBLE COMPLEX
- Signed complex literal constants
.XOR.
as predefined operator (can be overridden).N.
,.A.
,.O.
,.X.
predefined operator synonymsSTRUCTURE
,RECORD
,UNION
, andMAP
- Structure field access with
.field
NCHARACTER
type andNC
Kanji character literalsBYTE
as synonym forINTEGER(KIND=1)
- Quad precision REAL literals with
Q
X
prefix/suffix as synonym forZ
on hexadecimal literalsB
,O
,Z
, andX
accepted as suffixes as well as prefixes- Triplets allowed in array constructors
- Old-style
PARAMETER pi=3.14
statement (no parentheses) %LOC
,%VAL
, and%REF
- Leading comma allowed before I/O item list
- Empty parentheses allowed in
PROGRAM P()
- Missing parentheses allowed in
FUNCTION F
- Cray based
POINTER(p,x)
- Arithmetic
IF
. (Which branch with NaN take?) ASSIGN
statement, assignedGO TO
, and assigned formatPAUSE
statement- Hollerith literals and edit descriptors
NAMELIST
allowed in the execution part- Omitted colons on type declaration statements with attributes
- COMPLEX constructor expression, e.g.
(x+y,z)
+
and-
before all primary expressions, e.g.x*-y
.NOT. .NOT.
acceptedNAME=
as synonym forFILE=
DISPOSE=
- Data edit descriptors without width or other details
- Backslash escape character sequences in quoted character literals
D
lines in fixed form as comments or debug code
Extensions and legacy features deliberately not supported
.LG.
as synonym for.NE.
REDIMENSION
- Allocatable
COMMON
- Expressions in formats
ACCEPT
as synonym forREAD *
ARRAY
as synonym forDIMENSION
VIRTUAL
as synonym forDIMENSION
ENCODE
andDECODE
as synonyms for internal I/OIMPLICIT AUTOMATIC
,IMPLICIT STATIC
- Default exponent of zero, e.g.
3.14159E
- Characters in defined operators that are neither letters nor digits
B
suffix on unquoted octal constantsZ
prefix on unquoted hexadecimal constants