got rid of some arcane module names
This commit is contained in:
parent
c3b16311dd
commit
36c67455d4
34 changed files with 327 additions and 1258 deletions
|
|
@ -8,7 +8,7 @@
|
|||
#
|
||||
|
||||
import
|
||||
strutils, os, times, parseopt, llstream, ast, rnimsyn, options, msgs,
|
||||
strutils, os, times, parseopt, llstream, ast, renderer, options, msgs,
|
||||
clex, cparse
|
||||
|
||||
const
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
# XXX cleanup of declaration handling.
|
||||
|
||||
import
|
||||
os, llstream, rnimsyn, clex, idents, strutils, pegs, ast, astalgo, msgs,
|
||||
os, llstream, renderer, clex, idents, strutils, pegs, ast, astalgo, msgs,
|
||||
options, strtabs
|
||||
|
||||
type
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import
|
|||
ast, astalgo, strutils, nhashes, trees, platform, magicsys, extccomp,
|
||||
options,
|
||||
nversion, nimsets, msgs, crc, bitsets, idents, lists, types, ccgutils, os,
|
||||
times, ropes, math, passes, rodread, wordrecg, rnimsyn, treetab, cgmeth,
|
||||
times, ropes, math, passes, rodread, wordrecg, treetab, cgmeth,
|
||||
rodutils
|
||||
|
||||
when options.hasTinyCBackend:
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
## This module implements code generation for multi methods.
|
||||
|
||||
import
|
||||
options, ast, astalgo, msgs, idents, rnimsyn, types, magicsys
|
||||
options, ast, astalgo, msgs, idents, renderer, types, magicsys
|
||||
|
||||
proc genConv(n: PNode, d: PType, downcast: bool): PNode =
|
||||
var
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
import
|
||||
ast, astalgo, strutils, nhashes, options, nversion, msgs, os, ropes, idents,
|
||||
wordrecg, math, syntaxes, rnimsyn, scanner, rst, times, highlite
|
||||
wordrecg, math, syntaxes, renderer, lexer, rst, times, highlite
|
||||
|
||||
proc CommandDoc*(filename: string)
|
||||
proc CommandRst2Html*(filename: string)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
import
|
||||
ast, astalgo, strutils, nhashes, trees, platform, magicsys, extccomp,
|
||||
options, nversion, nimsets, msgs, crc, bitsets, idents, lists, types, os,
|
||||
times, ropes, math, passes, ccgutils, wordrecg, rnimsyn, rodread, rodutils
|
||||
times, ropes, math, passes, ccgutils, wordrecg, renderer, rodread, rodutils
|
||||
|
||||
proc ecmasgenPass*(): TPass
|
||||
# implementation
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
import
|
||||
strutils, magicsys, lists, options, ast, astalgo, trees, treetab, nimsets,
|
||||
msgs, os, condsyms, idents, rnimsyn, types, passes, semfold
|
||||
msgs, os, condsyms, idents, renderer, types, passes, semfold
|
||||
|
||||
type
|
||||
PStackFrame* = ref TStackFrame
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
import
|
||||
llstream, os, wordrecg, idents, strutils, ast, astalgo, msgs, options,
|
||||
rnimsyn, filters
|
||||
renderer, filters
|
||||
|
||||
proc filterTmpl*(stdin: PLLStream, filename: string, call: PNode): PLLStream
|
||||
# #! template(subsChar='$', metaChar='#') | standard(version="0.7.2")
|
||||
|
|
@ -10,7 +10,8 @@
|
|||
# This module implements Nimrod's simple filters and helpers for filters.
|
||||
|
||||
import
|
||||
llstream, os, wordrecg, idents, strutils, ast, astalgo, msgs, options, rnimsyn
|
||||
llstream, os, wordrecg, idents, strutils, ast, astalgo, msgs, options,
|
||||
renderer
|
||||
|
||||
proc filterReplace*(stdin: PLLStream, filename: string, call: PNode): PLLStream
|
||||
proc filterStrip*(stdin: PLLStream, filename: string, call: PNode): PLLStream
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
# The interface supports one language nested in another.
|
||||
|
||||
import
|
||||
nhashes, options, msgs, strutils, platform, idents, lexbase, wordrecg, scanner
|
||||
nhashes, options, msgs, strutils, platform, idents, lexbase, wordrecg, lexer
|
||||
|
||||
type
|
||||
TTokenClass* = enum
|
||||
|
|
@ -154,7 +154,7 @@ proc nimNextToken(g: var TGeneralTokenizer) =
|
|||
while not (g.buf[pos] in {'\0', '\x0A', '\x0D'}): inc(pos)
|
||||
of 'a'..'z', 'A'..'Z', '_', '\x80'..'\xFF':
|
||||
var id = ""
|
||||
while g.buf[pos] in scanner.SymChars + {'_'}:
|
||||
while g.buf[pos] in lexer.SymChars + {'_'}:
|
||||
add(id, g.buf[pos])
|
||||
inc(pos)
|
||||
if (g.buf[pos] == '\"'):
|
||||
|
|
@ -247,9 +247,9 @@ proc nimNextToken(g: var TGeneralTokenizer) =
|
|||
of '\0':
|
||||
g.kind = gtEof
|
||||
else:
|
||||
if g.buf[pos] in scanner.OpChars:
|
||||
if g.buf[pos] in lexer.OpChars:
|
||||
g.kind = gtOperator
|
||||
while g.buf[pos] in scanner.OpChars: inc(pos)
|
||||
while g.buf[pos] in lexer.OpChars: inc(pos)
|
||||
else:
|
||||
inc(pos)
|
||||
g.kind = gtNone
|
||||
|
|
@ -462,10 +462,10 @@ proc clikeNextToken(g: var TGeneralTokenizer, keywords: openarray[string],
|
|||
of '\0':
|
||||
g.kind = gtEof
|
||||
else:
|
||||
if g.buf[pos] in scanner.OpChars:
|
||||
if g.buf[pos] in lexer.OpChars:
|
||||
g.kind = gtOperator
|
||||
while g.buf[pos] in scanner.OpChars: inc(pos)
|
||||
else:
|
||||
while g.buf[pos] in lexer.OpChars: inc(pos)
|
||||
else:
|
||||
inc(pos)
|
||||
g.kind = gtNone
|
||||
g.length = pos - g.pos
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
# This module implements lookup helpers.
|
||||
|
||||
import
|
||||
ast, astalgo, idents, semdata, types, msgs, options, rodread, rnimsyn
|
||||
ast, astalgo, idents, semdata, types, msgs, options, rodread, renderer
|
||||
|
||||
type
|
||||
TOverloadIterMode* = enum
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
# module handling
|
||||
|
||||
import
|
||||
llstream, strutils, ast, astalgo, scanner, syntaxes, rnimsyn, options, msgs,
|
||||
llstream, strutils, ast, astalgo, lexer, syntaxes, renderer, options, msgs,
|
||||
os, lists, condsyms, rodread, rodwrite, ropes, trees,
|
||||
wordrecg, sem, semdata, idents, passes, docgen, extccomp,
|
||||
cgen, ecmasgen,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
# This module handles the reading of the config file.
|
||||
|
||||
import
|
||||
llstream, nversion, commands, os, strutils, msgs, platform, condsyms, scanner,
|
||||
llstream, nversion, commands, os, strutils, msgs, platform, condsyms, lexer,
|
||||
options, idents, wordrecg
|
||||
|
||||
# ---------------- configuration file parser -----------------------------
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ when defined(gcc) and defined(windows):
|
|||
{.link: "icons/nimrod.res".}
|
||||
|
||||
import
|
||||
times, commands, scanner, condsyms, options, msgs, nversion, nimconf, ropes,
|
||||
times, commands, lexer, condsyms, options, msgs, nversion, nimconf, ropes,
|
||||
extccomp, strutils, os, platform, main, parseopt
|
||||
|
||||
when hasTinyCBackend:
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
# this unit handles Nimrod sets; it implements symbolic sets
|
||||
|
||||
import
|
||||
ast, astalgo, trees, nversion, msgs, platform, bitsets, types, rnimsyn
|
||||
ast, astalgo, trees, nversion, msgs, platform, bitsets, types, renderer
|
||||
|
||||
proc toBitSet*(s: PNode, b: var TBitSet)
|
||||
# this function is used for case statement checking:
|
||||
|
|
@ -172,4 +172,4 @@ proc SetHasRange(s: PNode): bool =
|
|||
|
||||
proc emptyRange(a, b: PNode): bool =
|
||||
result = not leValue(a, b) # a > b iff not (a <= b)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
# from the grammar and how comments belong to the AST.
|
||||
|
||||
import
|
||||
llstream, scanner, idents, strutils, ast, msgs
|
||||
llstream, lexer, idents, strutils, ast, msgs
|
||||
|
||||
type
|
||||
TParser*{.final.} = object # a TParser object represents a module that
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
#
|
||||
|
||||
import
|
||||
strutils, os, parseopt, llstream, ast, rnimsyn, options, msgs,
|
||||
strutils, os, parseopt, llstream, ast, renderer, options, msgs,
|
||||
paslex, pasparse
|
||||
|
||||
const
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@
|
|||
|
||||
import
|
||||
strutils, lists, options, ast, astalgo, llstream, msgs, platform, os,
|
||||
condsyms, idents, rnimsyn, types, extccomp, math, magicsys, nversion, nimsets,
|
||||
syntaxes, times, rodread
|
||||
condsyms, idents, renderer, types, extccomp, math, magicsys, nversion,
|
||||
nimsets, syntaxes, times, rodread
|
||||
|
||||
type
|
||||
TPassContext* = object of TObject # the pass's context
|
||||
|
|
|
|||
1195
compiler/pbraces.nim
1195
compiler/pbraces.nim
File diff suppressed because it is too large
Load diff
|
|
@ -8,16 +8,11 @@
|
|||
#
|
||||
|
||||
import
|
||||
llstream, scanner, idents, strutils, ast, msgs, pnimsyn
|
||||
llstream, lexer, parser, idents, strutils, ast, msgs
|
||||
|
||||
proc ParseAll*(p: var TParser): PNode
|
||||
proc parseTopLevelStmt*(p: var TParser): PNode
|
||||
# implements an iterator. Returns the next top-level statement or nil if end
|
||||
# of stream.
|
||||
# implementation
|
||||
|
||||
proc ParseAll(p: var TParser): PNode =
|
||||
proc ParseAll*(p: var TParser): PNode =
|
||||
result = nil
|
||||
|
||||
proc parseTopLevelStmt(p: var TParser): PNode =
|
||||
proc parseTopLevelStmt*(p: var TParser): PNode =
|
||||
result = nil
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
# This module implements semantic checking for pragmas
|
||||
|
||||
import
|
||||
os, platform, condsyms, ast, astalgo, idents, semdata, msgs, rnimsyn,
|
||||
os, platform, condsyms, ast, astalgo, idents, semdata, msgs, renderer,
|
||||
wordrecg, ropes, options, strutils, lists, extccomp, math, magicsys, trees,
|
||||
rodread
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
# This module implements the renderer of the standard Nimrod representation.
|
||||
|
||||
import
|
||||
scanner, options, idents, strutils, ast, msgs, lists
|
||||
lexer, options, idents, strutils, ast, msgs, lists
|
||||
|
||||
type
|
||||
TRenderFlag* = enum
|
||||
|
|
@ -637,7 +637,7 @@ proc gasm(g: var TSrcGen, n: PNode) =
|
|||
proc gident(g: var TSrcGen, n: PNode) =
|
||||
var t: TTokType
|
||||
var s = atom(n)
|
||||
if (s[0] in scanner.SymChars):
|
||||
if (s[0] in lexer.SymChars):
|
||||
if (n.kind == nkIdent):
|
||||
if (n.ident.id < ord(tokKeywordLow) - ord(tkSymbol)) or
|
||||
(n.ident.id > ord(tokKeywordHigh) - ord(tkSymbol)):
|
||||
|
|
@ -10,9 +10,9 @@
|
|||
# This module implements the semantic checking pass.
|
||||
|
||||
import
|
||||
strutils, nhashes, lists, options, scanner, ast, astalgo, trees, treetab,
|
||||
wordrecg, ropes, msgs, os, condsyms, idents, rnimsyn, types, platform, math,
|
||||
magicsys, pnimsyn, nversion, nimsets, semdata, evals, semfold, importer,
|
||||
strutils, nhashes, lists, options, lexer, ast, astalgo, trees, treetab,
|
||||
wordrecg, ropes, msgs, os, condsyms, idents, renderer, types, platform, math,
|
||||
magicsys, parser, nversion, nimsets, semdata, evals, semfold, importer,
|
||||
procfind, lookups, rodread, pragmas, passes, semtypinst, sigmatch, suggest
|
||||
|
||||
proc semPass*(): TPass
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@
|
|||
# This module contains the data structures for the semantic checking phase.
|
||||
|
||||
import
|
||||
strutils, lists, options, scanner, ast, astalgo, trees, treetab, wordrecg,
|
||||
ropes, msgs, platform, os, condsyms, idents, rnimsyn, types, extccomp, math,
|
||||
magicsys, nversion, nimsets, pnimsyn, times, passes, rodread
|
||||
strutils, lists, options, lexer, ast, astalgo, trees, treetab, wordrecg,
|
||||
ropes, msgs, platform, os, condsyms, idents, renderer, types, extccomp, math,
|
||||
magicsys, nversion, nimsets, parser, times, passes, rodread
|
||||
|
||||
type
|
||||
TOptionEntry* = object of lists.TListEntry # entries to put on a
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
import
|
||||
strutils, lists, options, ast, astalgo, trees, treetab, nimsets, times,
|
||||
nversion, platform, math, msgs, os, condsyms, idents, rnimsyn, types,
|
||||
nversion, platform, math, msgs, os, condsyms, idents, renderer, types,
|
||||
commands
|
||||
|
||||
proc getConstExpr*(m: PSym, n: PNode): PNode
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
# the call to overloaded procs, generic procs and operators.
|
||||
|
||||
import
|
||||
ast, astalgo, semdata, types, msgs, rnimsyn, lookups, semtypinst,
|
||||
ast, astalgo, semdata, types, msgs, renderer, lookups, semtypinst,
|
||||
magicsys
|
||||
|
||||
type
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@
|
|||
|
||||
## This file implements features required for IDE support.
|
||||
|
||||
import scanner, idents, ast, astalgo, semdata, msgs, types, sigmatch, options
|
||||
import
|
||||
lexer, idents, ast, astalgo, semdata, msgs, types, sigmatch, options
|
||||
|
||||
const
|
||||
sep = '\t'
|
||||
|
|
@ -38,7 +39,7 @@ proc SymToStr(s: PSym, isLocal: bool, section: string): string =
|
|||
result.add($ToColumn(s.info))
|
||||
|
||||
proc filterSym(s: PSym): bool {.inline.} =
|
||||
result = s.name.s[0] in scanner.SymChars
|
||||
result = s.name.s[0] in lexer.SymChars
|
||||
|
||||
proc suggestField(s: PSym) =
|
||||
if filterSym(s):
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
## Implements the dispatcher for the different parsers.
|
||||
|
||||
import
|
||||
strutils, llstream, ast, astalgo, idents, scanner, options, msgs, pnimsyn,
|
||||
pbraces, ptmplsyn, filters, rnimsyn
|
||||
strutils, llstream, ast, astalgo, idents, lexer, options, msgs, parser,
|
||||
pbraces, filters, filter_tmpl, renderer
|
||||
|
||||
type
|
||||
TFilterKind* = enum
|
||||
|
|
@ -54,7 +54,7 @@ proc ParseFile(filename: string): PNode =
|
|||
proc parseAll(p: var TParsers): PNode =
|
||||
case p.skin
|
||||
of skinStandard:
|
||||
result = pnimsyn.parseAll(p.parser)
|
||||
result = parser.parseAll(p.parser)
|
||||
of skinBraces:
|
||||
result = pbraces.parseAll(p.parser)
|
||||
of skinEndX:
|
||||
|
|
@ -65,7 +65,7 @@ proc parseAll(p: var TParsers): PNode =
|
|||
proc parseTopLevelStmt(p: var TParsers): PNode =
|
||||
case p.skin
|
||||
of skinStandard:
|
||||
result = pnimsyn.parseTopLevelStmt(p.parser)
|
||||
result = parser.parseTopLevelStmt(p.parser)
|
||||
of skinBraces:
|
||||
result = pbraces.parseTopLevelStmt(p.parser)
|
||||
of skinEndX:
|
||||
|
|
@ -99,7 +99,7 @@ proc parsePipe(filename: string, inputStream: PLLStream): PNode =
|
|||
while line[i] in WhiteSpace: inc(i)
|
||||
var q: TParser
|
||||
OpenParser(q, filename, LLStreamOpen(copy(line, i)))
|
||||
result = pnimsyn.parseAll(q)
|
||||
result = parser.parseAll(q)
|
||||
CloseParser(q)
|
||||
LLStreamClose(s)
|
||||
|
||||
|
|
@ -167,7 +167,7 @@ proc openParsers(p: var TParsers, filename: string, inputstream: PLLStream) =
|
|||
else: s = inputStream
|
||||
case p.skin
|
||||
of skinStandard, skinBraces, skinEndX:
|
||||
pnimsyn.openParser(p.parser, filename, s)
|
||||
parser.openParser(p.parser, filename, s)
|
||||
|
||||
proc closeParsers(p: var TParsers) =
|
||||
pnimsyn.closeParser(p.parser)
|
||||
parser.closeParser(p.parser)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
import
|
||||
strutils, lists, options, ast, astalgo, trees, treetab, evals, msgs, os,
|
||||
idents, rnimsyn, types, passes, semfold, magicsys, cgmeth
|
||||
idents, renderer, types, passes, semfold, magicsys, cgmeth
|
||||
|
||||
const
|
||||
genPrefix* = ":tmp" # prefix for generated names
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
# tree helper routines
|
||||
|
||||
import
|
||||
ast, astalgo, scanner, msgs, strutils
|
||||
ast, astalgo, lexer, msgs, strutils
|
||||
|
||||
proc getMagic*(op: PNode): TMagic
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue