Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise README based on the comments from @hirooih at #5 #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 23 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Reference codebase for Universal-ctags
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

codebase -> Code Base
s/Universal-ctags/Universal Ctags/g

==============================================================

This is the reference codebase for measuring the performance of
This is the reference code base for measuring the performance of
Universal-ctags parsers.


Expand Down Expand Up @@ -38,7 +38,7 @@ We assume you may have enough storage space on your PC.

.. code-block:: console

$ ./codebae clone C
$ ./codebase clone C
...

2. Run Universal-ctags for the cloned code with following command line:
Expand All @@ -47,7 +47,8 @@ We assume you may have enough storage space on your PC.

$ [CTAGS_EXE=${where your ctags executable is}] ./codebase ctags <LANGUAGE> [<PROFILE>]

codebase refers *CTAGS_EXE* environment variable to run ctags.
`codebase` refers *CTAGS_EXE* environment variable to run ctags. If
CTAGS_EXE is not defined, `ctags` is used as the command name.

You can run ctags with different option combination.
We call such option combination *PROFILE*.
Expand Down Expand Up @@ -92,26 +93,38 @@ We assume you may have enough storage space on your PC.
How to add your code to code base
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A reader may not be the owner of the code.

  • How to add a code to the code base
  • How to add a project to the code base
  • How to add a git project to the code base

The last one don't not require the next sentence.

==============================================================

The code to be added to the code base must have a git repository.

You have to write a .lcopy file and put it to lcopy.d directory.
See lcopy.d/linux.lcopy as an example::

REPO=https://github.com/torvalds/linux
ALIGNMENT=v4.20
LANGUAGES=C,LdScript,Asm,Kconfig,DTS

`codebase` commands loads a .lcopy file with source built-in command. In
a .lcopy file must define `REPO`, `ALIGNMENT`, and `LANGUAGES`.

`REPO` specifies a git repository. `ALIGNMENT` is a tag put on the
git repository. `ALIGNMENT` allows users of codebase to get the same
source tree. `LANGUAGES` is a comma separated language list.
git repository. `ALIGNMENT` allows users of `codebase` to get the same
source tree. Specify a git tag or commit as `ALIGNMENT`. A git branch
is not acceptable. `LANGUAGES` is a comma separated language list.


How to add your profile to preset list
How to add a new profile
==============================================================

You have to write a .ctags file and put it to profile.d directory.
A line started from "# @" is used as a description for the profile.
You may wan to use `--options-maybe` to extend profile without
modifying existing .ctags files.
Add a .ctags file under profile.d directory.
In the .ctags file, a line started from "# @" is used as a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this sentence you should describe that a line started from "#" is a comment.

And now I found a ".tags file" means a "option file" described in FILES sections of man ctags(1).
If we describe that this is a option file, a reader can understand that he/she can use comment lines starting '#' and the "--options" option can be used.

description for the profile.

You may want to use `--options` to extend profile without
modifying existing .ctags files. If you want to extend `base.ctags`
in the profile.d directory, write your profile (`extended.ctags`)
as following::

--options=base.ctags
...

Let's optimize our parsers!
Masatake YAMATO <[email protected]>